Cookbook
Practical recipes and patterns for building with anchor
Cookbook
Ready-to-use recipes that go beyond the basics. Each recipe is a self-contained guide with working code you can copy into your project.
-
Chatbot with Memory — Build a conversational chatbot with sliding-window memory, automatic eviction, and persistent facts.
-
RAG Pipeline — Complete Retrieval-Augmented Generation with dense retrieval, hybrid search, reranking, and provider-formatted output.
-
Document Ingestion — Ingest raw text and files, chunk with different strategies, enrich metadata, and index the results into a retriever.
-
Custom Retriever — Implement the
Retrieverprotocol to create your own retriever and integrate it withContextPipelineandHybridRetriever. -
Evaluation Workflow — Evaluate retrieval quality with standard metrics and compare configurations using A/B testing with statistical significance.
-
Agent with Tools — Build an agent with custom tools, skills, and memory using the
@tooldecorator andSkillRegistry. -
Production Patterns — Battle-tested patterns for deploying anchor in production: error handling, observability, performance tuning, and testing strategies.