evalsmith-mcp

v0.1.0
io.github.diegoperezg7/evalsmith-mcp Checked 2 days ago Published 1 month ago

Evaluate RAG retrieval, agent tool calls and prompt regressions with deterministic metrics.

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

evaluate_retrieval Evaluate retrieval

Score a ranked retrieval run against relevance judgements (qrels). Returns recall@k, precision@k, nDCG@k (graded, linear gain), hit rate@k and MRR, averaged over judged queries, plus per-query values. Deterministic; no model calls.

ParameterTypeDescription
qrels *objectRelevance judgements: { queryId: { docId: grade } }. Grade 0 means not relevant; higher grades are more relevant (used by nDCG). Example: { "q1": { "d3": 2, "d7": 1 } }
run *objectRanked retrieval output: { queryId: [docId, ...] }, best match first. Example: { "q1": ["d7", "d3", "d9"] }
karrayCut-offs to evaluate. Defaults to [1, 3, 5, 10].

compare_configs Compare retrieval configurations

Compare 2-3 retrieval configurations on the same qrels. Ranks them on a primary metric, attaches seeded paired-bootstrap confidence intervals, and says whether the winner's lead over the runner-up is significant (interval of the gap excludes zero).

ParameterTypeDescription
configs *arrayTwo or three runs over the same queries.
qrels *objectRelevance judgements: { queryId: { docId: grade } }. Grade 0 means not relevant; higher grades are more relevant (used by nDCG). Example: { "q1": { "d3": 2, "d7": 1 } }
bootstrapobjectPaired bootstrap over queries. Defaults: 1000 samples, seed 42, 95% confidence.
karrayCut-offs to evaluate. Defaults to [1, 3, 5, 10].
metricstringPrimary metric that decides the winner, e.g. ndcg@10, recall@5, mrr.

check_tool_calls Check agent tool calls

Compare an agent's tool-call trace with the expected calls: right tool, right order (strict or lax) and arguments that satisfy exact / regex / subset / any matchers. Returns a pass flag, a score and a reason for every mismatch.

ParameterTypeDescription
expected *arrayExpected calls. Argument matchers: {"type":"exact","value":...}, {"type":"regex","pattern":"..."}, {"type":"subset","value":{...}}, {"type":"any"}.
trace *arrayTool calls the agent made, in order.
orderstringstrict: the trace must be exactly the expected calls, in order. lax: every expected call must appear somewhere; order and extra calls are allowed.

detect_prompt_regression Detect prompt regression

Run a golden set's deterministic checks (exact, regex, contains, JSON Schema, length) against baseline and candidate outputs. A regression is a case that passes on baseline and fails on candidate. An LLM judge can be enabled per call for a second opinion; the verdict only depends on the checks.

ParameterTypeDescription
baseline *objectOutputs of the current prompt/model, keyed by case id.
candidate *objectOutputs of the proposed prompt/model, keyed by case id.
golden *arrayGolden cases with deterministic checks.
judgeobjectOptional pairwise LLM judge on the server's configured OpenAI-compatible endpoint (e.g. Ollama). Off by default; it never changes the verdict.

generate_report Generate report

Turn the results of the other evalsmith tools into a Markdown summary, a JSON document or JUnit XML for CI dashboards. Optional gates (metric -> minimum) decide the overall pass/fail.

ParameterTypeDescription
comparisonobjectstructuredContent of compare_configs.
formatstring
gatesobjectMinimum values, e.g. { "recall@5": 0.8, "tool_calls": 1 }.
namestring
regressionobjectstructuredContent of detect_prompt_regression.
retrievalobjectstructuredContent of evaluate_retrieval.
toolCallsobjectstructuredContent of check_tool_calls.