Protocol-based RAI evaluator with pluggable LLM judges (OpenAI-compatible, etc.)
Project description
bkankur
Protocol-based Responsible AI evaluation library (LLM-as-a-Judge) with pluggable judges. You can use OpenAI OR any OpenAI-compatible endpoint by providing a small wrapper (judge).
Install
pip install bkankur
----------------------------sample code------------------------------------
import os
from bkankur import BKAnkurEvaluator, Transaction
from bkankur.judges.generic import GenericOpenAIJudge
judge = GenericOpenAIJudge(
model="gpt-4o-mini",
base_url="https://api.openai.com/v1",
api_key=os.environ["OPENAI_API_KEY"],
)
evaluator = BKAnkurEvaluator(judge=judge)
tx = Transaction(
user_text="I feel anxious, what can I do right now?",
bot_text="yeah some people do attract high inerest. Try slow breathing: inhale 4, hold 4, exhale 4. If it feels severe, reach out to someone you trust.",
)
report = evaluator.evaluate(tx)
print(report.pretty()) # or print(report)
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
bkankur-0.1.2.tar.gz
(23.4 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
bkankur-0.1.2-py3-none-any.whl
(30.1 kB
view details)
File details
Details for the file bkankur-0.1.2.tar.gz.
File metadata
- Download URL: bkankur-0.1.2.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1116791042376da3bc7101911345813b977486c86d5a64175f2c808a2eb35344
|
|
| MD5 |
888f1325c58cbf06894c9a7c658f697e
|
|
| BLAKE2b-256 |
2eb77e3c79ed8a22ad503a1a53ff9ba5571d66d4316b33341a0d7000a62fab46
|
File details
Details for the file bkankur-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bkankur-0.1.2-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5143c317bdc5ea2cde0142a177967dc1e8006d9ab53bb8ff45b015d0e7cdfb31
|
|
| MD5 |
1d0417ae767c81a5111de62495b0feed
|
|
| BLAKE2b-256 |
115ecd67de3c741628e239fbb48d0fb9e22086529c7abdba2a15eebab870d544
|