Skip to content
Clairos Learn

AI systems foundations · Lesson 3 of 15 · 7 min

Trace a request lifecycle

A request lifecycle has separate waiting, retrieval, inference and validation stages. Compare durations within the same request rather than combining unrelated log lines.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated AI Ops lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

A request lifecycle has separate waiting, retrieval, inference and validation stages. Compare durations within the same request rather than combining unrelated log lines.

Interpret the evidence

Investigate the 760 ms retrieval stage, the largest measured contributor.

A tempting mistake

Tune inference first because the model is always the slowest stage.

All names, measurements, prices, versions, and thresholds in this exercise are fictional training data. The evidence supports this bounded scenario, not a claim about a live provider.

Worked example and expected result
$ cat /opt/ai-lab/cases/aiops-systems-foundations-003.json
{
  "fixture": "Fictional training data; not a live measurement.",
  "request_id": "req-014",
  "queue_ms": 40,
  "retrieval_ms": 760,
  "inference_ms": 210
}

Exit status: 0. The command completed successfully in the training fixture.

$ jq .retrieval_ms /opt/ai-lab/cases/aiops-systems-foundations-003.json
760

Exit status: 0. The command completed successfully in the training fixture.

$ printf '%s\n' 'inspect-retrieval-span' > /home/learner/lab/aiops-systems-foundations-003-decision.txt
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Name the assumption that would have to change for “inspect-retrieval-span” to stop being the justified action. Do not silently replace missing evidence with a guess.

Explain it

What does the evidence in “Trace a request lifecycle” justify?

Apply it elsewhere

A colleague concludes: “Tune inference first because the model is always the slowest stage.” What should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Name the serving boundaryTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Separate model and applicationModel weights produce predictions; the application owns routing, authentication and presentation. A change to one layer does not automatically change the other.Practice
  2. 02Name the serving boundaryA serving boundary defines which process accepts inference requests and which dependencies it calls. A loopback listener is not evidence that a service is publicly reachable.Practice
  3. 03Read an inference contractAn inference contract specifies required fields, supported model identifiers and response shape. Validate the request before blaming a model for a rejected envelope.Practice