Community연구 & 데이터 분석github.com

explodinggradients/ragas

자율적인 다중 소스 에이전트 내부에서 직접 Retrieval Augmented Generation 파이프라인을 평가할 수 있게 도와주는 프레임워크입니다.

ragas란 무엇인가요?

Ragas는 RAG(Retrieval Augmented Generation) 파이프라인의 성능을 평가하기 위한 오픈소스 프레임워크입니다. 자율 에이전트와 다중 소스 환경에서 RAG 시스템의 정확성, 관련성, 충실도 등의 주요 지표를 측정하여 개발자가 파이프라인을 최적화할 수 있도록 지원합니다. Claude Code, Cursor, Codex 등 다양한 AI 에이전트 플랫폼과 통합되어 사용될 수 있으며, JSON 또는 YAML 형식의 설정을 통해 평가 기준을 유연하게 정의할 수 있습니다. Ragas는 검색된 문서의 질, 생성된 응답의 정확성, 그리고 전체 파이프라인의 일관성을 자동으로 평가함으로써, 수동 평가에 비해 시간과 비용을 크게 절감해줍니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add explodinggradients/ragas

Installed? Explore more 연구 & 데이터 분석 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

ragas은(는) 무엇을 하나요?

자율적인 다중 소스 에이전트 내부에서 직접 Retrieval Augmented Generation 파이프라인을 평가할 수 있게 도와주는 프레임워크입니다.

개요

Ragas는 RAG 시스템을 평가하기 위한 종합적인 프레임워크로, 다음과 같은 주요 기능을 제공합니다:

  • 자동 평가: 수동 개입 없이 RAG 파이프라인의 성능을 자동으로 측정
  • 다중 지표: 정확성, 관련성, 충실도 등 다양한 평가 지표 지원
  • 에이전트 통합: Claude Code, Cursor, Codex 등 AI 에이전트와 원활한 통합
  • 설정 가능성: JSON/YAML 설정 파일을 통한 유연한 평가 기준 정의

설치

pip install ragas

또는 소스에서 설치:

git clone https://github.com/explodinggradients/ragas.git
cd ragas
pip install -e .

사용법

기본 평가

from ragas import evaluate
from ragas.metrics import faithfulness, answer_relevancy, context_precision

# 데이터 준비
dataset = {
    "question": ["What is RAG?"],
    "answer": ["RAG stands for Retrieval Augmented Generation."],
    "contexts": [["RAG is a technique that combines retrieval and generation."]],
}

# 평가 실행
results = evaluate(dataset, metrics=[faithfulness, answer_relevancy, context_precision])
print(results)

에이전트와 통합

# 예: Claude Code와 함께 사용
from claude_code import ClaudeCodeAgent
from ragas import evaluate

agent = ClaudeCodeAgent()
response = agent.query("Explain the RAG architecture")

# 평가 지표 계산
scores = evaluate(
    {"question": ["Explain the RAG architecture"],
     "answer": [response.text],
     "contexts": [response.contexts]}
)

지원 플랫폼

  • Claude Code
  • Cursor
  • Codex
  • 기타 AI 에이전트

설정 옵션

옵션설명기본값
metrics평가 지표 목록["faithfulness"]
threshold통과 기준 점수0.7
output_format결과 출력 형식"json"

참고 자료

라이선스

Apache 2.0

관련 스킬