Evaluation Framework SDK
Project description
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)
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
rakam_eval_sdk-0.2.4rc10.tar.gz
(19.9 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 rakam_eval_sdk-0.2.4rc10.tar.gz.
File metadata
- Download URL: rakam_eval_sdk-0.2.4rc10.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f8e3edfe23b88b90cbcbe2c424b2abb42a14f3eedea608388355ba9fdb4defa
|
|
| MD5 |
219147d316d5e1fa621137651ca205e0
|
|
| BLAKE2b-256 |
ba49880aa6a833b01519ff68e48dd8001a1d3e3e3c1e215740c3a3ef63963096
|
File details
Details for the file rakam_eval_sdk-0.2.4rc10-py3-none-any.whl.
File metadata
- Download URL: rakam_eval_sdk-0.2.4rc10-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd96ef2be9427846342fd0b4b3c342e38d2286a1a8f936a194150e5c46254d4a
|
|
| MD5 |
67aa22e069cf3eaf697153405f2926e1
|
|
| BLAKE2b-256 |
71846f3fcea63886e913ee53aca0ae5011dbe2d6706a22b313355e6277fa5a11
|