Ragas Python Library

The Ragas Python library is the primary surface of the project, installed via `pip install ragas` and imported as `ragas`. It exposes evaluation entry points (`ragas.evaluate`), metric classes (Faithfulness, AnswerRelevancy, ContextPrecision, ContextRecall, FactualCorrectness, SemanticSimilarity, ToolCallAccuracy, AgentGoalAccuracy, and more), dataset generation utilities, and integrations with LangChain and LlamaIndex. The library is not an HTTP API — it is consumed in-process by Python evaluation scripts, notebooks, and CI pipelines.

API entry from apis.yml

apis.yml Raw ↑
aid: ragas-ai:ragas
name: Ragas Python Library
description: The Ragas Python library is the primary surface of the project, installed via `pip install
  ragas` and imported as `ragas`. It exposes evaluation entry points (`ragas.evaluate`), metric classes
  (Faithfulness, AnswerRelevancy, ContextPrecision, ContextRecall, FactualCorrectness, SemanticSimilarity,
  ToolCallAccuracy, AgentGoalAccuracy, and more), dataset generation utilities, and integrations with
  LangChain and LlamaIndex. The library is not an HTTP API — it is consumed in-process by Python evaluation
  scripts, notebooks, and CI pipelines.
humanURL: https://docs.ragas.io/
tags:
- Python
- Library
- Evaluation
- RAG
properties:
- url: https://docs.ragas.io/
  type: Documentation
- url: https://github.com/explodinggradients/ragas
  type: SourceCode
- url: https://pypi.org/project/ragas/
  type: SDK
- url: https://github.com/explodinggradients/ragas/blob/main/LICENSE
  type: License