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
Release history Release notifications | RSS feed
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.1.1.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rageval_sdk-0.1.1.tar.gz.
File metadata
- Download URL: rageval_sdk-0.1.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
933b96e129a7a37e8b51dd1a6c243387735e54ec1747fb83dc6c125d58a32a2a
|
|
| MD5 |
315288320ad7bded89ea1358aa74c37a
|
|
| BLAKE2b-256 |
477a60790e5529eaedea4841d4195f4dc10423f6d0481a8aa97b1e7a84d01293
|
File details
Details for the file rageval_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rageval_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d5a43cb986a47b20d9311603802b79838f6891e55983026afc7c3e24149cb57
|
|
| MD5 |
b518826b53e0d684c21fdc9f08fb37ad
|
|
| BLAKE2b-256 |
9f7593132a3d5ec50a3674e65071954a73417441e2efb75c5044eb1677e93273
|