Pre-release
This release is a pre-release and may not be stable for production use.
DeepEvalClient
A lightweight Python client for interacting with the Evaluation API. It provides convenient wrappers for text and schema evaluation endpoints, with support for background jobs and probabilistic execution.
Features
- 🔹 Text Evaluation – Run evaluations on plain text inputs.
- 🔹 Schema Evaluation – Evaluate structured inputs against schema-based metrics.
- 🔹 Background Jobs – Submit jobs asynchronously and process later.
- 🔹 Probabilistic Execution – Run evaluations with a configurable chance (e.g., A/B testing scenarios).
- 🔹 Robust Error Handling – Handles network errors and invalid JSON gracefully.
- 🔹 Configurable – Configure via constructor args, environment variables, or external settings module.
Installation
pip install rakam-eval-sdk
Usage
- Basic Setup
from deepeval.client import DeepEvalClient
from deepeval.schema import TextInputItem, MetricConfig
client = DeepEvalClient(
base_url="http://localhost:8080",
api_token="your-api-key"
)
- Text Evaluation
client.maybe_text_eval_background(
component="ocr",
data=[
TextInputItem(
id="runtime evaluation", # identifiar (that can be unique). use same id in case you want to follow performance over time
input="...", # input given to ai component
output="...", # output of the ai component
# optional args/ condtional based on metrics passed
expected_output=["..."],
retrieval_context=[
["..."]
]
)
],
metrics=[
ToxicityConfig(
# model="gpt-4.1",
threshold=0.2,
include_reason=False
),
CorrectnessConfig(
steps=[
"You are evaluating text extracted from resumes and job descriptions using OCR.",
"1. Verify that the extracted text is coherent and free of major corruption (e.g., broken words, random characters).",
"2. Check whether key resume/job-related fields are preserved correctly (e.g., name, job title, skills, education, experience, company name, job requirements).",
"3. Ensure that important details are not missing or replaced with irrelevant content.",
"4. Ignore minor formatting issues (line breaks, spacing) as long as the information is readable and accurate.",
"5. Consider the output correct if it faithfully represents the resume or job description’s main information."
],
params=["actual_output"],
)
],
chance=.3
)
- Schema Evaluation
client.maybe_text_eval_background(
component="ocr",
data=[
TextInputItem(
id="runtime evaluation", # identifiar (that can be unique). use same id in case you want to follow performance over time
input="...", # input given to ai component
output="...", # output of the ai component
# optional args/ condtional based on metrics passed
expected_output=["..."],
retrieval_context=[
["..."]
]
)
],
metrics=[
ToxicityConfig(
# model="gpt-4.1",
threshold=0.2,
include_reason=False
),
CorrectnessConfig(
steps=[
"You are evaluating text extracted from resumes and job descriptions using OCR.",
"1. Verify that the extracted text is coherent and free of major corruption (e.g., broken words, random characters).",
"2. Check whether key resume/job-related fields are preserved correctly (e.g., name, job title, skills, education, experience, company name, job requirements).",
"3. Ensure that important details are not missing or replaced with irrelevant content.",
"4. Ignore minor formatting issues (line breaks, spacing) as long as the information is readable and accurate.",
"5. Consider the output correct if it faithfully represents the resume or job description’s main information."
],
params=["actual_output"],
)
],
chance=.3
)
Configuration
The client can be configured in multiple ways:
Directly via constructor arguments
DeepEvalClient(base_url="http://api", api_token="123")
Environment variables
export EVALFRAMEWORK_URL=http://api
export EVALFRAMWORK_API_KEY=123
Settings module
import settings # it can be django settings e.g.: from django.conf import settings
client = DeepEvalClient(settings_module=settings)
Release files for rakam-cli 0.2.4rc6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rakam_cli-0.2.4rc6.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rakam_cli-0.2.4rc6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.5 kB
Release files / rakam_cli-0.2.4rc6.tar.gz
| Download URL | rakam_cli-0.2.4rc6.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fceba0922923b97693377031dd5dfb76c0170c9397133468c93763d93a80ec8
|
|
BLAKE2b-256 checksum How to use checksums |
8b64eeb9e286b5b9f0734886e30bf9c81f5f94f82f86790df408cc9155e21734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.6
|
Release files / rakam_cli-0.2.4rc6-py3-none-any.whl
| Download URL | rakam_cli-0.2.4rc6-py3-none-any.whl |
|---|---|
| Size | 25.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
721f902466ae2e129723efd0e2f606227aa7892c9b862577e6c9e27d65caa064
|
|
BLAKE2b-256 checksum How to use checksums |
50ffed92de73687264c45b0c4975312e0104d9271b56dd7a32cd0b2aa5cd48c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.6
|