Reference · Glossary

RAGAS

Last updated

An open-source evaluation library built specifically for **RAG pipelines** — it scores answers on metrics like faithfulness (is the answer grounded in retrieved text?), answer relevance, and context precision/recall, often using an LLM as the judge.

#When to use

Grading a RAG app beyond "it looks fine to me" — automated, repeatable scores you can track across prompt or chunking changes.

#When not to

Evaluating a plain chat app with no retrieval step — RAGAS's metrics are specifically about how well answers are grounded in retrieved context.

#Example

from ragas import evaluate
from ragas.metrics import faithfulness, answer_relevancy
results = evaluate(dataset, metrics=[faithfulness, answer_relevancy])
print(results)