Skip to main content

Local BYOK LLM and RAG evaluation metrics (Qapitol Evals Kit)

Project description

qapitol-evals-kit

Local BYOK LLM and RAG evaluation metrics from Qapitol. Your data never leaves your machine.

Install

PyPI (after publish setup):

pip install qapitol-evals-kit==0.1.0
pip install "qapitol-evals-kit[all]==0.1.0"   # OpenAI + Anthropic judges

From source (development):

pip install -e ".[dev,all]"

From GitHub (fallback):

pip install "qapitol-evals-kit @ git+https://github.com/QapitolAI/qapitol-evals-kit@v0.1.0"
pip install "qapitol-evals-kit @ git+https://github.com/QapitolAI/qapitol-evals-kit.git@main"

Repo: github.com/QapitolAI/qapitol-evals-kit · Releases: v0.1.0 · PyPI: qapitol-evals-kit

Quick start (no API key)

from qapitol.evals import ExactMatchEvaluator

score = ExactMatchEvaluator().evaluate({
    "output": "Paris",
    "expected": "Paris",
})
print(score.score, score.label)  # 1.0 match

Quick start (LLM judge)

export OPENAI_API_KEY=sk-...
from qapitol.evals import CoherenceEvaluator
from qapitol.evals.llm import LLM

llm = LLM(provider="openai", model="gpt-4o-mini")
score = CoherenceEvaluator(llm).evaluate({
    "input": "What is RAG?",
    "output": "RAG retrieves context then generates an answer.",
})
print(score.score, score.label, score.explanation)

CLI

qapitol-evals doctor
qapitol-evals run --metric coherence --input "What is AI?" --output "AI is ..."

Metrics (v0.1.0)

Type Evaluators
Code ExactMatchEvaluator, CustomAccuracyEvaluator
LLM Coherence, Relevance, Correctness, Hallucination, Toxicity
RAG Faithfulness, Answer Relevancy

Test

ruff check src tests
pytest tests/ -v

For agents working on this repo, see agent.md.

License

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

qapitol_evals_kit-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

qapitol_evals_kit-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file qapitol_evals_kit-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for qapitol_evals_kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88854381f7c5f56077d5ec437a7492e53ec5760478cab3ea5693bdcf51e28fb2
MD5 0757d075ffac91439f19bcfa1afb1c7f
BLAKE2b-256 0d92463923e5d4e6564da0acb871059e7ca397ffe5a45f390a282d10e78d1d19

See more details on using hashes here.

Provenance

The following attestation bundles were made for qapitol_evals_kit-0.1.0.tar.gz:

Publisher: release.yml on QapitolAI/qapitol-evals-kit

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

File details

Details for the file qapitol_evals_kit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qapitol_evals_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca326415329054ef5ab757a192c65830cd03a6679a7853161247716077162f0
MD5 2c92f6217af44811828678cf242d9f46
BLAKE2b-256 44a0e9157e6e51212a05eedab4e5d238687f228af7569a0f49a813dacd634411

See more details on using hashes here.

Provenance

The following attestation bundles were made for qapitol_evals_kit-0.1.0-py3-none-any.whl:

Publisher: release.yml on QapitolAI/qapitol-evals-kit

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