Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError: Feedback.__init__() got an unexpected keyword argument 'groundedness_provider' when using Groundedness #1739

Open
TedaLIEz opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@TedaLIEz
Copy link

Bug Description

I tried to evaluate my RAG app with Groundedness, but there is an error: TypeError: Feedback.__init__() got an unexpected keyword argument 'groundedness_provider'

To Reproduce

Following doc: https://www.trulens.org/component_guides/evaluation_benchmarks/groundedness_benchmark/?h=groundedness#benchmarking-various-groundedness-feedback-function-providers-openai-gpt-35-turbo-vs-gpt-4-vs-huggingface

from trulens.core import Feedback
from trulens.apps.llamaindex import TruLlama
from trulens.feedback.v2.feedback import Groundedness
import numpy as np
grounded = Groundedness(groundedness_provider=provider)
f_qa_relevance = Feedback(
    provider.relevance_with_cot_reasons,
    name="Answer Relevance"
).on_input_output()
context_selection = TruLlama.select_source_nodes().node.text
f_qs_relevance = (
    Feedback(provider.relevance_with_cot_reasons,
             name="Context Relevance")
    .on_input()
    .on(context_selection)
    .aggregate(np.mean)
)
f_groundedness = (
    Feedback(grounded.groundedness_measure_with_cot_reasons,
             name="Groundedness"
            )
    .on(context_selection)
    .on_output()
    .aggregate(grounded.grounded_statements_aggregator)
)

Expected behavior

No errors

Relevant Logs/Tracebacks

Traceback (most recent call last):
  File "/Users/JianGuo/VSCodeProject/learning-llm/advanced_rag/rag_eval.py", line 216, in <module>
    grounded = Groundedness(groundedness_provider=provider)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Feedback.__init__() got an unexpected keyword argument 'groundedness_provider'

Environment:

  • OS: MacOS
  • Python Version: 3.11.11
  • TruLens version
    trulens-apps-langchain==1.3.2
    trulens-apps-llamaindex==1.3.2
    trulens-core==1.3.2
    trulens-dashboard==1.3.2
    trulens-feedback==1.3.2
    trulens-otel-semconv==1.3.2
    trulens-providers-openai==1.3.2
  • Versions of other relevant installed libraries
@TedaLIEz TedaLIEz added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants