Integration
Ragas evaluation export
The evaluation export is JSON with question, ground_truth, and contexts. Those names match the fields a Ragas-style sample usually needs. You still build the sample and run the metric in your environment.
Field mapping
questionis the generated question.ground_truthis the expected answer, or the canonical answer when no separate expected answer was stored.contextsis a list. FAQai puts the item context in it, or the source chunk text when the item has a chunk id and no context string.
There is no answer from your production model in this file. Faithfulness and similar metrics need a response from the system you are testing. You supply that response. FAQai does not.
Export shape checked in the test suite
A unit test calls the real evaluation serializer with a synthetic item, then evaluationRecordToRagasSample maps that record to user_input, retrieved_contexts, reference, and a caller-supplied response. The synthetic source is examples/synthetic/returns-policy.txt. That test does not install Ragas, call a model, or produce a metric score. Treat it as a mapping check, not an evaluation run.
{
"question": "How long is the return window?",
"ground_truth": "30 days from delivery.",
"contexts": ["Items can be returned within 30 days of delivery."]
}The file wraps those records in a data array. A Ragas sample often wants user_input, response, retrieved_contexts, and reference. Map question to user_input, contexts to retrieved_contexts, and ground_truth to reference. Put the answer from the system you are testing in response. No Ragas version is pinned here, and this page does not claim every metric accepts the file unchanged. Evaluation export requires a paid plan. The generation steps are in create a RAG evaluation dataset from a PDF.