Skip to content

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.

    Chatbot with Memory

  • RAG Pipeline


    Complete Retrieval-Augmented Generation with dense retrieval, hybrid search, reranking, and provider-formatted output.

    RAG Pipeline

  • Document Ingestion


    Ingest raw text and files, chunk with different strategies, enrich metadata, and index the results into a retriever.

    Document Ingestion

  • Custom Retriever


    Implement the Retriever protocol to create your own retriever and integrate it with ContextPipeline and HybridRetriever.

    Custom Retriever

  • Evaluation Workflow


    Evaluate retrieval quality with standard metrics and compare configurations using A/B testing with statistical significance.

    Evaluation Workflow

  • Agent with Tools


    Build an agent with custom tools, skills, and memory using the @tool decorator and SkillRegistry.

    Agent with Tools

  • Production Patterns


    Battle-tested patterns for deploying anchor in production: error handling, observability, performance tuning, and testing strategies.

    Production Patterns