Open source · Promptfoo

Benchmark multi-agent RAG chat APIs the way they actually behave

Login, create a chat, ask a specialized agent, parse a streamed response, grade it semantically against a reference answer, and get a report — fully self-contained, zero real credentials required to try it.

License: MIT Node >= 18 Built with Promptfoo
Pipeline diagram: Manual Trigger, Load Dataset, Login, Create Chat, Ask Agent, Parse Stream, Grade Answer, Export Report, each marked complete, ending in an Execute workflow button.
6
specialized agents
HR · Legal · Finance · IT · Sales · General
120
benchmark Q&A pairs
bundled sample dataset
0
real credentials needed
fully self-contained mock API
~72%
baseline pass rate
realistic, non-trivial mock answers

Built for how RAG chat APIs actually behave

Not a toy prompt-in, text-out eval — the full login → stream → grade lifecycle.

Multi-agent routing

One dataset, six specialized agents — resolved per-row, per-run, or per-environment, with no code changes.

Real streaming, not text()

Consumes chunked NDJSON incrementally via getReader(), matching how production chat APIs actually stream.

Semantic grading

An LLM rubric grades intent and key facts against a reference answer, not brittle string matching. 0–100 partial credit.

Environment-driven config

Switch dev → staging → production with one env var, zero file edits. Unknown environments fail fast with a clear error.

Spreadsheet round-trip

Results export back into the original .csv/.xlsx shape — ready to review by anyone, not just someone reading a JSON log.

Zero-setup demo

Ships a fictional mock API and a 120-question dataset, so the whole pipeline runs end-to-end with no real backend.

Quick start

Two terminals, one command each. No real credentials needed to try it.

# terminal 1
npm install
cp .env.example .env        # add your OPENAI_API_KEY, used only for grading
npm run mock-server

# terminal 2
npm run eval                 # runs the full benchmark against it
npm run report               # opens the interactive results viewer