LLM Eval Harness

v1.0.0
io.github.razilzul/llm-eval-harness Checked 4 days ago Published 1 month ago

Run a golden set and gate LLM model swaps on accuracy, with latency and cost per request.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

run_golden_set

Run one model over the golden set. Returns accuracy overall and on trap cases, mean latency and cost per request, and the failing cases.

ParameterTypeDescription
model *stringModel to evaluate, as provider:model, e.g. anthropic:claude-haiku-4-5, gemini:gemini-2.5-flash, mock:strong. Real models bill the API key in .env or the client config.
judgestringOptional judge model, same format. Default mock:judge (exact label match, free). Use a real model for the LLM-as-judge rubric.

compare_models

A/B two models on the golden set and return the gate verdict. The candidate must match or beat the baseline on accuracy, overall and on traps; only then do latency and cost matter.

ParameterTypeDescription
baseline *stringCurrent model, as provider:model, e.g. anthropic:claude-haiku-4-5, gemini:gemini-2.5-flash, mock:strong. Real models bill the API key in .env or the client config.
candidate *stringProposed replacement, as provider:model, e.g. anthropic:claude-haiku-4-5, gemini:gemini-2.5-flash, mock:strong. Real models bill the API key in .env or the client config.
judgestringOptional judge model, same format. Default mock:judge (exact label match, free). Use a real model for the LLM-as-judge rubric.