Patterns¶
Recurring architectural and design patterns in AI/LLM systems — RAG, tool calling, routing, guardrails, and more.
Contents¶
- Retrieval-Augmented Generation (RAG) — Grounding LLM output with retrieved context
- Tool Calling & Model Context Protocol (MCP) — Universal standard for connecting LLMs to external tools and data
- Claude Tool Search Pattern
- Agent Skills Best Practices — Skill authoring, trigger design, permission model, validation checklist
- Fine-tuning Open Models — LoRA/QLoRA, Unsloth, axolotl, MLX, dataset prep, GGUF export for Ollama
- OpenClaw Workflow Prompt Library Pattern
- LLM Trust Boundaries Pattern
- Software Factories Pattern — Non-interactive development via seed, validation, and feedback loops
- Filesystem-as-Interface Pattern — Filesystem as the primary interface and persistence layer for agents
- Data Copilot MCP Tooling — Standardizing data access for Text-to-SQL pipelines using MCP
- Data Copilot Agentic RAG — Hybrid retrieval pattern for diagnostic analytics
Common Patterns¶
- RAG (Retrieval-Augmented Generation) — Grounding LLM output with retrieved context
- Fine-tuning — Adapting open models via LoRA/QLoRA for domain-specific behaviour
- Tool Calling & MCP — LLMs invoking external tools via structured schemas and the Model Context Protocol (MCP)
- Skills — Self-contained behaviour modules with triggers, instructions, and permissions
- Routing — Directing queries to specialised models or agents
- Guardrails — Input/output validation and safety filtering
- Chain-of-Thought — Structured reasoning prompts
- Multi-Agent Collaboration — Multiple agents coordinating on a task