Assignment 4 Companion · Building, Serving and Measuring an AI Application

Scalable AI: Bridging Theory, Understanding, and Practice · 配套练习 A4。个人学习讲义与配套实验,按主题整理并持续修订。

课程源码 ZIP ↓

个人整理的学习笔记,非官方讲义;课程来源与整理说明见课程介绍。配套示例未逐一运行验证。

本篇目录

Maps to: UC Berkeley EE 290/194 Scalable AI, Spring 2026 Assignment 4, Applications (released 5 April, due 23 April 2026). The task is to design an application around an allowed model and justify a serving stack with measurements. You then build the application pipeline, benchmark both quality and systems performance, and present a working demo. The Fall 2026 syllabus lists A4 as Inference and Serving, which has not been released at the time of writing; the Fall page’s asset URL serves the identical Spring archive. Grading: application design 20, serving stack + pipeline 25, benchmarks + prompt tuning 30, final build + presentation 25.

Sources: the public handout (assignment_4.zip), paraphrased here; Lectures 21–27 of these notes.

What this companion is. It covers each task’s concepts and method, practised on a miniature but complete application, the “Atlas desk”:

  • it answers questions about Atlas World with Lecture 21’s 1.3M-parameter base model;
  • it includes request validation, routing, a calculator tool and output validation;
  • the model is served by Lecture 22’s continuous-batching engine behind a real HTTP endpoint;
  • it is load-tested on a laptop.

The serving comparison at real scale is simulated. Nothing here is an application you could submit: the assignment requires an allowed NVIDIA checkpoint or your own, on the course node.

Code: code/assignmentA4/ contains:

  • loadgen.py: closed- and open-loop load generation and percentile statistics;
  • atlas_app.py: the application, a model server and an HTTP endpoint;
  • three demos: a serving-configuration choice under an SLO, the deployed pipeline under load, and quality tuning with a held-out test.

Reading time: ~65 minutes; ~40 seconds to run all demos.


0. How to read this companion

0.1 Learning goals

After this companion you should be able to:

  1. Design an application whose logic goes beyond a single prompt, with success criteria and failure modes you can measure.
  2. Choose a serving configuration with numbers: fix the workload and method, sweep concurrency and lengths, and decide against a latency SLO.
  3. Load-test the deployed pipeline correctly:
    • closed vs open loop, and coordinated omission;
    • percentiles with intervals, TTFT;
    • stage breakdowns, error counting, and the required metadata.
  4. Tune on a development set and test once, and know why choosing on the test set inflates the result.
  5. Analyse failures by category, so the next engineering step follows from the evidence.

0.2 Prerequisites and scope

  • Prerequisites:
    • Lecture 21 (deployment preparation: quantization, speculative decoding);
    • Lecture 22 (prefill vs decode, KV memory, continuous and chunked batching, prefix caching, goodput);
    • Lecture 23 (engines in practice: host overhead, radix caches, routing, guided decoding);
    • Lecture 25 (context engineering, retrieval, abstention, caching);
    • Lecture 26 (agents and harnesses);
    • Lecture 27 (guardrails and their metrics).
  • In scope: the four tasks’ methods.
  • Not in scope: vLLM, SGLang or TensorRT-LLM configuration; a recommended application or backend.

0.3 Section → code map

SectionIdeaCode in code/assignmentA4/
§1what the assignment asks and grades–
§2designing the application; the pipelineatlas_app.py
§3.1choosing a serving configuration under an SLO01_backend_comparison.py
§3.2–3.4measuring the deployed endpointloadgen.py, 02_served_pipeline.py
§4quality: development / test, variants, failures03_quality_and_tuning.py
§5the report and the demo–

1. What the assignment asks, and what the grading rewards

The emphasis shifts from training a model to turning a model into a useful system. You may use a checkpoint from your earlier assignments or an allowed NVIDIA post-trained checkpoint (Nemotron-3-Nano-30B-A3B or Nemotron-3-Super-120B-A12B). A proprietary hosted LLM may not be the core model. External utilities (vector databases, rerankers, search, embedding models) are allowed if disclosed. The four tasks, in paraphrase:

  • Task 0, design (20): target user and use case; the interaction; success criteria; an architecture diagram (model, serving layer, application logic, retrieval/tools/storage); at least three failure modes with mitigations. A chatbot wrapper with no application logic gets limited credit.
  • Task 1, serving stack + pipeline (25): compare two backends, or two substantially different configurations of one, with the checkpoint, hardware, workload mix, input/output limits and methodology held fixed. The choice must be numerically justified. Then build substantial application logic between the interface and the model server. Examples:
    • validation, templating and context construction;
    • retrieval, tool calls and structured-output checks;
    • session state, caching, routing and fallback;
    • guardrails, tracing, rate limiting.
  • Task 2, benchmarks + tuning (30):
    • a quality benchmark with a development set for tuning and a separate held-out test set used only once;
    • at least three prompt or pipeline variants compared on the development set;
    • five or more representative successes and failures, analysed;
    • a systems benchmark of the deployed pipeline (not offline generations) reporting p50/p95 end-to-end latency, throughput, TTFT, peak memory, a concurrency sweep and an input- or output-length sweep;
    • metadata for every result: GPU, precision, backend and version, maximum context and generation, concurrency, streaming, and the exact request mix.
  • Task 3, build + present (25): a working interface or API, the final served configuration, the pipeline, a reproducible benchmark harness, a live demo (backup video recommended). Be ready to explain why the application matters, why the backend, the trade-offs, and what failed.

The handout’s closing line, build something useful, measure it carefully, justify your choices, show us the system, is the grading in one sentence. The rest of this companion takes each verb in turn.


2. Designing the application and its pipeline

2.1 From a model to a system

A model, even a post-trained one, does a narrow thing: continue text. An application turns a user’s need into model calls the model can handle, and the model’s outputs into something the user can trust. The miniature case makes that gap obvious. Lecture 21’s Atlas base model knows every country’s capital in its own format, the capital of X is …, but has never seen a question. The Atlas desk:

stagewhat it doeswhy it is there
request validationlength, printable charactersreject malformed input before it costs anything
routingregexes and keywords: a sum, a fact (relation word + a known country), or neithersend each request to the right handler
toolsums go to a calculatorthe model gets sums right only 18–51% of the time; the tool is exact and costs 0.2 ms
prompt template“What language is spoken in Gavu?” → the language of gavu isthe model’s own format
model calla model server running continuous batchingshared engine steps for concurrent requests
output validationthe answer must be a known name for that relation, else abstaina wrong answer costs the user more than “I don’t know”
abstentionunsupported questions and unknown countries get a refusal with a reasonno confident hallucinations about Narnia
per-stage timingplan, queue, model, finishthe systems benchmark needs it

Design questions for your own application follow the same table:

  • What does the user provide?
  • What can the model do reliably, and what should a tool, retrieval or a refusal do instead?
  • How do you know an output is acceptable, for example a schema check, an execution check, a citation, or a confidence threshold?
  • What does a failure cost, and which failures are worse than an abstention?

Lectures 25–27 are the design library:

  • context engineering and retrieval: chunking, packing, freshness, caching;
  • agents and harnesses: validation, verification, budgets, permissions;
  • guardrails and their measured costs.

2.2 Failure modes, written before building

Task 0 asks for at least three failure modes with mitigations. Writing them first pays off later, because each one becomes a category in the failure analysis (§4.4). For the Atlas desk, written before building:

  1. The model answers a question it cannot know (unknown entity) → abstain when the entity is not in the world.
  2. The model’s output is not a valid answer (truncated, a non-name) → output validation, abstain.
  3. Sums are unreliable → route to a tool.

The failure analysis then found a fourth, which was not on the list: a keyword router misreads “Translate hello into Maleshi language.” as a fact question. Failures you did not predict are the most valuable part of the analysis.


3. Serving: choosing a configuration, then measuring the deployed pipeline

3.1 A numerically justified choice (demo 01)

The handout’s example of a good justification, in paraphrase: at our workload (2k-token context, 256-token outputs, concurrency 8), backend X achieved 1.6× higher throughput than Y while keeping p95 latency within our interactive budget and preserving quality on the held-out set. Each part of that sentence is a measurement: the workload, the concurrency, the latency budget, the ratio, and quality unchanged.

Demo 01 produces such a sentence on a simulated H100 serving Llama-3-8B (Lecture 22’s serve_sim), for a retrieval-augmented workload. Every request carries:

  • the same 800-token system prompt;
  • 3 of 200 retrieved passages (400 tokens each);
  • a unique question;
  • a log-normal output (median 150 tokens).

Configuration A is continuous batching with prefill priority and no prefix cache. B is chunked prefill with a prefix cache. Closed-loop users with no think time, 400 completed requests per point, warm-up excluded:

configurationusersp50 E2E (s)p95 E2E (s)p95 TTFT (s)requests/sprefix hit ratemeets SLO
A11.022.940.0560.790%yes
A161.975.380.0576.460%yes
A644.3511.710.1109.450%no
B10.992.910.0350.8151%yes
B161.474.210.0468.3151%yes
B642.607.730.08314.7950%yes
B1283.849.040.11115.4150%no

With an SLO of p95 E2E ≤ 8 s and p95 TTFT ≤ 1 s:

At this workload, B serves 14.79 requests/s within the SLO (at 64 users) against A’s 6.46 (at 16 users): 2.29×.

Two reasons, both from Lecture 22:

  • B serves half of every prompt from the prefix cache, because the system prompt is shared;
  • chunked prefill mixes prompt chunks into decode steps instead of pausing every decode for whole prefills.

Two things the table teaches:

  • One user cannot tell the configurations apart (p50 1.02 vs 0.99 s). The difference appears only with concurrency, which is why the handout requires a concurrency sweep.

  • The comparison must hold everything else fixed. At 64 users:

    comparisonB / A
    fair: same workload1.57×
    B with outputs capped at 64 tokens3.07×
    B measured without the retrieved context2.47×
    A measured without the context instead0.96×

    The model, GPU and code are the same in every row; only the workload changed. This is why the handout lists what must stay fixed: checkpoint, hardware, request mix, input and output limits, methodology.

The input length is both a quality knob and a systems knob. Going from 1 to 8 passages raised B’s p95 TTFT from 0.014 to 0.162 s and cut throughput from 10.3 to 5.0 requests/s at 16 users. Benchmark the setting you deploy.

Choosing what to compare. On the course node, meaningful comparisons include:

  • two engines (vLLM vs SGLang vs TensorRT-LLM; Lecture 23);
  • prefix caching on vs off for prompts that share a system prompt or documents;
  • chunked prefill and its token budget;
  • tensor-parallel degree;
  • FP8 vs BF16 (Lecture 21; check quality on the held-out set);
  • speculative decoding (Lecture 21; a gain at low concurrency that can turn into a loss at high batch, as Lecture 21 measured);
  • a cap on concurrent sequences.

3.2 Measuring the deployed endpoint (demo 02)

“Your evaluation must measure the actual deployed application pipeline, not only offline single-example generations.” Demo 02 does this for the Atlas desk:

  • server: a ThreadingHTTPServer on loopback, whose handler runs the whole pipeline, with model calls going to a ModelServer (TinyEngine in a background thread);
  • load generator: client threads posting questions from the labelled mix (half need the model; sums go to the calculator; unsupported questions abstain).

Clients and server share one Python process, a limitation stated in the metadata. One run:

engineusersp50 E2E (ms)p95 E2E (ms) [95% CI]p95 TTFT (ms)requests/sengine steps
one at a time (max_seqs 1)17.38.9 [8.2, 9.3]1.32191,430
one at a time32146.5279.4 [274.4, 280.3]273.42111,430
continuous batching (max_seqs 32)17.39.8 [9.4, 10.6]1.42041,430
continuous batching1624.340.4 [33.7, 41.4]11.9882159
continuous batching3243.348.8 [48.1, 49.9]18.41,117115

Across three runs, batching served 5–5.5× more requests per second at 32 users. Its p95 TTFT stayed near 18 ms, against 99–273 ms one at a time: one at a time, the TTFT is almost all waiting in the queue. Requests shared engine steps: 115 steps for 240 requests with batching, 1,430 without. At one user the two configurations are indistinguishable, the same lesson as §3.1 on real hardware.

Where a request’s time goes (medians, continuous batching):

usersvalidate + routequeue before admissionmodel (incl. queue)output validationclient E2EHTTP + JSON + threads
10.004 ms0.01 ms7.0 ms0.001 ms7.2 ms0.2 ms
320.004 ms3.7 ms29.1 ms0.001 ms30.9 ms1.8 ms
  • Application logic is cheap here. Requests that never reach the model finish in 0.2 ms.
  • The gap between client and model time grows with load (HTTP, JSON and thread scheduling). This is why the benchmark must hit the endpoint, not the model call.
  • Output length is a cost the prompt design controls. Generating 40 tokens instead of 10 roughly tripled p50 latency (~70 vs ~22 ms) and cut throughput by about two thirds.

3.3 Closed loop, open loop and coordinated omission

A closed loop of N users is what real_closed_loop and most benchmark scripts do: each user sends, waits for the answer, then sends again. When the server slows down, the users slow down too, so the server never faces more than N requests, and its latency numbers stay polite. Real users do not wait for each other; they arrive on their own schedule. An open loop (Poisson arrivals at a fixed rate) shows what happens when arrivals outpace service: a queue that grows for as long as the overload lasts. Measuring latency only from when a slowed-down client managed to send hides that wait: the coordinated omission trap.

Demo 02 measures the closed-loop maximum at 32 users (about 1,100–1,250 requests/s), then offers open-loop load at 70% and 130% of it, with 1,500 requests each:

offered loadserved requests/sp95 from intended send (ms)p95 from actual send (ms)median latency, first → last tenth of arrivals (ms)
70%86032.131.916.9 → 17.2
130%1,176353.2340.346.0 → 347.4

At 70% the latency is flat. At 130% it climbs throughout the run, because the queue is growing. A closed-loop benchmark at 32 users had reported p95 ≈ 38–49 ms for the same server (three runs). Under overload the load generator itself fell behind its schedule (p95 353 vs 340 ms), so latency must be measured from the intended send time, as real_open_loop does.

The overload rate is only as good as the capacity measurement behind it. In one verification run the laptop was also playing video and running other demos. The closed loop then reported only 544 requests/s, and at “130%” of that the open loop served 690 requests/s with latency falling (53 → 37 ms): it was not overload at all. So measure capacity on a quiet machine, re-measure it right before an overload test, and check that the queue actually grows before you claim it does. The demo’s observations now make that check rather than assuming it.

What to report:

  • the closed-loop concurrency sweep the handout asks for;
  • open-loop runs below and above the closed-loop maximum, which give the honest capacity;
  • the SLO-based goodput, the rate of requests that meet the SLO (Lecture 22 §5.4).

3.4 The numbers behind a latency claim

  • Percentiles need samples. A p95 from 40 requests rests on the two largest values. loadgen.pct_ci gives a bootstrap interval. As a rule of thumb, use at least ~20 / (1 − q) samples: 400 for p95, 2,000 for p99.
  • Warm-up is not steady state. The first requests pay for compilation, allocation and cold caches. Exclude them and say how many.
  • Errors are results. The first version of demo 02 lost requests silently: the HTTP server’s listen backlog of 5 reset connections under bursts, and dead client threads simply produced fewer samples. Count failures and report the error rate; a latency table over the survivors is biased.
  • Memory: report the peak (GPU memory for the engine, resident memory for the process). Demo 02 reports 1.7 GB resident for the whole process.
  • Metadata (loadgen.metadata): hardware, precision, backend and version, maximum context and generation, concurrency, streaming, request mix, warm-up and sample count, next to every table.

4. Quality: development set, variants, one test, failures (demo 03)

4.1 Variants on the development set

The handout requires at least three prompt or pipeline variants compared on a development set. Demo 03 compares five on 300 development questions (50% facts, 25% sums, 15% unsupported, 10% unknown entities). “Useful” counts correct answers plus correct abstentions.

variantuseful [95% CI]facts correctsums correctabstained when it shouldconfident wrong
raw question to the model2.0% [1, 4]4%0%0%98.0%
template54.0% [48, 59]95%18%0%46.0%
template + few-shot sums57.7% [52, 63]95%33%0%42.3%
app (router, tool, validation, abstention)94.7% [92, 97]95%100%89%4.7%
app without output validation94.7% [92, 97]95%100%89%5.3%
  • Prompting moves the base model from useless to good on facts (2% → 95%) but leaves sums weak.
  • Application logic carries the rest: the calculator, abstention on unsupported and unknown questions, and validation. Confident wrong answers fall from 46% (template) to 4.7%.
  • The ablation (last row) shows what output validation buys: it leaves useful accuracy unchanged but turns confident wrong answers into abstentions (5.3% → 4.7%), because on this model the emitted facts are almost always real names. Report wrong answers and abstentions separately: a single accuracy number hides the difference, and for users it matters.

4.2 The test set, once

The variant chosen on development data (app), run once on 400 test questions: 94.8% useful [92.5, 96.8], with 4.8% confident wrong answers (development: 94.7%). Reporting a single test run of a pre-chosen variant is what makes that number an estimate of quality on new questions.

4.3 Why choosing on the test set inflates the result

Demo 03 builds 12 few-shot prompts for sums (1–3 solved equations each). It scores every prompt on the development, test and a third “fresh” set:

  • Chosen on the test set: prompt 4, which reports 57.1% on test, scores 42.5% on fresh data (−14.7 points).
  • Chosen on the development set: prompt 2 reports 49.5% on test and also scores 42.5% on fresh.

Part of every drop is luck of the draw: this test set’s sum questions happen to be easier for all 12 prompts (mean 48% on test vs 37% on fresh), which is what an interval is for. The rest of the test-chosen drop is the winner’s curse: the best of many noisy scores is biased upward. A test set used for choosing is no longer a test set. Tune on development data, choose there, and touch the test set once.

4.4 Failure analysis

The handout asks for at least five representative successes and failures, analysed. Categorize every error of the final system on the test set, and show examples of each category:

categorycountexampleanswertruth
wrong fact that passed validation (model error)10“Brubavoul exports what?”timberrice
answered a question it should have refused (routing)9“Translate hello into Maleshi language.”salosish–
abstained on an answerable question (output failed validation)2“Bredrifo: which city is the capital?”–stugatul
success: correct287“Tell me the capital of Stiger.”vitraraivitrarai
success: abstained correctly92“How many people live in Draitais?”––

The categories decide where the next week goes:

  • the routing failures need a stricter intent check, which is application work;
  • the model errors need a better model, retrieval of the fact, or a verifier, which is model or pipeline work;
  • the abstentions show the validation’s recall.

This is also the “what failed and what you would improve next” part of the presentation.


5. The report and the demo

The report is at most 6 pages and must contain one architecture figure, a backend-comparison table, a quality-results table, a latency–throughput figure or table, and a failure-analysis table. Map each section to the evidence:

  1. Application overview and target user: §2.1’s table for your application.
  2. Architecture diagram: interface → validation → routing → retrieval/tools → prompt construction → model server (engine, configuration) → output validation → response, with storage and logging.
  3. Model: the exact checkpoint, its base, and any adaptation.
  4. Serving comparison: the §3.1 table and sentence, with metadata.
  5. Pipeline: each component and the failure mode it addresses (§2.2).
  6. Quality benchmark: development and test sets (sizes, how built, disjointness), metrics (with abstention and confident-wrong rates where they apply), and the variants table.
  7. Systems benchmark: concurrency and length sweeps of the deployed endpoint, an open-loop check near capacity, the stage breakdown, peak memory, error rate, and metadata.
  8. Tuning: the development comparison, the choice, and the one test run.
  9. End-to-end results: quality and systems numbers for the final configuration together.
  10. Failure analysis and limitations: §4.4’s table, plus what is brittle.

The demo: rehearse it on the deployed configuration, have a backup video, and know your numbers (why this backend, what p95 means at your concurrency, what the main failure category is).


6. Summary

  • An application is a pipeline around a model: validation, routing, tools, templates, output checks and abstention. On the miniature desk, these took useful accuracy from 54% (template) to 95%, and confident wrong answers from 46% to under 5%.
  • A backend choice is a sentence with numbers (workload, SLO, concurrency, ratio), measured with everything else fixed. One user cannot tell configurations apart, and changing the workload on one side flipped a 1.57× advantage into anything from 0.96× to 3.07×.
  • Benchmark the deployed endpoint. Continuous batching gave 5× the throughput at 32 users, and queueing dominated TTFT without it. HTTP and threading overhead grow with load; output length is a direct cost.
  • Closed-loop benchmarks hide overload. Open-loop arrivals at 130% of capacity showed latency growing tenfold during the run. Measure from the intended send time, count errors, and put intervals on percentiles.
  • Tune on development data and test once. Picking the best of 12 prompts on the test set reported 57%, against 42.5% on fresh data.
  • Failure categories decide the next step: routing vs model errors vs over-abstention.

7. Common pitfalls

  1. A thin wrapper around the model, with no component that addresses a failure mode.
  2. “We chose X because everyone uses it.” No workload, no SLO, no ratio.
  3. Different request mixes or output caps on the two sides of a comparison.
  4. Benchmarking the model call instead of the endpoint, or single-request latency only.
  5. Closed-loop-only load tests reported as capacity; latency measured from the actual send time.
  6. p95 from a few dozen requests, without an interval; warm-up included.
  7. Silently dropped failed requests.
  8. Tuning prompts on the test set, or running many variants on it and reporting the best.
  9. One accuracy number that hides the difference between wrong answers and abstentions.
  10. Failure “analysis” that lists examples without categories, or categories without counts.

8. Exercises

  1. Your app meets p95 ≤ 2 s at 12 concurrent users with backend X (3.1 requests/s) and at 20 users with backend Y (4.4 requests/s). Write the justification sentence and list what must have been held fixed.
Answer"At our workload (mix M, input ≤ I tokens, output ≤ O tokens), backend Y serves 4.4 requests/s within p95 ≤ 2 s (at 20 concurrent users) against X's 3.1 (at 12 users), 1.42× more, with held-out quality unchanged (Q vs Q′)." Held fixed: the checkpoint, hardware, request mix, input and output limits, streaming setting, warm-up and sample count, and the measurement method. Precision too, unless it is the thing being compared, in which case quality must be shown to hold.
  1. A closed-loop test with 64 users reports p95 = 1.1 s at 30 requests/s. Production traffic peaks at 40 requests/s. What do you expect, and how do you test it?
Answer40 requests/s is above the measured closed-loop throughput, so at that arrival rate the queue grows without bound and latency rises for as long as the peak lasts. The closed-loop p95 says nothing about it. Test with open-loop (Poisson) arrivals at, say, 70%, 90%, 110% and 130% of 30 requests/s, measure latency from the intended send time, and compare the first and last parts of each run. Then either add capacity (or a better configuration) or add admission control or rate limiting so that overload degrades gracefully.
  1. Variant B beats variant A by 2.5 points on a 150-question development set. Is that a reason to choose B?
AnswerNot on its own. Compute a paired interval or McNemar's test on the 150 questions. With 150 questions, a 2.5-point difference is often within noise. If it is not detectable, choose on other grounds (simplicity, latency, cost), or enlarge the development set. In either case, test the chosen variant once on the held-out set.
  1. Your RAG assistant has 6% confident wrong answers and 3% abstentions on answerable questions. Adding a citation check would make it abstain whenever no retrieved passage supports the answer. How do you decide?
AnswerMeasure both rates on the development set with and without the check (an ablation, as demo 03 did for output validation), and weigh them by their cost to the user: a wrong answer in your domain may cost much more than an abstention. Also measure the check's latency cost in the deployed pipeline. Report both rates, not just one accuracy number.
  1. Where would you look first if p50 latency is fine at all loads but p95 doubles between 16 and 32 users?
AnswerQueueing and interference. Requests waiting for admission (a max_seqs or KV-memory limit); long prefills of some requests stalling the decodes of others (chunked prefill and its token budget); preemptions when the KV pool fills; host overhead in the HTTP and application layer under concurrency. The stage breakdown (queue vs model vs everything else) and the engine's preemption counters locate it.

9. Enhancing the assignment

Ideas for the 10% “enhancing an assignment” component, none of which is part of the graded solution:

  • A shared load generator for the course: closed and open loop, latency from the intended send time, bootstrap intervals for percentiles, error counting and the metadata block (loadgen.py as a starting point).
  • A reporting template that turns benchmark logs into the required tables and the latency–throughput figure.
  • A failure-analysis helper: categorize errors from the evaluation harness by pipeline stage (routing, retrieval, model, validation) with counts and examples.
  • A “fair comparison” checklist script that diffs two benchmark configurations and refuses to compare them if the request mix, limits or method differ.

10. Further reading

  • Lecture 22 (serving fundamentals: batching policies, KV memory, prefix caching, goodput) and Lecture 23 (engines in practice); the vLLM, SGLang and TensorRT-LLM documentation linked from the course page.
  • Gil Tene, How NOT to Measure Latency: coordinated omission and why percentiles need the right method.
  • Lectures 25–27 of these notes (context engineering, agents and harnesses, guardrails) for the pipeline components.
  • The NeMo Guardrails and Gym documentation (course tools page) for guardrail and tool-use components.

术语表 (Glossary, English → 中文)

English中文
application pipeline应用流水线
request validation / routing / fallback请求校验 / 路由 / 降级回退
tool call / calculator tool工具调用 / 计算器工具
prompt template / few-shot examples提示模板 / 少样本示例
output validation / abstention输出校验 / 拒答
failure mode / mitigation失败模式 / 缓解措施
serving backend / configuration推理服务后端 / 部署配置
continuous batching / chunked prefill / prefix caching连续批处理 / 分块预填充 / 前缀缓存
SLO / goodput服务等级目标 / 有效吞吐
end-to-end latency / TTFT / p50 / p95端到端延迟 / 首词元时间 / 中位数 / 第 95 百分位
closed loop / open loop / offered load闭环 / 开环 / 提供负载
coordinated omission / intended send time协同遗漏 / 预定发送时间
warm-up / steady state预热 / 稳态
listen backlog / error rate监听队列 / 错误率
development set / test set / held-out开发集 / 测试集 / 留出
winner’s curse / selection bias赢家诅咒 / 选择偏差
ablation消融
failure analysis失败分析
← 返回课程目录