Notes / tag / language-models-in-practice

#language-models-in-practice

10 notes

1. Prompt Engineering Fundamentals

Covers the core levers of prompt construction — instruction clarity, few-shot exemplars, system vs. user role separation, and sampling controls — as the baseline skill every downstream agentic technique builds on.

ai-foundations language-models-in-practice book
Jul 25, 2026

2. Prompt Design Patterns

Catalogs reusable prompt patterns — chain-of-thought, ReAct, self-consistency, and role/persona framing — with guidance on when each pattern earns its added token cost over a plain instruction.

ai-foundations language-models-in-practice book
Jul 25, 2026

3. Structured Outputs

Covers forcing an LLM into a validated schema — JSON mode, function-calling-style schemas, and grammar-constrained decoding — and the failure modes, like schema drift and hallucinated fields, that break naive implementations.

ai-foundations language-models-in-practice book
Jul 25, 2026

4. Function Calling

Covers how models select and populate function signatures from natural language, the request/response contract between model and application, and common pitfalls like parameter hallucination and ambiguous selection.

ai-foundations language-models-in-practice book
Jul 25, 2026

5. Tool Calling

Extends function calling into multi-tool agent design — tool registries, tool-choice strategies, parallel vs. sequential invocation — and how tool descriptions themselves become part of the prompt-engineering surface.

ai-foundations language-models-in-practice book
Jul 25, 2026

6. Streaming Responses

Covers server-sent events and token-streaming architectures for LLM responses, the UX and backpressure tradeoffs versus batch responses, and how streaming interacts with structured-output and function-calling validation.

ai-foundations language-models-in-practice book
Jul 25, 2026

7. Model Selection & Routing

Covers building a model router that picks among providers and tiers by task complexity, latency SLA, and cost — the pattern that replaces always calling the biggest model once traffic reaches production scale.

ai-foundations language-models-in-practice book
Jul 25, 2026

8. Hallucination Management

Covers the mechanisms behind LLM hallucination — parametric knowledge gaps, exposure bias, overconfident sampling — and mitigation strategies like grounding via RAG, citation requirements, and confidence-calibrated refusal.

ai-foundations language-models-in-practice book
Jul 25, 2026

9. AI Failure Modes

Surveys production failure modes beyond hallucination — prompt injection, context poisoning, tool-call loops, silent schema violations, and cascading errors in multi-agent chains — as the taxonomy a staff engineer defends against.

ai-foundations language-models-in-practice book
Jul 25, 2026

10. Building Reliable LLM Applications

Covers the engineering practices that turn a probabilistic model call into a reliable system component — retries with validation, evals as CI gates, circuit breakers, and observability for non-deterministic outputs.

ai-foundations language-models-in-practice book
Jul 25, 2026