Context Engineering (Manning)

Context engineering is the discipline of selecting, organizing, updating, compressing, prioritizing the precise context a model needs to generate accurate responses. This book shows you how to combine well-designed prompts with smart search, content filtering, and advanced RAG techniques incorporating many types of stored data to create reliable responses in your AI applications.

Boni Garcia

If you’re building with LLMs, you’ve probably run into the same pattern many teams are seeing: a clever prompt works in a demo, then falls apart when the system has to handle fresh data, long conversations, tools, memory, multiple steps, or production constraints. The missing piece is often context: what the model sees, when it sees it, how that context is selected, and what gets left out.

Context Engineering treats that as a software design problem.

The book shows how to build AI systems where the model’s information environment is designed with the same care as the code around it. Boni García covers the full context stack: instructions, external knowledge, tools, memory, state, user prompts, orchestration, evaluation, observability, and governance.

Early chapters are already available and cover:

  • What context engineering is and why prompt engineering is only one part of the picture

  • How LLM-based systems evolve from single model calls to workflows, agents, and agentic systems

  • System prompts, agent skills, and instruction artifacts such as AGENTS.md and CLAUDE.md

  • RAG pipelines, chunking, vector databases, graph RAG, hybrid RAG, agentic RAG, vectorless RAG, cache-augmented generation, and context stuffing

  • Tool use through function calling, command-line interfaces, and the Model Context Protocol

The hands-on sections use current tools and platforms, including OpenAI, Anthropic Claude, Google Gemini, Ollama, LangChain, LlamaIndex, CrewAI, DSPy, RAGFlow, and MCP servers. Examples are grounded in working code, with a companion GitHub repository for readers who want to follow along.

This book is aimed at AI engineers, data scientists, and engineering managers who already know the basics of LLMs and agents and want to build systems that behave more consistently outside a notebook or prototype.

A bit about the author: Boni García is an Associate Professor at Universidad Carlos III de Madrid, a Selenium project tech lead, and the creator and maintainer of WebDriverManager and Selenium Manager. His work sits at the intersection of software engineering, test automation, and applied AI.

MEAP means you can start reading now while the book is still being completed. You’ll get updates as new chapters are added.

If you’re working on RAG, agents, coding assistants, enterprise copilots, or any LLM system where “just make the prompt better” has stopped being enough, this one should be on your list.


Don’t forget you can get 45% off with your Devtalk discount! Just use the coupon code “devtalk.com” at checkout :+1: