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

feat (experimental) added new prompt and metric into ragas.experimental #1240

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

jjmachan
Copy link
Member

@jjmachan jjmachan commented Sep 3, 2024

you can use it like

from ragas.experimental.metrics import FaithfulnessExperimental
from ragas.metrics import faithfulness
from ragas import evaluate


f = FaithfulnessExperimental(llm=LangchainLLMWrapper(gpt4o))
faithfulness.llm = LangchainLLMWrapper(gpt4o)

# row = amnesty_qa["eval"][0]
# await f.ascore(row)
# await faithfulness.ascore(row)

r = evaluate(
    amnesty_qa["eval"].select(range(10)),
    metrics=[f, faithfulness],
    raise_exceptions=True,
    callbacks=[]
)

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 3, 2024
@jjmachan jjmachan merged commit fe379a1 into explodinggradients:main Sep 3, 2024
16 checks passed
@jjmachan jjmachan deleted the feat/exp-faithfulness branch September 3, 2024 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant