The mental model
Training, validation, and test data serve different purposes; leakage makes evaluation look better than deployment. A model learns patterns from a training distribution and can fail under distribution shift. Inference quality depends on the model and the supplied context, decoding, tool loop, and postprocessing. Temperature changes sampling behavior, but it does not make the full application deterministic. Embeddings map inputs into a vector space where similarity is useful only when the representation and metric fit the retrieval task. Fine-tuning can adapt behavior or format, but does not automatically provide fresh factual knowledge or remove the need for policy checks. Retrieval is useful when evidence changes or must be cited; prompting is easiest to update; tuning adds data and release lifecycle. Compare approaches on representative tasks, failure slices, latency, and total cost.
Answer shortcut: Separate model capability from application reliability. Name the dataset, baseline, user outcome, and failure slice behind each claim.
Questions to rehearse
- When do you use prompting, RAG, fine-tuning, or a combination?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
- Why can a higher benchmark score fail to improve the product outcome?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
- What does an embedding similarity score mean, and what does it not mean?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
- How can data leakage or a mismatched test distribution mislead model evaluation?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
- What is the difference between token latency, throughput, and time to first token?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
- Why can temperature zero still produce nondeterministic system behavior?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
- How would you measure hallucination or unsupported claims without relying on one aggregate score?
Answer with a concrete workload, a decision or mechanism, one failure mode, and evidence that would change your choice.
Trade-off lenses
What must stay true?
State the invariant, source of truth, and behavior when inputs or dependencies are wrong.
Which resource is limiting?
Estimate workload and identify CPU, memory, I/O, concurrency, latency, or operational constraints.
What is unknown?
Distinguish a known failure from an unknown outcome. Explain retry, reconciliation, and user-visible recovery.
How would you know?
Name a test, workload measurement, trace, or user outcome that could falsify your assumption.
Connect the foundation to agent systems
Agents make ordinary engineering constraints more visible: a model can choose an action, but the application still owns type validation, authorization, state, retries, and verification. Use the linked topic guides to practice applying this foundation to one concrete AI workflow.