Overview
In Part 1, we used LLMs as software engineering assistants. In Part 2, we built the programming foundation needed for small command-line applications. In this part, the two come together: we start building software where a large language model is one component inside a larger system.
That changes the engineering problem. Instead of only asking whether the AI produced a helpful suggestion, we now ask:
- how the program constructs a request,
- how the response is parsed,
- how conversation state is stored,
- and what happens when the model output is malformed or incomplete.
Figure 1 summarizes the basic flow that we will use repeatedly in this part.
What stays outside the model
One of the easiest mistakes in this part is to think of the model as the whole application. It is not — it’s just a component. The application has to decide how configuration is loaded, what the prompt looks like, what output shape is acceptable, what should happen if the model fails, and what should be shown to the user.
When thinking of what you’re working on in this part, always keep in mind that we’re building software that surrounds a model — the software is not the model.
The structure of this part is as follows:
- LLM APIs, SDKs, and Model Selection introduces practical API concepts, SDK layers, and model choice.
- Prompt Engineering for Applications focuses on prompt templates, constraints, and reusable prompt design.
- Conversations, State, and Structured Outputs explains how a CLI application can manage messages and structured responses.
- Validation, Errors, and Fallbacks shows how to keep model outputs from flowing unchecked into the rest of the application.
- Tutorial: Building a Chat Application combines the ideas into a small command-line chat program.
- Framework Variant: Building the Chat CLI with LangChainJS revisits the same application through a framework so that you can compare explicit and framework-based implementation styles.
Finally, Recap and Feedback summarizes the part and prepares you for later work with tools and more capable systems.