You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @AmirPoursaberi, you can convert the evaluation result to pandas then can convert them to dict.
fromragas.dataset_schemaimportEvaluationDatasetfromragasimportevaluatefromragas.dataset_schemaimportSingleTurnSamplefromragas.metricsimportAnswerAccuracyfromlangchain_openaiimportChatOpenAIfromragas.llmsimportLangchainLLMWrappersample=SingleTurnSample(
user_input="When was Einstein born?",
response="Albert Einstein was born in 1879.",
reference="Albert Einstein was born in 1879."
)
dataset=EvaluationDataset(samples=[sample])
llm=ChatOpenAI(model="gpt-4o-mini")
evaluator_llm=LangchainLLMWrapper(langchain_llm=llm)
result=evaluate(dataset=dataset, metrics=[AnswerAccuracy(llm=evaluator_llm)])
result.to_pandas().to_dict()
Hi.
I want to extract the output results from the Ragas result object on my local machine. How do I do that?
The text was updated successfully, but these errors were encountered: