Part VI: AI Systems

Language models are impressive, but models alone don’t make systems. Production AI applications require more: prompting strategies, retrieval of relevant information, integration with tools and databases, agent behaviors, and memory across interactions.

This part shows how to build real AI systems by orchestrating components. Most production applications aren’t just “run GPT-4”—they’re systems that combine models with retrieval, tools, planning, and human oversight to solve specific problems.

Prompting is how we program language models. The prompt shapes behavior: instruct the model, provide examples, specify format and constraints. Effective prompting is part engineering, part empirical tuning. Understanding prompting patterns helps you build reliable applications.

Retrieval-augmented generation addresses knowledge limitations. Models trained on static datasets lack current information and domain-specific knowledge. RAG retrieves relevant documents and includes them in the prompt, giving models access to fresh, specialized information.

Tool use extends model capabilities. Models generate function calls to calculators, databases, APIs, and other systems. They orchestrate external tools to accomplish tasks they can’t do alone. This integration of language understanding and programmatic actions creates powerful applications.

Agents combine models, tools, and planning to accomplish complex tasks. Instead of single responses, agents execute multi-step plans, call tools, handle failures, and iterate toward goals. Agent behavior emerges from careful system design: prompting, tool availability, and control structures.

Memory enables long-term context. Conversations span sessions, users return across days, systems need to remember context beyond immediate prompts. Memory architectures—vector databases, summaries, structured storage—help systems maintain state.

After this part, you’ll understand how to build production AI applications. But systems fail in predictable ways. Part VII covers what goes wrong and why.