Last verified: 11 August 2026
Target package: RAGAS 0.4.3, released 13 January 2026.
Primary sources:
- RAGAS 0.4.3 on PyPI
- RAGAS v0.3 to v0.4 migration guide
- RAGAS available metrics
- RAGAS model customization and Azure OpenAI
- RAGAS evaluation schema
| Concern | Interface used in this repository |
|---|---|
| Metric import | ragas.metrics.collections |
| Async score call | await metric.ascore(**metric_inputs) |
| Result | MetricResult.value, with optional MetricResult.reason |
| Dataset fields | user_input, retrieved_contexts, response, reference |
| Judge factory | ragas.llms.llm_factory() |
| Embedding factory | ragas.embeddings.base.embedding_factory() |
| Azure provider | LiteLLM with azure/<deployment-name> |
from ragas.metrics import ...for the legacy metric classessingle_turn_ascore(sample)- the old
ground_truthsfield LangchainLLMWrapperandLangchainEmbeddingsWrapper- the v0.3
evaluate(dataset=..., metrics=...)orchestration pattern AnswerSimilarity; the current replacement isSemanticSimilarityContextUtilizationas the main context-quality name; this project usesContextPrecisionwith a reference. RAGAS retainsContextUtilizationas a wrapper for context precision without a reference.
The evaluator calls Collections metrics directly because this keeps metric inputs explicit,
returns the modern MetricResult, and lets applications decide how to store experiments.
RAGAS' @experiment architecture can be added around the same evaluator when its dataset
backends and tracked experiment lifecycle are required.
RAGAS evolves quickly. Keep the exact pin during initial adoption, review migration notes,
and rerun tests/test_ragas_api_contract.py before changing the version.