Skip to content

feat: add simple scorer metric #1291

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

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

shahules786
Copy link
Member

@shahules786 shahules786 commented Sep 12, 2024

from ragas.dataset_schema import SingleTurnSample
from ragas.metrics._simple_criteria import SimpleCriteriaScoreWithoutReference


sample = SingleTurnSample(
    user_input="Where is the Eiffel Tower located?",
    response="The Eiffel Tower is located in Paris.",
)

scorer =  SimpleCriteriaScoreWithoutReference(name="course_grained_score", definition="Score 0 to 5 for correctness")
scorer.llm = openai_model
await scorer.single_turn_ascore(sample)

@shahules786 shahules786 marked this pull request as ready for review September 12, 2024 14:09
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 12, 2024
@jjmachan jjmachan merged commit e16b6f5 into explodinggradients:main Sep 13, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants