benchmark-apology-pizza
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@benchmark-apology-pizzarun the apology pizza benchmark with the mock provider"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
benchmark-apology-pizza
AI Benchmark Index · npm · CLI · API · MCP
benchmark-apology-pizza is an open-source AI agent benchmark for pizza support. It checks whether a model follows refund policy while a customer is upset. The grader replays tool calls; no model judges the answer.
npx benchmark-apology-pizza run --model offline --provider mockA real run of version 0.1.0 prints:
# Apology Pizza
- Model: `mock:1`
- Score: **50.0%**
- 95% CI: 35.0%–65.0%
- Tasks: 40The 40 public complaints come from a committed seeded generator. The shop policy was written for this benchmark and does not copy a real restaurant policy.
Install
Node.js 20 or newer is required.
npm install benchmark-apology-pizzaThe package includes TypeScript types. Its two runtime dependencies are benchmark-core and the official Model Context Protocol (MCP) SDK.
Related MCP server: Agent Evaluation and Red-Team Platform
Run a real model
Set your OpenRouter key in the process environment. The package never reads keys from repository files.
export OPENROUTER_API_KEY="your-key"
npx benchmark-apology-pizza run --model openai/gpt-4.1 --provider openrouterA successful run prints 40 task rows, the mean score, and a bootstrap 95% confidence interval. Provider usage, cost, and latency appear when the provider returns them.
For an OpenAI-compatible endpoint, set OPENAI_BASE_URL and OPENAI_API_KEY. Then use --provider openai.
How it works
seeded complaint -> model -> pizza tools -> replayed tool log -> score
| |
simulator state violations + reasonEach episode exposes lookup_order, issue_refund, remake_order, issue_credit, escalate, and message_customer. The simulator starts from the task's order record.
The grader awards four equal checks:
Use the correct remedy class.
Use the exact refund or credit amount.
Verify the exact order before acting.
Send a message after the remedy that states the outcome.
A cap breach, unsafe action, duplicate side effect, mixed remedy, or action before verification scores zero. Each task result lists policyViolations separately.
Why it exists
Customer support agents need more than a polite response. They must choose a permitted remedy and leave the account in the right state.
General chat leaderboards do not inspect side effects. A single prompt test can also miss duplicate refunds and actions hidden behind friendly prose.
Compare
Checked on 2026-10-15.
Property | benchmark-apology-pizza | General chat leaderboard | Ad hoc support prompt |
Target | Pizza policy execution | Broad model quality | One example |
State | Seeded order simulator | Usually none | Usually none |
Grading | Deterministic replay | Varies | Manual |
Safety failures | Force task score to zero | Varies | Easy to miss |
Offline check | Mock provider | Varies | Local prompt only |
Provenance | Source and refresh steps | Varies | Usually absent |
Related work includes τ-bench, which evaluates tool agents in policy-governed domains. This project writes its policy, templates, and task text independently.
Scenario coverage
Scenario | Tasks | Expected remedy |
Wrong topping | 5 | One remake |
Late delivery | 5 | Bounded store credit |
Cold pizza | 5 | One remake |
Missing item | 5 | Bounded item refund |
Customer-supplied wrong address | 5 | $5 courtesy credit |
Allergen mix-up | 5 | Escalation |
Angry repeat customer | 5 | Bounded store credit |
Suspected fraud pattern | 5 | Escalation |
All 40 records are generated from eight reviewed templates. They contain synthetic names, order IDs, prices, and complaints.
Common uses
Model developers: compare tool-use policies against the same order states.
Agent developers: inspect remedy and message failures before changing prompts.
Safety teams: test whether allergen and fraud cases reach a human.
Release teams: run the mock adapter before publishing agent changes.
Researchers: export task rows for error analysis or confidence intervals.
Runtime surfaces
One benchmark definition supplies the SDK, command-line interface, MCP server, and HTTP API.
TypeScript SDK
import { openrouterAdapter } from "benchmark-core";
import { benchmark, run, score } from "benchmark-apology-pizza";
const report = await run(openrouterAdapter({ model: "openai/gpt-4.1" }));
const task = await benchmark.getTask("missing-item-1");
console.log(report.mean, task?.prompt);score(taskId, trace) grades a saved trace without a provider call.
Command-line interface
Commands are list, show <task>, run, score, card, provenance, index-entry, serve, and mcp. Pass --json for machine-readable output.
npx benchmark-apology-pizza show allergen-1
npx benchmark-apology-pizza provenance
npx benchmark-apology-pizza card report.json receipt.svgModel Context Protocol
Start the MCP stdio server:
npx benchmark-apology-pizza mcpIt exposes list_tasks, get_task, score_answer, run_benchmark, and get_provenance.
HTTP API
Import handler from benchmark-apology-pizza/api, or start the Node server:
npx benchmark-apology-pizza serve 3000Routes are GET /health, GET /v1/tasks, GET /v1/tasks/:id, POST /v1/score, GET /v1/provenance, and GET /v1/index-entry.
Data and reproducibility
data/tasks.jsonl holds the public split. Seed 20261015 reproduces it:
node scripts/gen-tasks.mjs --seed 20261015 --split publicGenerate a private evaluation split with an undisclosed seed:
node scripts/gen-tasks.mjs --seed 94721 --split hiddenThe hidden output is gitignored. PROVENANCE.md records the sources, MIT licence, cutoff, retrieval steps, and refresh plan. POLICY.md contains the complete policy.
Limits and known weaknesses
Public tasks can enter training data. Use a private seed for final comparisons.
Eight templates do not cover every support policy or conversational style.
Amounts use whole dollars. The simulator does not model tax or payment rails.
The customer does not reply after the first complaint.
The deterministic grader checks named remedy language, not message warmth.
A model can infer expected behavior from public code. This is an inspectable benchmark, not a secret exam.
Provider retention, pricing, and availability follow the provider's terms.
No public leaderboard exists yet. We do not publish model scores that we did not run.
Development
npm ci
npm run ci:localThe gate rebuilds the package, runs every task, probes every HTTP route, calls every MCP tool, and checks four bad-answer families. It writes artifacts/e2e-report.json.
Status
Version 0.1.0 is alpha. Task schemas and policy details can change before 1.0. Report defects through the GitHub issue tracker. Public case studies are not yet published.
FAQ
What does benchmark-apology-pizza measure?
benchmark-apology-pizza measures policy execution in a small support simulator. It checks verification, remedy choice, amount, escalation, and customer communication.
Can benchmark-apology-pizza run offline?
benchmark-apology-pizza runs end to end with the mock provider and no key. The mock intentionally produces both passing and failing traces.
Which providers work?
benchmark-apology-pizza supports OpenRouter and OpenAI-compatible endpoints through benchmark-core. It also includes the offline mock provider.
Does benchmark-apology-pizza use an LLM judge?
benchmark-apology-pizza does not use a large language model (LLM) judge. It replays the submitted tool log against deterministic state.
Does benchmark-apology-pizza provide a managed service?
benchmark-apology-pizza provides a server and handler that you run. It does not provide a managed benchmark service.
Where do the tasks come from?
benchmark-apology-pizza generates synthetic complaints from eight committed templates. Its policy is human-written and licensed MIT.
Can I use a hidden split?
benchmark-apology-pizza can generate a hidden split with any integer seed. Keep that seed and generated file outside the public repository.
How is benchmark-apology-pizza different from a chat leaderboard?
benchmark-apology-pizza measures one tool-use behavior and checks final simulator state. A chat leaderboard usually combines many capabilities and may not inspect side effects.
What happens after a policy breach?
benchmark-apology-pizza assigns zero for cap, duplicate-action, unsafe-action, mixed-remedy, and verification-order breaches. The row names each detected violation.
License
MIT © Pooria Arab
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
Agent-driven search: build, import, tune, search, and score result quality — all over MCP.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables LLM evaluation and observability by uploading documents, building test sets, running RAG pipelines, and automatically scoring answers for groundedness, hallucination risk, retrieval quality, latency, and cost, with tools exposed to MCP-compatible clients.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables users to run synthetic support-agent evaluations, preserve and inspect traces, score results deterministically, inject failures, and enforce release review gates through MCP tools, resources, and prompts.MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to list and retrieve evaluation tasks, score recorded submissions, run benchmark evaluations via OpenRouter, and access provenance information through MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceExposes MCP tools to list and inspect the 48 harm-ladder tasks, deterministically score a submitted decision trace, run a full evaluation against a mock or real model provider, and retrieve data provenance. This lets developers measure a model's pushback and refusal calibration as plan harm rises, directly from any MCP client.MIT