explodinggradients / ragas

Supercharge Your LLM Application Evaluations 🚀
https://docs.ragas.io
Apache License 2.0
7.3k stars 745 forks source link

feat: automatic persona generation #1618

Closed shahules786 closed 2 weeks ago

shahules786 commented 2 weeks ago

Adds persona to diversify test set generation

from ragas.testset.persona import PersonaList
persona_list = await PersonaList.from_kg(llm=generator_llm, kg=kg)
jjmachan commented 2 weeks ago

made 2 changes to this

from ragas.testset.persona import generate_personas_from_kg
persona_list = generate_personas_from_kg(kg=kg, llm=generator_llm)

generation being a class method, I was wrong about that one, and added executor to make things parallel at the function level.

let me know if this is good or else I'll revert these changes