explodinggradients / ragas

Evaluation framework for your Retrieval Augmented Generation (RAG) pipelines
https://docs.ragas.io
Apache License 2.0
5.87k stars 557 forks source link

Can anybody tell me the testset generator code given in RAGAS website what columns will it actually create i think we can only get questions and ground_truth ans from testset generator and the context and answer will be generated from our rag architecture #1054

Open Saurabh8255 opened 3 weeks ago

Saurabh8255 commented 3 weeks ago

[ ] I checked the documentation and related resources and couldn't find an answer to my question.

Your Question what is unclear to you? What would you like to know?

Code Examples This community speaks code. Share your code snippets to help us understand your question better.

Additional context Anything else you want to share with us?

dosubot[bot] commented 3 weeks ago

Hey @Saurabh8255, I'm here to help you with any questions or issues you might have. Let me know how I can assist you!

The testset generator code from the RAGAS website creates the following columns:

This is evident from the _to_records method in the TestDataset class, which converts each DataRow into a dictionary and adds the "episode_done" key with a value of True.

def _to_records(self) -> t.List[t.Dict]:
    data_samples = []
    for data in self.test_data:
        data_dict = dict(data)
        data_dict["episode_done"] = True
        data_samples.append(data_dict)
    return data_samples

[1]

To continue talking to Dosu, mention @dosu.