CAFE is a design-of-experiments platform for RAG, agents, and LLM chains. Declare the factors you want to vary, run them with replication, and attribute quality to the components that actually drive it — with p-values.
[ FACTORIAL ANALYSIS COMPLETE ]
Score |
0.95 | █
0.78 | █ █
0.55 | █ █ █
0.30 | █ █ █ █
+------------
none dense dense+
rerank
Built with
CAFE measures compound systems — it does not implement them. You bring your pipeline as a black box; CAFE runs the experiment around it and tells you what matters.
Declare categorical, ordinal, or continuous factors. CAFE expands full factorial designs automatically, and fractional 2k-p designs when the combinatorial cost gets real — with resolution and alias reporting.
Every configuration runs multiple times to separate real effects from LLM noise. Checkpoints write incrementally: crash at hour 5 of 6 and you resume, not restart. Per-item error isolation keeps one bad cell from killing the study.
Ordinal rubrics get a cumulative-link mixed model (CLMM). Binary pass/fail gets a logistic GLMM. Numeric gets a Gaussian mixed model. Plus partial η² effect attribution, Cohen's d, Pareto frontiers, and Krippendorff's α for judge↔human reliability.
Wrap your system as run(config, item) and list the factors to vary.
Choose full or fractional factorial. Preview the plan and cost before spending tokens.
Run every cell × input × replication. Resume from checkpoints automatically.
LLM judge with transparent prompts, or collect human ratings for calibration.
Get per-factor effects, significance, interactions, and a quality/cost Pareto frontier.
Use it from Python, a notebook, the CLI, or the web platform. The same engine everywhere.
cafe-core with zero core dependenciesimport cafe study = cafe.Study( name="rag-reranker", system=my_rag, factors=[ cafe.Factor("retrieve", ["none", "dense", "dense_rerank"]), cafe.Factor("model", ["small", "large"]), ], dataset=questions, rubric=cafe.rubrics.CORRECTNESS_0_3, judge=cafe.LLMJudge(model="ollama_cloud/gpt-oss:20b"), replications=3, ) result = study.evaluate() # answers → judge → attribution print(result.report())
Browse an actual CAFE evaluation — a HotpotQA RAG study over 18 configurations — in the full web UI. Read-only, no sign-up, backed by real data.
| Config | Mean | η² | p |
|---|---|---|---|
| dense_rerank · large | 2.71 | 0.23 | <0.001 |
| dense · large | 2.45 | 0.05 | <0.001 |
| none · large | 1.98 | - | - |
| dense_rerank · small | 1.62 | - | - |
Join researchers and engineers who want their evaluation to be as rigorous as their model training. Star the repo, read the docs, or cite the paper.