ragas icon indicating copy to clipboard operation
ragas copied to clipboard

Language of the Testset

Open cmilanes93 opened this issue 10 months ago • 1 comments

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

Your Question Why the testset language is in english, also the references are in english

Code Examples from ragas.testset.synthesizers.single_hop.specific import ( SingleHopSpecificQuerySynthesizer, )

distribution = [ (SingleHopSpecificQuerySynthesizer(llm=generator_llm), 1.0), ]

for query, _ in distribution: prompts = await query.adapt_prompts("spanish", llm=generator_llm) query.set_prompts(**prompts)

Additional context In theory this should solve my problem, but it did not, in the https://docs.ragas.io/en/stable/howtos/customizations/testgenerator/_language_adaptation/#generate you use this cell to transform the queries into spanish, but you obtain a french sentence: Query: Quelles sont les caractéristiques du Bronx en tant que borough de New York? Reference: Le Bronx est l'un des cinq arrondissements de New York, qui est la plus grande ville des États-Unis. Bien que le contexte ne fournisse pas de détails spécifiques sur le Bronx, il mentionne que New York est une ville cosmopolite avec de nombreux quartiers ethniques, ce qui pourrait inclure des caractéristiques culturelles variées présentes dans le Bronx.

cmilanes93 avatar Feb 25 '25 17:02 cmilanes93

I have the same issue! I solve it by not relying on language adaptation from ragas but by having a separate step of translating the generated questions and answers into the necessary language.

zybinmikhail avatar Mar 28 '25 13:03 zybinmikhail