LLM Readiness Harness: Evaluation, Observability, and CI Gates for LLM/RAG Applications
Organizations: Lumytics
Abstract
We present a readiness harness for LLM and RAG applications that turns evaluation into a deployment decision workflow. The system combines automated benchmarks, OpenTelemetry observability, and CI quality gates under a minimal API contract, then aggregates workflow success, policy compliance, groundedness, retrieval hit rate, cost, and p95 latency into scenario-weighted readiness scores with Pareto frontiers. We evaluate the harness on ticket-routing workflows and BEIR grounding tasks (SciFact and FiQA) with full Azure matrix coverage (162/162 valid cells across datasets, scenarios, retrieval depths, seeds, and models). Results show that readiness is not a single metric: on FiQA under sla-first at k=5, gpt-4.1-mini leads in readiness and faithfulness, while gpt-5.2 pays a substantial latency cost; on SciFact, models are closer in quality but still separable operationally. Ticket-routing regression gates consistently reject unsafe prompt variants, demonstrating that the harness can block risky releases instead of merely reporting offline scores. The result is a reproducible, operationally grounded framework for deciding whether an LLM or RAG system is ready to ship.
Figures & tables
| Span | Purpose | Key attributes |
|---|---|---|
| infer | Root span for the inference request | run_id, dataset_id, pipeline_version, scenario, latency_ms, tokens_in, tokens_out, cost_usd_est |
| route.classify | Route label prediction | ticket_id (hashed), dataset_id, predicted_label, confidence, latency_ms |
| respond.finalize | Escalation decision | ticket_id (hashed), should_escalate, latency_ms |
| rag.retrieve | Retrieval step | top_k, index_id, retrieved_doc_ids, latency_ms |
| rag.generate | LLM generation | model_id, provider, cache_hit, latency_ms |
| validate.policy | Policy checks | pass, violation_types, latency_ms |
| Scenario | Workflow | Policy | Faithfulness | Retrieval | Cost | SLA |
|---|---|---|---|---|---|---|
| cost-first | 0.20 | 0.20 | 0.15 | 0.15 | 0.20 | 0.10 |
| risk-first | 0.15 | 0.25 | 0.20 | 0.15 | 0.10 | 0.15 |
| SLA-first | 0.20 | 0.15 | 0.15 | 0.10 | 0.10 | 0.30 |
| Dataset | Q | JS | Lex | Uniq | Esc | Sch | Pol | Dup | Viol | |
|---|---|---|---|---|---|---|---|---|---|---|
| Template v1 | 4000 | 1.0000 | 0.0000 | 0.0036 | 0.0695 | 0.1923 | 0.0000 | 0.0000 | 0.0000 | 0 |
| LLM augmentation | 500 | 0.9936 | 0.0064 | 0.0898 | 0.3960 | 0.2040 | 0.0000 | 0.0000 | 0.0000 | 1 |
| Scenario | Model | k | Seed | Score | Faithfulness | Hit@k | Cost ($) | p95 latency (ms) |
|---|---|---|---|---|---|---|---|---|
| Risk-first | gpt-4.1-mini | 10 | 1337 | 0.664 | 0.567 | 0.900 | 0.0200 | 3513 |
| Risk-first | gpt-4.1-mini | 10 | 42 | 0.685 | 0.644 | 0.883 | 0.0205 | 3479 |
| Risk-first | gpt-4.1-mini | 3 | 1337 | 0.741 | 0.539 | 0.783 | 0.0075 | 3721 |
| Risk-first | gpt-4.1-mini | 3 | 2024 | 0.749 | 0.515 | 0.850 | 0.0076 | 3419 |
| Risk-first | gpt-4.1-mini | 3 | 42 | 0.801 | 0.700 | 0.817 | 0.0077 | 4093 |
| Risk-first | gpt-4.1-mini | 5 | 1337 | 0.765 | 0.674 | 0.833 | 0.0111 | 3344 |
| Scenario | k | Seed | Retriever | Reranker | Hit@k | Faithfulness | p95 latency (ms) |
|---|---|---|---|---|---|---|---|
| SLA-first | 5 | 2024 | bm25 | off | 0.850 | 0.479 | 3054 |
| SLA-first | 5 | 2024 | bm25 | on | 0.812 | 0.525 | 2859 |
| SLA-first | 5 | 2024 | dense | off | 0.812 | 0.470 | 3392 |
| SLA-first | 5 | 2024 | dense | on | 0.800 | 0.481 | 3229 |
| Dataset | Model | Scenario | k | Runs | Faith. | Hit@k | p95 |
|---|---|---|---|---|---|---|---|
| FiQA | gpt-4.1 | Cost-first | 3 | 3 | 0.65 0.04 | 0.53 0.08 | 3487 139 |
| FiQA | gpt-4.1 | Cost-first | 5 | 3 | 0.65 0.06 | 0.57 0.06 | 3695 494 |
| FiQA | gpt-4.1 | Risk-first | 3 | 3 | 0.65 0.01 | 0.53 0.08 | 3953 264 |
| FiQA | gpt-4.1 | Risk-first | 5 | 3 | 0.67 0.06 | 0.57 0.06 | 3476 271 |
| FiQA | gpt-4.1 | SLA-first | 3 | 3 | 0.61 0.04 | 0.53 0.08 | 3352 113 |
| FiQA | gpt-4.1 | SLA-first | 5 | 3 | 0.67 0.05 | 0.57 0.06 | 3581 447 |
| Dataset | Variant | Workflow | Policy | Routing | p95 (ms) | Gate |
|---|---|---|---|---|---|---|
| CS | bias | 0.03 | -0.08 | 0.07 | -120 | fail |
| CS | policy | -0.27 | -0.97 | 0.07 | -371 | fail |
| IT | bias | -0.03 | -0.02 | -0.01 | -293 | fail |
| IT | policy | -0.33 | -0.93 | 0.02 | 13 | fail |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Scenario | Model | k | Seed | Hit@k | Faithfulness | Score | p95 latency (ms) |
|---|---|---|---|---|---|---|---|
| SLA-first | gpt-4.1-mini | 3 | 42 | 0.817 | 0.727 | 0.860 | 3475 |
| SLA-first | gpt-5.2 | 3 | 42 | 0.817 | 0.686 | 0.847 | 6455 |
| SLA-first | gpt-4.1 | 3 | 42 | 0.817 | 0.628 | 0.837 | 3033 |
| SLA-first | gpt-4.1 | 5 | 42 | 0.833 | 0.752 | 0.837 | 3313 |
| SLA-first | gpt-5.2 | 3 | 2024 | 0.850 | 0.597 | 0.833 | 8075 |
| SLA-first | gpt-4.1-mini | 5 | 42 | 0.833 | 0.724 | 0.830 | 3379 |
| Scenario | Model | k | Seed | Hit@k | Faithfulness | Score | p95 latency (ms) |
|---|---|---|---|---|---|---|---|
| SLA-first | gpt-4.1-mini | 3 | 1337 | 0.617 | 0.713 | 0.829 | 3890 |
| SLA-first | gpt-4.1-mini | 5 | 42 | 0.567 | 0.848 | 0.824 | 3977 |
| SLA-first | gpt-4.1-mini | 5 | 1337 | 0.633 | 0.775 | 0.818 | 4075 |
| SLA-first | gpt-4.1 | 3 | 1337 | 0.617 | 0.647 | 0.814 | 3325 |
| SLA-first | gpt-4.1-mini | 3 | 2024 | 0.483 | 0.710 | 0.807 | 4566 |
| SLA-first | gpt-4.1-mini | 3 | 42 | 0.483 | 0.698 | 0.806 | 4264 |
| Dataset | Scenario | Top-1 (U/NC/PG) | Top-5 overlap (U/NC/PG) |
|---|---|---|---|
| FiQA | Cost-first | Y/N/Y | 4/5 | 1/5 | 5/5 |
| FiQA | Risk-first | Y/N/Y | 4/5 | 1/5 | 5/5 |
| FiQA | SLA-first | Y/N/Y | 5/5 | 2/5 | 5/5 |
| SciFact | Cost-first | Y/N/Y | 5/5 | 1/5 | 5/5 |
| SciFact | Risk-first | Y/N/Y | 3/5 | 4/5 | 5/5 |
| SciFact | SLA-first | Y/N/Y | 5/5 | 2/5 | 5/5 |
| Run | N | R Acc | Macro F1 | Policy | Workflow | p95 ms |
|---|---|---|---|---|---|---|
| Prompt v1 (seed 1337) (CS) | 200 | 0.325 | 0.280 | 0.985 | 0.215 | 3203 |
| Prompt v1 (seed 1337) (IT) | 200 | 0.410 | 0.359 | 0.965 | 0.390 | 2912 |
| Prompt v2 (seed 1337) (CS) | 200 | 0.305 | 0.269 | 0.890 | 0.165 | 2948 |
| Prompt v2 (seed 42) (IT) | 200 | 0.430 | 0.369 | 0.905 | 0.375 | 2350 |
| Dataset | Prompt | Provider | Model | Runs | Routing Acc | Macro F1 | Workflow | p95 latency (ms) |
|---|---|---|---|---|---|---|---|---|
| Customer support (CS) | v1 | azure | gpt-4.1 | 3 | 0.295 0.033 | 0.204 0.068 | 0.167 0.053 | 3444 292 |
| Customer support (CS) | v2 | azure | gpt-4.1 | 3 | 0.292 0.013 | 0.215 0.050 | 0.148 0.015 | 3150 194 |
| IT tickets (IT) | v1 | azure | gpt-4.1 | 3 | 0.393 0.029 | 0.351 0.010 | 0.362 0.037 | 2743 146 |
| IT tickets (IT) | v2 | azure | gpt-4.1 | 3 | 0.408 0.026 | 0.377 0.009 | 0.358 0.038 | 2447 93 |
| Run | Model | N | R Acc | F1 | Policy | Workflow | p95 ms |
|---|---|---|---|---|---|---|---|
| TF-IDF baseline (CS) | TF-IDF | 200 | 0.500 | 0.481 | - | 0.500 | 0 |
| Prompt v1 (seed 1337) (CS) | gpt-4.1 (azure) | 200 | 0.325 | 0.280 | 0.985 | 0.215 | 3203 |
| Prompt v1 (seed 2024) (CS) | gpt-4.1 (azure) | 200 | 0.300 | 0.183 | 0.965 | 0.175 | 3769 |
| Prompt v1 (seed 42) (CS) | gpt-4.1 (azure) | 200 | 0.260 | 0.150 | 0.970 | 0.110 | 3360 |
| Prompt v2 (seed 1337) (CS) | gpt-4.1 (azure) | 200 | 0.305 | 0.269 | 0.890 | 0.165 | 2948 |
| Prompt v2 (seed 2024) (CS) | gpt-4.1 (azure) | 200 | 0.280 | 0.203 | 0.890 | 0.145 | 3169 |
| Run | N | Acc | F1 | WF | p95 |
|---|---|---|---|---|---|
| CS prompt v1 (seed 1337) | 200 | 0.325 | 0.280 | 0.215 | 3203 |
| CS prompt v2 (seed 1337) | 200 | 0.305 | 0.269 | 0.165 | 2948 |
| IT prompt v1 (seed 1337) | 200 | 0.410 | 0.359 | 0.390 | 2912 |
| IT prompt v2 (seed 42) | 200 | 0.430 | 0.369 | 0.375 | 2350 |
| Run | N | Routing Acc | Macro F1 | Workflow | p95 latency (ms) |
|---|---|---|---|---|---|
| CS prompt v1 (seed 1337) | 200 | 0.325 | 0.280 | 0.215 | 3203 |
| CS prompt v2 (seed 1337) | 200 | 0.305 | 0.269 | 0.165 | 2948 |
| IT prompt v1 (seed 1337) | 200 | 0.410 | 0.359 | 0.390 | 2912 |
| IT prompt v2 (seed 42) | 200 | 0.430 | 0.369 | 0.375 | 2350 |
LLM Evaluation
Large language model evaluation measures what models can do, how reliably they do it, and whether benchmark scores predict real-world performance.
See all 2,408 papers