
Built and maintained by Sangam Pandey
I am a software engineer who has spent the past several years building production systems that use large language models. Not demos or prototypes. Systems that handle real traffic, real data, and real users who do not care how the magic works as long as it works reliably.
GenAI Patterns grew out of frustration. Every time I started a new LLM integration, I found myself solving the same structural problems from scratch. How should retrieval feed into generation? When does an agent need a planning step versus a simple loop? What happens when the model hallucinates inside a chain that other systems depend on? The answers existed, scattered across research papers, blog posts, framework documentation, and hard-won production experience. But nobody had organized them into a single, decision-oriented reference.
So I started writing one. What began as personal notes turned into a structured catalog. Each pattern follows the same format: the problem it solves, the core mechanism, when to use it, what can go wrong, and the honest trade-offs. The goal is not to be encyclopedic. The goal is to help you make better architectural decisions faster.
My day-to-day work sits at the intersection of AI-assisted development and practical software engineering. I build RAG pipelines that ground model output in domain-specific data. I design agent architectures that coordinate multiple LLM calls with tool use and human-in-the-loop checkpoints. I write the guardrails and evaluation pipelines that keep these systems from silently failing in production.
I also spend a significant amount of time writing about what works and what does not. My blog at sangampandey.info covers vibe coding, AI-assisted development, and the practical realities of shipping LLM-powered features. The writing comes from building, not from reading about building.
The generative AI space moves fast. New models, new frameworks, and new techniques appear every week. But the underlying design patterns change slowly. A well-designed RAG pipeline from 2023 still works in 2026 because the structural decisions (chunk size, retrieval strategy, context assembly) matter more than which model sits at the end. Patterns are the stable layer beneath the hype.
This catalog is vendor-neutral by design. Every pattern works across OpenAI, Anthropic, Google, and open-weight models. I do not assume you are locked into a specific provider or framework. The goal is to give you transferable knowledge that survives the next model release cycle.
GenAI Patterns currently covers 29 patterns across 8 categories, with 1 composition guides that show how patterns fit together. New patterns are added as I encounter and validate them in production work. The catalog also includes a free downloadable book with every pattern and guide in one offline-ready package.
This is a living project. If you have feedback, spot an error, or want to suggest a pattern that is missing, I would like to hear from you.