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.

Usage guide

docs/USAGE.md — install, all 9 evaluators, batch evals, traces, multi-turn patterns, CLI, examples, CI, FAQ.

After pip install, the full guide is on GitHub (linked from PyPI Documentation); the wheel contains code + CLI only.

Install

PyPI:

pip install qapitol-evals-kit==0.1.1
pip install "qapitol-evals-kit[all]==0.1.1"   # 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.1.tar.gz (7.9 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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qapitol_evals_kit-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 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.1.tar.gz
Algorithm Hash digest
SHA256 685bdb8811205b1ba488f127d8df3987892f500323a0403922821fb34e39a77d
MD5 63e98d304e3c437749e976679749d9ee
BLAKE2b-256 64f3c695445a770ae4bf84d2533e47da819d0249d6f6e29e13e1e3f5886577ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for qapitol_evals_kit-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for qapitol_evals_kit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65f0026a634e2767c7571194573ec2e8e30e7e4dad082f938babcda42c0db73d
MD5 c4d983e4bf2f654d9efff150f707935b
BLAKE2b-256 128c4216aad10b44fa28c4b921b68f87fbd75d281814b18325736ee611208f77

See more details on using hashes here.

Provenance

The following attestation bundles were made for qapitol_evals_kit-0.1.1-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