Skip to content

Patterns

Recurring architectural and design patterns in AI/LLM systems — RAG, tool calling, agentic workflows, routing, guardrails, and security trust boundaries. Updated for early January 2027 SOTA standards (incorporating Claude 5.1, FastMCP 3.1, GPT-5.5/5.6, Gemini 4.0 Pro, Llama 4, and Pydantic v2 validation).

Contents

Common Patterns

  • RAG (Retrieval-Augmented Generation) — Grounding LLM output with retrieved context via vector and tree-based indices
  • Agentic Workflows & Multi-Agent Collaboration — Autonomous iterative execution loops with state management and dynamic handoffs
  • Tool Calling & MCP 3.1 — LLMs invoking external tools via FastMCP 3.1 structured schemas and type-safe contracts
  • Fine-tuning & Open Models — Adapting open models (Llama 4, Gemma 3, Qwen 3.8) via LoRA/QLoRA for domain-specific behavior
  • Skills & Capability Modules — Self-contained behavior modules with explicit triggers, system instructions, and permission constraints
  • Routing & Trust Boundaries — Zero-trust query routing, boundary isolation, and security sanitization across multi-tier LLMs
  • Guardrails & Structured Validation — Pydantic v2 schema-first input/output validation, safety filtering, and structured JSON output

Contribution Metadata

  • Last reviewed: 2027-01-07
  • Confidence: high

  • Sandboxed Code Execution — Pattern for safely executing untrusted code in isolated container/microVM runtimes.

  • System Prompt Engineering — Methodology and design patterns for system prompts in LLM and agentic workflows.