Skip to main content

Evaluation Framework Tools

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

  1. 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"
)
  1. 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
            )
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rakam_systems_tools-0.1.0rc1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

rakam_systems_tools-0.1.0rc1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file rakam_systems_tools-0.1.0rc1.tar.gz.

File metadata

File hashes

Hashes for rakam_systems_tools-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 646d3624833fbb981918424593333d1abb124bdab1acdcc06b424757f822132a
MD5 a71a8c27dfa5f7737a27b563d5d5363e
BLAKE2b-256 a0400ef6fdc44c97fca4566690352162e4e230dd75ef63584e5d1cd1facb385a

See more details on using hashes here.

File details

Details for the file rakam_systems_tools-0.1.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for rakam_systems_tools-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 09025a69f26bb000df36fb2d68f56fe78071e82226d7ffc0f17e5b219e4e0f64
MD5 4baf7898115562e333d19ff02b35e872
BLAKE2b-256 14e5f0960a4d3ad7076c407c825769962e48f9bfc5c2f56f53923df1175f9656

See more details on using hashes here.

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