Skip to main content

RAG evaluation SDK — RAGの回答品質を3行で計測

Project description

rag-eval SDK

RAGアプリの回答品質を3行で計測できるSDKです。

インストール

pip install rageval-sdk

使い方

from rag_eval import track

# 既存のRAGコードに3行追加するだけ
answer = your_rag_system.query(question)
track(
    question=question,
    answer=answer,
    chunks=[{"content": chunk.text, "source": chunk.source} for chunk in retrieved_chunks],
    api_key="rag_eval_xxxx",  # または環境変数 RAG_EVAL_API_KEY
    latency_ms=elapsed_ms,   # 任意
)

非同期版(FastAPI / asyncio)

from rag_eval import atrack

await atrack(
    question=question,
    answer=answer,
    chunks=chunks,
    api_key="rag_eval_xxxx",  # または環境変数 RAG_EVAL_API_KEY
)

セルフホスト版

track(
    question=question,
    answer=answer,
    chunks=chunks,
    api_url="https://your-own-server.com",  # または環境変数 RAG_EVAL_API_URL
    api_key="your-key",
)

環境変数

変数名 説明
RAG_EVAL_API_KEY APIキー
RAG_EVAL_API_URL APIのURL(セルフホスト時)

ライセンス

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rageval_sdk-0.2.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rageval_sdk-0.2.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file rageval_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: rageval_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rageval_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 01cfb1e43f6b5b86e13d9161f74cca6623eedb9a914a64dcc5636809ec12d889
MD5 f795d50dc11b52df5c4aa4627e0abc01
BLAKE2b-256 652fd6d7b94c9389dfad75001101c34b78eec8b8903f04eabfae36f6d68684bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rageval_sdk-0.2.0.tar.gz:

Publisher: sdk-publish.yml on A-1ro/rag-eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rageval_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rageval_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rageval_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 867fbc9e3433997619ca8626ae0897b2a5ab4e7d075c1c9520416675b51121c9
MD5 fc39602f792835507bd97d47ecaa1a74
BLAKE2b-256 befc3bffbfc834a0cb3761bb43364c8bd331da5a248f0ecd447ed88760c52c70

See more details on using hashes here.

Provenance

The following attestation bundles were made for rageval_sdk-0.2.0-py3-none-any.whl:

Publisher: sdk-publish.yml on A-1ro/rag-eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page