Quick-reference · Release Gates · Production Risk · Signals · Logging · Sampling · Platform Config · Self-Improving Loop
Golden dataset + LLM-as-Judge scores compared to human scores, before deployment → classic offline eval.
Threshold e.g. 95%. Score ≥ threshold → deploy. Below → block / keep old version. Automatable in CI/CD.
Same dataset + same pipeline across versions → fair comparison.
Improving one behavior shouldn't quietly break another.
| Change | Also Check |
|---|---|
| System prompt | Pricing accuracy, relevance |
| LLM model | Latency, cost, safety |
| Vector DB | Answer quality, latency |
| Reranker | Faithfulness, prior cases |
Course launch → thousands of concurrent users → latency spike never seen offline. Bias patterns visible only across thousands of convos.
Real-world data/behavior/env changes; frozen eval set stops representing production.
Core Q: "Is it behaving normally right now?"
| Offline | Online | |
|---|---|---|
| When | Pre-deploy | Post-deploy, continuous |
| Data | Fixed golden set | Live traffic |
| Answer key | Usually yes | Usually no |
| Best for | Gate/compare/regress | Drift/anomaly detect |
| Cost | Cheap, repeatable | Can get expensive |
Production-grade systems need both — online is not a replacement.
Scores usually 500–700. Week 5 suddenly 800–900 → not proof of error, but a trigger to investigate.
Already available — log directly.
Need an evaluator.
| Identity | Conv/turn/user/session ID, ts |
| Input | User message |
| RAG | Retrieved context |
| Output | Model response |
| Ops | Latency, tokens, cost |
| Behavior | Feedback, escalation |
Platform example: LangSmith stores traces w/ inputs, outputs, metadata.
Aggregates signals over windows (1h/24h/week). Aggregate trend > single conversation.
Automates threshold-violation detection since engineers can't watch dashboards 24/7.
Judge inputs: question, context, answer, rubric.
| Reference-Based | Reference-Free |
|---|---|
| Known answer key | No fixed answer for this case |
| Typical offline setup | Typical online setup |
| UPSC vs human grading | Answer supported by context? |
Randomly pick a subset. Simple, but risky conversations may be under-represented.
Sample more from high-risk categories, not uniformly.
Supports tracing, dashboards, alerts, datasets, offline experiments, online evaluators, judge templates.
Evaluator type ≠ mode; the data it runs on decides the mode.
Real failures get annotated & folded back → next release tested against real + historical cases.
| Offline | Pre-deploy, controlled, gate/compare/regress |
| Online | Post-deploy, live, drift/anomaly detect |
| Drift | Env/data changed vs frozen eval set |
| Captured | Logged directly (latency, cost…) |
| Computed | Needs evaluator (hallucination…) |
| Correctness | Right vs reference |
| Normality | Matches healthy baseline |
| Stratified sampling | Oversample high-risk convos |
| Self-improving loop | Prod failures → dataset → better releases |