Cover of Building LLM-Powered Applications
DRM-free · Yours to keep forever
AI & LLMs

Building LLM-Powered Applications

Architecture, evaluation and guardrails for production

By Houssam Kodad

PDF 288 pages Intermediate English

One-time purchase

€31.95

VAT included
where applicable

Download sample
  • Instant download after purchase
  • Readable on any device
  • Free updates to this edition
  • Secure checkout

About this book

What's inside

A working demo with a language model takes an afternoon; a product people rely on takes engineering. This book covers that engineering: structuring prompts and context, orchestrating tool calls, measuring whether the system is actually correct, and putting guardrails in place before users find the edge cases. It's model-agnostic and grounded in patterns that outlast any single provider's API.

What you'll learn

Skills you'll walk away with

  • Design application architecture around an LLM
  • Engineer prompts and manage the context window
  • Get reliable structured outputs and function calls
  • Orchestrate tools and multi-step agent flows
  • Build evaluation suites that measure real quality
  • Add guardrails for safety, privacy and failure modes
  • Control latency and cost under real traffic
  • Observe, debug and continuously improve the system

Table of contents

10 chapters
  1. 01

    From Demo to Dependable Product

    • · What changes at production scale
    • · A reference architecture
    • · Choosing and abstracting models
  2. 02

    How LLMs Behave and Fail

    • · Tokens, context and limits
    • · Hallucination and its causes
    • · Determinism and temperature
  3. 03

    Prompt and Context Design

    • · System, user and tool messages
    • · Few-shot and templating
    • · Context-window budgeting
  4. 04

    Structured Outputs and Function Calling

    • · JSON schemas and validation
    • · Tool/function definitions
    • · Handling malformed responses
  5. 05

    Tool Use and Agents

    • · Single-step tools
    • · Multi-step planning loops
    • · Stopping conditions and loops
  6. 06

    Evaluation You Can Trust

    • · Building a labelled eval set
    • · LLM-as-judge and its pitfalls
    • · Regression testing prompts
  7. 07

    Guardrails and Safety

    • · Input and output filtering
    • · PII and data handling
    • · Jailbreaks and prompt injection
  8. 08

    Latency, Caching and Cost

    • · Streaming and partial results
    • · Prompt and semantic caching
    • · Model routing and fallbacks
  9. 09

    Observability and Improvement

    • · Tracing requests end to end
    • · Capturing feedback
    • · Closing the improvement loop
  10. 10

    Shipping and Operating

    • · Rollouts and versioning prompts
    • · Incident response
    • · A production checklist

This is the full chapter list — exactly what you'll receive in the PDF.