# RAG and chat autotuning: retained confirmations, search and accounting

This is a sanitized numeric projection of historical hardware observations, not a new GPU experiment, a current product score, a provider comparison or a task-quality qualification. It retains 43 confirmation ladders, all 53,250 request observations and 584 rate/joint records across 292 windows, 41 search probe summaries, three preliminary smoke probes and the failed first hot-knob smoke. Original published cells remain unchanged. The search and confirmations use stock vLLM; the search-selected RAG setting is a token-budget configuration, not a new serving kernel.

## Sources and custody

The retained Git tree is `cc36a79490dff67f1d6b09966299e8f8e3b33334`, under `utilization_lab/autotune/`. `sources` inventories 430 raw/log/telemetry/results files by exact byte length and SHA-256; compressed sources include decoded hashes. `candidate_sources` inventories 20 explanatory source files, including the recovered `host_code_snapshot/`, verifier arithmetic and the separately recovered `packing_lab/kit/loadgen.py` and `trace_replay.py`. Six root autotune modules exactly match the host snapshot. That match is not an executed-process source attestation. The historical command called an external shared kit whose exact deployed bytes were not hashed in the retained execution record. The recovered kit explains the observations but is not silently promoted to proven executed bytes.

The preregistration reports one NVIDIA H100 PCIe, 80 GB, 350 W. Fifteen confirmation engine logs retain vLLM 0.30.0 and the cached `Qwen/Qwen3-8B-FP8` snapshot revision `220b46e3b2180893580a4454f21f22d3ebb187d3`. The requested image reference is retained in each arm. There is no full model-file manifest, executed image config/manifest byte receipt, Docker image-store/version record, authoritative physical-device allocation interval or provider billing receipt. Host addresses, local runtime endpoints and operational logs are not republished. Source hashes are provenance pointers, not public executable workload downloads.

## Workload and controls

The public JSON includes both distinct trace arrays as retained inside confirmation cells: 1,445 Azure conversation-shaped entries for chat and 918 Mooncake conversation-shaped entries for RAG. These are arrival/length/prefix-block shapes, not real question-answer tasks. The explanatory replay source evenly spaces equal-timestamp arrivals over the gap to the next distinct timestamp (or the wrapped segment end), then scales time to the target rate and selects a seeded offset. In particular, this transforms coarse Mooncake arrival timing; it does not preserve the original instantaneous microbursts. Candidate workload source scales RAG input lengths by 0.25 and output lengths by 0.5, caps them at 8,192/512, and uses 128-token shared prefix blocks after scaling; chat caps inputs/outputs at 4,096/512. Prompts are synthetic seeded token arrays and generation uses temperature zero and ignore-EOS output lengths. The declared burst17b profile has no retained search/confirmation results here.

Baseline confirmation starts stock vLLM with an empty configuration dictionary; recorded argv leaves default max sequences and memory utilization inherited. Do not treat the search's explicit 1,024 max-sequence setting as an observed explicit default-confirmation argument. RAG tuned and tuned2 set only max batched tokens to 1,024. Expert controls set 4,096 tokens/256 sequences/0.95 memory for RAG and 2,048/256/0.95 for chat. The exploratory survival arm adds FP8 KV cache to the RAG 1,024-token setting. All configurations, including default-again controls, are retained. Runtime compute dtype is BF16 with the FP8 checkpoint; this is not the separate BF16 mixed-work campaign or vLLM 0.33 stock lifecycle cohort.

Original seeds are 1, 2, 3; fresh RAG seeds are 17, 23, 31 and fresh chat transfer seeds are 17, 23. Search seeds are separate. Arms run sequentially and all seeds of an arm share one engine process. Search chooses a configuration and confirmation restarts a plain vLLM engine without the hot-knob patch. Compile/DeepGEMM/FlashInfer caches persist between starts, so fresh-process startup is not dropped-cache disk cold start. Input and output token arrays were not retained for confirmation requests; equal seed/trace intent does not independently establish exact input bytes, output parity or semantic quality. This is neither convergence nor evaluation on a held-out answer dataset.

## What the SLO metric actually means

Chat uses p95 TTFT at most 1 second and p95 TPOT at most 40 ms; RAG uses 2 seconds and 50 ms. The ladder requires at least 99% completion, uses nominal 20-second offered windows (extended when needed to offer at least 20 requests), allows a 30-second drain, and pools all repeated observations at a load before its joint verdict. Its selected lambda is the highest pooled passing load below the lowest pooled failing load. Individual window verdicts and pooled verdicts are retained separately.

We independently reconstructed all 292 rate verdicts and pooled-window decisions from the 53,250 retained requests. Every retained request has `ok=true`, but 98 individual windows fail latency gates. Three failing individual windows occur at their ladder's selected load: original chat/ragtuned seed1, fresh RAG/default seed17 and fresh RAG/default2 seed17. Fresh RAG/tuned seed17's own maximum window TPOT p95 is 45.74 ms; the 52.03 and 53.72 ms values belong to its two default controls. No assertion that every selected individual window passes is supported.

The original RAG mean of seedwise tuned/default lambda ratios is 1.3043604018964774, and the fresh mean is 1.3032973239023424. Default-again lambda equals default for every corresponding RAG seed. Both sets satisfy the historical gain rule (mean at least 1.10, no seed below baseline, gain greater than maximum A/A spread). This rule is a capacity/SLO guard, not a quality or physical GPU-hour gate. Chat's selected configuration equals stock and its 1.000 ratio is by construction: no separate identical tuned arm ran. Applying the RAG setting to chat is a separate post-hoc transfer experiment; retain both original and fresh outcomes rather than promote it as a preregistered chat win.

TTFT begins at actual client dispatch. TPOT uses the first and last nonempty streamed-text chunk and reported completion count; it is not a measured per-token interval distribution. Scheduled-arrival lateness, per-token event timestamps, exact prompt IDs and output identities are absent. Candidate loadgen checks enough reported completion tokens but does not require a retained terminal SSE marker. No speculative output-quality pass is added.

The old `at_lam.tok_s` comment says SLO-met tokens, but the implementation sums all completed output tokens in selected-load windows, including individual requests missing the latency thresholds. The public projection labels that rate accurately and separately computes individually threshold-met request/token counts. Neither is an independently quality-qualified goodput score. These rates divide by offered-window duration, including completions arriving during drain in the numerator. Original published table values are preserved, not silently redefined.

## Search, failures and costs

The search uses hot scheduler limits on an engine initially sized for maximum candidate shapes, and tests alternatives at a challenge load. Search-selected configurations are then confirmed as ordinary engine flags. Aggregate records retain 41 probes: 11 passes and 30 early failures; the two refinement probes fail and do not change the RAG winner. Chat refinement does nothing. Chat's prior 15-probe segment is included as a provenance record within its final 16-probe search, not 15 additional experiments.

Search summaries report chat 670.1 seconds (194.4 probe, 448.1 restart) and RAG 772.0 seconds (429.7 probe, 318.6 restart). RAG refinement adds 140.2 seconds, including 30.4 probe and 103.6 restart; chat refinement reports zero. Rounded per-probe elapsed sums differ slightly from rounded aggregate accumulators and are retained separately. Chat resumes a previous process; its summary sums reported segment durations and excludes any inter-process gap. Smoke costs are separate, including the first failed hot-knob acknowledgement after reported 339.4-second startup. The later smoke retains three passing probe summaries after reported 97.2-second startup. These are not omitted failures or part of the 43 confirmations.

Search early termination uses candidate host-observed text/chunk progress and cancels outstanding work. Search raw does not retain request-level trajectories, so its exact hypothetical full-window outcome cannot be independently reconstructed here. There is no measured exhaustive-search or equally competent alternative tuner cost comparison establishing a search-speedup claim. Idle wait return values and prefix-reset success are not retained as proof of perfect reset. Hot-shape and cold-process confirmation are distinct execution conditions.

Confirmation `gpu_s` is rounded load-generator subprocess elapsed time, including its warm-up and drain, but excluding engine initialization. Startup is stored once at engine-arm level and repeated in every seed summary; do not multiply that repeated startup by the number of seeds. Ten original arm logs separately retain elapsed wall from engine-start call through engine-stop return. Fresh arm-total walls are unavailable. None of these clocks establishes full billable lifetime, a physical allocation union, GPU release or invoice cost.

The retained 145,337 NVML samples independently reproduce all whole-ladder power/clock/utilization summaries and selected-window energy fields. `sampled_energy_windows` includes sample counts, first/last sample clocks and the rounded trapezoid energy for each offered window. These host-time power samples are diagnostics. The token/J numerator includes completed tokens whose answers can drain after the offered power window, so it is not full-lifecycle energy efficiency. Raw telemetry files are hash-bound but not included as full public sample arrays; the public numeric receipt cannot independently reconstruct the raw power integration without those retained private files.

## Recompute from the public numeric receipt

Read `confirmations[].requests` and group by `w`. For each rate step, compute nearest-rank ceil(q*n) quantiles among `ok` requests; require completion at least 0.99 of the window's sent rows, and p95 TTFT/TPOT at or below the cell limits. Recompute all-completed token rate as `sum(n)/step.s`, preserving the original rounding. Process rate steps in order, union windows sharing exact lambda, and recompute the pooled verdict after each addition. Compare that verdict with the following joint record. Select the highest passing lambda strictly below the smallest failed lambda; compare against `joint_reported.lam_star` and summary.

For each cohort/profile/seed, divide candidate lambda by default lambda and take the arithmetic mean of seedwise ratios. Do not pool unlike seeds, average token rates into lambda, or mix search probes with confirmation windows. The `recomputed.at_selected_lam` fields expose individual-window failures, pooled final p95, all completed output and separately threshold-met output. Preserve `task_quality_verified=false`, `allocated_gpu_intervals_verified=false` and `v02_score_eligible=false` regardless of those reconstructed capacity gains.

```python
import collections,json,math,statistics
from pathlib import Path
d=json.loads(Path('rag-autotune-observations-recovered.json').read_text())
assert not d['qualification']['task_quality_verified']
assert not d['qualification']['allocated_gpu_intervals_verified']
assert not d['qualification']['v02_score_eligible']
def pct(xs,q):
    return sorted(xs)[math.ceil(len(xs)*q)-1] if xs else None
def verdict(rows,slo):
    ok=[r for r in rows if r['ok']]
    t1,t2=pct([r['ttft'] for r in ok],.95),pct([r['tpot'] for r in ok],.95)
    return bool(rows and len(ok)>=.99*len(rows) and t1 is not None and
        t1*1000<=slo['ttft_p95_ms'] and t2*1000<=slo['tpot_p95_ms'])
count=windows=failures=selected_misses=0; lamps={}
for arm in d['confirmations']:
    by=collections.defaultdict(list);seen=collections.defaultdict(list)
    for r in arm['requests']:by[r['w']].append(r)
    count+=len(arm['requests']);slo=arm['cell']['slo'];joint=[]
    for s in arm['steps']:
        if s['kind']!='rate':continue
        rows=by[s['w']];ok=[r for r in rows if r['ok']]
        assert s['sent']==len(rows) and s['ok']==len(ok)
        assert s['pass']==verdict(rows,slo)
        for key in ['ttft','tpot']:
            for q in [50,95,99]:assert s[f'{key}_p{q}']==pct([r[key] for r in ok],q/100)
        assert s['out_tok_s']==round(sum(r['n'] for r in ok)/s['s'],1)
        seen[s['lam']].append(s['w']);pooled=[r for w in seen[s['lam']] for r in by[w]]
        j=next(x for x in arm['steps'] if x['kind']=='joint' and x['w']==s['w'])
        assert j['pass']==verdict(pooled,slo) and j['pooled']==len(seen[s['lam']])
        joint.append(j);windows+=1;failures+=not s['pass']
        selected_misses+=s['lam']==arm['summary_reported']['lam_star'] and not s['pass']
    ceiling=min((x['lam'] for x in joint if not x['pass']),default=math.inf)
    lam=max((x['lam'] for x in joint if x['pass'] and x['lam']<ceiling),default=0)
    assert lam==arm['joint_reported']['lam_star']==arm['summary_reported']['lam_star']
    s=arm['summary_reported'];cohort=arm['recomputed']['cohort']
    lamps[cohort,s['profile'],s['arm'],s['seed']]=lam
for pair in d['comparisons']:
    ratios=[lamps[pair['cohort'],pair['profile'],pair['candidate'],s]/
        lamps[pair['cohort'],pair['profile'],'default',s] for s in pair['seeds']]
    assert ratios==pair['per_seed_ratios']
    assert abs(statistics.mean(ratios)-pair['mean_per_seed_ratio'])<1e-12
assert (len(d['confirmations']),count,windows,failures,selected_misses)==(43,53250,292,98,3)
assert sum(len(x['probes']) for x in d['searches'])==41
assert sum(not p['pass'] for x in d['searches'] for p in x['probes'])==30
print('Retained capacity arithmetic matches; quality/allocation qualification remains false.')
```

This package supports review of a historical workload-specific stock-vLLM configuration result and its limits. It does not ship model bytes, the proven executed external kit, a contemporary tuned-baseline rerun, or a public executable reproduction kit.
