StackPractices

Tag: ai-pattern

Browse 8 practical software engineering resources tagged with "ai-pattern". Discover code recipes, design patterns, documentation templates, and in-depth guides to help you build, deploy, and maintain production-ready solutions involving ai-pattern. Each resource is written for engineers who ship real systems, with copy-paste examples and practical trade-offs.

AI and LLM Patterns

AI patterns capture proven approaches to building systems with language models, embeddings, and agents. They help manage cost, latency, reliability, and user experience.

The resources below cover RAG, prompt chaining, agents, function calling, guardrails, and model routing. Each guide shows how to build AI systems that are reliable and cost-effective.

Every resource includes clear explanations, copy-paste code, and practical warnings. Use them to make informed decisions, avoid production pitfalls, and speed up your delivery. If you are just getting started, read the beginner-friendly articles first; if you are experienced, jump straight to the advanced patterns and architecture guides. New resources are added regularly, so bookmark this page and check back for the latest patterns.

Agent Tool Selection Pattern

Dynamically select which tools an LLM agent can use based on the task context. Reduce token usage...

Embedding Cache Pattern

Cache LLM embeddings to reduce API calls and cost. Store embeddings with a content hash key and...

Human-in-the-Loop Pattern

Pause LLM agent execution for human approval before high-impact actions. Route decisions to a...

LLM Fallback Pattern

Fall back to alternative LLM providers or models when the primary fails. Handle rate limits,...

LLM Guardrails Pattern

Validate LLM inputs and outputs with rules, classifiers, and content filters. Prevent prompt...

LLM Router Pattern

Route queries to different LLM models based on complexity, cost, and latency requirements. Classify...

Prompt Chaining Pattern

Chain multiple LLM calls where each step's output feeds the next step's input. Break complex tasks...

RAG Hybrid Search Pattern

Combine keyword (BM25) and semantic (vector) search to improve retrieval accuracy in RAG pipelines....