█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Judgeval

AI एजेंट्स को ट्रेस करने और agent judges से उनके व्यवहार का स्कोर निकालने वाला ओपन सोर्स SDK

Observability & LLMOpsओपन सोर्स
भाषा
Python
लाइसेंस
Apache-2.0
$pip install judgeval openai python-dotenv
संक्षेप में

Judgeval क्या है?

Judgeval AI एजेंट्स को ट्रेस करने और agent judges से उनके व्यवहार का स्कोर निकालने वाला ओपन सोर्स SDK. यह Evaluation & Production Ops टूल्स की Observability & LLMOps श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और Apache-2.0 लाइसेंस के तहत है। शुरू करने के लिए: judgeval इंस्टॉल करें.

सारांश

Judgeval, Judgment Labs का ओपन सोर्स Python SDK है, जो प्रोडक्शन में पहुँच चुके AI agents को बेहतर बनाने के लिए बना है। इसका README इसे LLM-powered applications के लिए tracing और agent-judge evaluation बताता है: आप अपने agent को इंस्ट्रुमेंट करते हैं, हर run एक trace के रूप में रिकॉर्ड होता है, और judges उन traces को स्कोर करते हैं ताकि आप failures पहचान सकें, समझ सकें कि क्या गलत हुआ, और शिप करने से पहले किसी fix को असली प्रोडक्शन cases पर जाँच सकें।

Tracing OpenTelemetry पर आधारित है। आप functions को `@Tracer.observe()` से decorate करते हैं और अपने model client को wrap करते हैं, और Judgeval inputs, outputs तथा LLM token usage को एक agent root के अंतर्गत spans के रूप में कैप्चर करता है। Auto-instrumentation OpenAI, Anthropic, Google GenAI और Together AI को कवर करता है, और LangGraph, OpenLit तथा Claude Agent SDK के लिए framework support है; docs में OpenAI Agents SDK, Google ADK, Vercel AI SDK, LiveKit और Pipecat जैसे और integrations भी सूचीबद्ध हैं।

Judge detail page for a binary Helpfulness Scorer showing its prompt, choices and an assistant panel suggesting prompt improvements
A binary agent judge: its prompt, its Yes/No choices and the in-app agent offering to tighten the rubric.Judgment docs ↗

Agent judges prompt-based scorers हैं, जिन्हें आप एक बार परिभाषित करते हैं और बड़े पैमाने पर चलाते हैं। हर judge एक trace को संरचित, लेबल वाले व्यवहार में बदलता है, और ये व्यवहार मिलकर एक searchable रिकॉर्ड बनाते हैं कि आपके agent ने कैसे काम किया। Judges online monitoring के ज़रिए server-side पर live production traffic को स्कोर कर सकते हैं (regressions के लिए Slack alerts के साथ), या historical traces पर replay किए जा सकते हैं। Traces और judges hosted Judgment platform में रहते हैं, इसलिए quickstart के लिए Judgment account, API key और organization ID चाहिए; SDK में CLI, MCP server और read-only SQL API से भी platform तक पहुँचा जा सकता है।

यह क्या करता है

  • `@Tracer.observe()` के ज़रिए OpenTelemetry-आधारित tracing, जो inputs, outputs और LLM token usage कैप्चर करती है
  • Prompt-based agent judges, जो traces को स्कोर किए गए, लेबल वाले व्यवहार में बदलते हैं
  • Online monitoring, जो server-side पर live production traffic को Slack alerts के साथ स्कोर करती है
  • Historical traces पर judges का replay, ताकि shipping से पहले fix की जाँच हो सके
  • OpenAI, Anthropic, Google GenAI और Together AI के लिए auto-instrumentation, साथ में LangGraph, OpenLit और Claude Agent SDK support
  • `Judgeval.sql()` के साथ trace data पर read-only SQL queries, और साथ में एक companion CLI और MCP server

शुरू करें

ये steps Judgment docs के quickstart का पालन करते हैं: SDK इंस्टॉल करें, उसे अपने Judgment project से जोड़ें, एक agent path को trace करें, फिर Judgment app में एक judge जोड़ें।

Judgeval इंस्टॉल करें

SDK को example में इस्तेमाल होने वाले OpenAI client और python-dotenv के साथ इंस्टॉल करें। Docs में `npm install judgeval openai` से इंस्टॉल होने वाला एक TypeScript package भी दिया गया है।

bashbash
pip install judgeval openai python-dotenv

अपने credentials सेट करें

एक Judgment account और project बनाएँ, Settings > Account & API Key से API key कॉपी करें, और उसे organization ID तथा ठीक project name के साथ सेट करें।

टेक्स्टटेक्स्ट
JUDGMENT_API_KEY="your_judgment_api_key"
JUDGMENT_ORG_ID="your_organization_id"
JUDGMENT_PROJECT_NAME="your_exact_project_name"
OPENAI_API_KEY="your_openai_api_key"

एक agent path को trace करें

Wrapped clients बनाने से पहले tracer initialise करें, user-visible काम के चारों ओर एक `agent` span रखें और tool व model calls उसके child बन जाएँगे। इसे `python trace_agent.py` से चलाएँ।

pythonpython
import os

from dotenv import load_dotenv
from judgeval import Tracer
from openai import OpenAI

load_dotenv()
Tracer.init(project_name=os.environ["JUDGMENT_PROJECT_NAME"])
openai = Tracer.wrap(OpenAI())


@Tracer.observe(span_type="tool", span_name="retrieve_context")
def retrieve_context(question: str) -> str:
    return f"Reference material relevant to: {question}"


@Tracer.observe(span_type="agent", span_name="run_agent")
def run_agent(question: str) -> str:
    context = retrieve_context(question)
    response = openai.chat.completions.create(
        model="gpt-5.2",
        messages=[{
            "role": "user",
            "content": f"Question: {question}\n\nContext: {context}",
        }],
    )
    return response.choices[0].message.content


if __name__ == "__main__":
    print(run_agent("What is the capital of the United States?"))
    Tracer.shutdown()

Trace की जाँच करें

अपने Judgment project में Logs > Traces खोलें और सबसे नया `run_agent` trace देखें। इसमें एक `run_agent` root, एक `retrieve_context` tool span और उसके नीचे एक model span दिखना चाहिए, जिसकी duration पूरी हो चुकी हो।

Judgment trace view with a run_agent span tree, a timing waterfall, span input and output, and a Behaviors panel
A traced run_agent call: the span tree and waterfall on the left, the selected span's input and output in the middle.Judgment docs ↗

Agent judge बनाएँ और monitor करें

Judges > New Judge खोलें, Create manually और Binary चुनें, उसका नाम `Uses retrieved context` रखें और नीचे दिया prompt डालें। फिर 100% sampling के साथ Continuous evaluation वाला Set up monitoring इस्तेमाल करें, agent को दोबारा चलाएँ, और trace के Behaviors panel में judge का फ़ैसला और तर्क पढ़ें।

टेक्स्टटेक्स्ट
Return true when the agent retrieves context before answering the user.
Return false when it answers without retrieving context.

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • Production agent के tool और model calls को trace करके वह step ढूँढना जहाँ से गलत जवाब शुरू हुआ
Judgment Agent answering a request to find high-latency traces with a ranked table of traces, span names and durations
Asking the in-app Judgment Agent for the slowest traces returns a ranked table with the span that drove each one.Judgment docs ↗
  • Judge से live agent traffic को लगातार स्कोर करना और किसी व्यवहार में regression आने पर Slack alert पाना
  • Historical traces पर judge को replay करके shipping से पहले prompt या code fix की पुष्टि करना
  • Script, CLI या MCP के ज़रिए coding agent से read-only SQL द्वारा trace history query करना

How Judgeval compares

Judgeval alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Langfuse★ 38.1kLLM ऐप्स के लिए ओपन सोर्स observability, prompt management और evals
Opik★ 23.6kLLM और एजेंट ऐप्स के लिए ओपन सोर्स ट्रेसिंग, इवैल्यूएशन और मॉनिटरिंग
RagaAI Catalyst★ 16.2kएक Python SDK जो एक ही प्लेटफ़ॉर्म से LLM और agent ऐप्स को ट्रेस, इवैल्यूएट और गार्ड करता है
CodeBurn★ 12k41 AI कोडिंग टूल्स में लोकल टोकन और लागत का हिसाब
TensorZero★ 11.7kओपन सोर्स LLMOps स्टैक: एक गेटवे, साथ में ऑब्ज़र्वेबिलिटी, मूल्यांकन और ऑप्टिमाइज़ेशन
Evidently★ 8.1kप्रयोग से प्रोडक्शन तक ML और LLM सिस्टम का evaluation, testing और monitoring करें
Star Office UI★ 7.6kपिक्सल-आर्ट ऑफ़िस जो दिखाता है कि आपका AI एजेंट अभी क्या कर रहा है, लाइव
Judgeval★ 1.1kAI एजेंट्स को ट्रेस करने और agent judges से उनके व्यवहार का स्कोर निकालने वाला ओपन सोर्स SDK