LLM application patterns
After enough people build with LLMs, a handful of recurring shapes emerge — like design patterns in ordinary software. Knowing them saves you reinventing the wheel: when a new problem arrives, you can often say this is a retrieval problem or this needs an agent and reach for a known recipe rather than starting from scratch.
The common patterns include a single prompted call for simple transformations; chaining, where one model output feeds the next step; routing, where a cheap classifier sends each request to the right specialised prompt or model; retrieval-augmented generation, which fetches documents to ground the answer; and agents, which let the model decide a sequence of tool calls in a loop. Many real systems compose several of these — a router in front of a retrieval pipeline whose answers feed a final formatting step.
These patterns are a vocabulary for design, not rigid templates, and the skill is choosing the simplest one that solves the problem. A common mistake is reaching for a complex autonomous agent when a single well-written prompt or a fixed two-step chain would be cheaper, faster, and far easier to debug. Start simple, and add structure only when a concrete failure demands it.