@@ -26,6 +26,10 @@ When iterating on a LangGraph agent, it is hard to know whether a change to a sp
2626pip install evalwire
2727# With LangGraph node-isolation helpers:
2828pip install ' evalwire[langgraph]'
29+ # With LLM-as-a-judge evaluator:
30+ pip install ' evalwire[llm-judge]'
31+ # Everything:
32+ pip install ' evalwire[all]'
2933```
3034
3135---
@@ -60,6 +64,59 @@ evalwire run --experiments experiments/
6064
6165---
6266
67+ ## Built-in evaluators
68+
69+ All factories are importable from ` evalwire.evaluators ` and return a callable with
70+ signature ` (output, expected: dict) -> float | bool ` .
71+
72+ | Factory | Returns | Use case |
73+ | ---| ---| ---|
74+ | ` make_top_k_evaluator(K=20) ` | ` float ` | Position-weighted retrieval scoring |
75+ | ` make_membership_evaluator() ` | ` bool ` | Classification / routing label check |
76+ | ` make_exact_match_evaluator() ` | ` bool ` | Extractive QA, single ground-truth string |
77+ | ` make_contains_evaluator() ` | ` bool ` | Free-text generation, required phrase present |
78+ | ` make_regex_evaluator() ` | ` bool ` | Structured format validation (dates, IDs, …) |
79+ | ` make_json_match_evaluator(keys) ` | ` float ` | Tool-call / structured-output key matching |
80+ | ` make_schema_evaluator(schema) ` | ` bool ` | JSON Schema conformance |
81+ | ` make_numeric_tolerance_evaluator(atol, rtol) ` | ` bool ` | Math / calculation tasks with tolerance |
82+ | ` make_llm_judge_evaluator(model, prompt, schema) ` | ` float\|bool ` | LLM-as-a-judge with structured output |
83+
84+ ### Example
85+
86+ ``` python
87+ from evalwire.evaluators import make_top_k_evaluator, make_exact_match_evaluator
88+
89+ # Drop the factory return value into your experiment directory as the evaluator
90+ top_k = make_top_k_evaluator(K = 5 )
91+ exact = make_exact_match_evaluator()
92+ ```
93+
94+ ### LLM judge
95+
96+ ``` python
97+ from pydantic import BaseModel
98+ from langchain.chat_models import init_chat_model
99+ from evalwire.evaluators import make_llm_judge_evaluator
100+
101+ class Verdict (BaseModel ):
102+ explanation: str
103+ score: bool # True = correct
104+
105+ llm_judge = make_llm_judge_evaluator(
106+ model = init_chat_model(" gpt-4o-mini" ),
107+ prompt_template = (
108+ " Output: {output} \n "
109+ " Expected: {expected_output} \n "
110+ " Is the output correct? Think step by step, then set score."
111+ ),
112+ output_schema = Verdict,
113+ )
114+ ```
115+
116+ Requires ` pip install 'evalwire[llm-judge]' ` .
117+
118+ ---
119+
63120## Node isolation
64121
65122Use ` invoke_node ` to call a single LangGraph node without compiling a full graph:
0 commit comments