Write your response in your own notes, then compare it with the sample answer. This practice is separate from the scored exam and does not affect your certificate.
Practice 1
Write an eligibility rule for the lab's short lookups and longer explanations. Say which fixture each task may use, why a user-supplied simple label is not adequate classification, and which state must change when answer-sharing permissions change.
Compare with a sample answer
A lookup is a simple task: it may begin with FAST and fall back once to STRONG after a transient failure. An explanation is a complex task and must use STRONG, because the fixture deliberately makes FAST incomplete for it. The host, not the user, supplies the task class after its own checks, since a user could label a demanding request as simple. When sharing permissions change, the trusted scope generation must change, or the relevant entries must be invalidated, before any cache read; an unchanged scope string cannot express revoked access.
The sample follows the exercise answer on eligible fixtures, host-supplied task classes and scope generation.
Practice 2
With capacity two and TTL 100, A is inserted at time 0, B at 10, A is read at 20 and C is inserted at 30. Explain which key is evicted at 30, when A expires, and what remains after a purge at 100.
Compare with a sample answer
Reading A at 20 makes it the most recently used entry, so inserting C at 30 overflows capacity and evicts B, the least recently used key. The read does not extend A's lifetime, so A still expires at 100. At exactly 100 the inclusive expiry check removes A, leaving C, which expires at 130. Capacity pressure and time expiry are separate reasons for removing an entry.
The sample reproduces the exercise trace for LRU eviction, fixed lifetime and inclusive expiry.
Practice 3
A simple outage request runs in route mode. FAST returns transient and STRONG costs four units. Predict status, attempts, units and elapsed time for budgets four and five, and explain why a successful fallback is not cached.
Compare with a sample answer
With budget four, FAST is attempted and charged one unit and ten simulated milliseconds; before STRONG starts, spent plus four would be five, so the router returns budget with one attempt, one unit and ten milliseconds. With budget five, STRONG is affordable and succeeds: ok, two attempts, five units and forty milliseconds. The fallback answer is returned with its actual model name but not cached, so a later request can try the recovered primary. Neither result represents real provider charges or timeout enforcement.
The sample matches the exercise answer and the cumulative budget check.
Practice 4
Using the four demo output rows, compute the routing-plus-cache saving against all-STRONG and the caching-only saving against uncached routing, then explain the different accepted, refused, hit and attempt counts.
Compare with a sample answer
Routing with the cache spends 12 invented units against 24 for all-STRONG, so the combined reduction is (24 - 12) / 24, which is 50 percent. Against uncached routing at 13 units, caching alone saves (13 - 12) / 13, about 7.7 percent. Accepted is out of five answerable requests, refused is out of the one restricted request, and hits are out of six submitted requests. Uncached routing shows seven attempts because the outage request needed two calls. These are fixture comparisons on a selected trace, not forecasts of cost or model quality.
The sample follows the exercise answer and the declared denominators.
Practice 5
In a disposable copy, spent + model.units > budget is changed to model.units > budget. Predict the result for an outage request with budget four, explain why the budget test fails, and say what kind of fault this is.
Compare with a sample answer
The faulty check compares only STRONG's four units with the budget of four, forgetting the one unit already spent on the failed FAST attempt. It therefore starts the fallback and spends five units despite a budget of four. test_budget_checked_before_each_attempt expects status budget, one unit and one attempt, so it fails. Restoring the cumulative comparison restores the expected stop. This is a valid-Python logic error, not a syntax failure.
The sample follows the exercise answer on the forgotten spent units and the detecting test.
Practice 6
Write a short acceptance note for the first controlled evaluation before connecting this design to a real chatbot. Cover snapshots and the evaluation set, the fields to capture, ownership and rollback, and the controls the lab leaves unimplemented.
Compare with a sample answer
The note identifies the exact model and policy revisions, the host-issued scope and context rules, and a held-out request set the service is permitted to process. For every request it captures the actual model, attempts, usage, cache hits, end-to-end timing, output quality, refusals and errors. The service owner sets the acceptance thresholds and rollback triggers. Authentication, real timeouts, cancellation, concurrency, byte limits, outage load and provider-specific billing are marked unverified until their own checks pass.
The sample follows the exercise answer and keeps unimplemented controls marked as unverified.