Cookbook Template
Cookbooks are narrative tutorials. They start with a real problem, show the broken path, then layer production-ready fixes. Use this template verbatim so every contributor (human or LLM) ships the same experience.❌ DO NOT COPY — Guidance & Constraints
- Tell a story: problem → broken demo → iterative fixes → production patterns.
- Keep tone conversational; use real names (“Max”, “Sarah”), not
user_123. - Opening must stay tight: ≤2 short paragraphs (no bullet lists) before the first section.
- Inline expected outputs immediately after each code block.
- When modernizing an existing cookbook, keep the narrative beats, screenshots, and sample outputs—reshape them into this arc instead of rewriting unless the workflow changed.
- Limit callouts to 3–5 per page. Prefer narrative text over stacked boxes.
- Always provide Python and TypeScript tabs when an SDK exists for both.
- Every page must end with exactly two navigation cards (left = related/side quest, right = next cookbook in the journey).
✅ COPY THIS — Content Skeleton
Paste the block below into a new cookbook, then replace all placeholders. Remove any section you don’t need only after the happy path works.Mention any prerequisites (API keys, environment variables) right here if the reader must do something before running code.
Make It Work Once
[Set context with characters + goal.]Expected output (Python):
[describe inline] · Expected output (TypeScript): [describe inline]The Problem
[Explain what breaks without tuning.]Fix It – [Solution Name]
[Explain the fix and why it helps.]Build On It – [Second Layer]
[Add another enhancement, e.g., metadata filters, rerankers, batching.]Call out the most common mistake or edge case for this layer.
Production Patterns
- [Pattern 1] —
[When to use it] - [Pattern 2] —
[When to use it]
What You Built
- [Capability 1] — [How the cookbook delivers it]
- [Capability 2] — [How the cookbook delivers it]
- [Capability 3] — [How the cookbook delivers it]
Production Checklist
- [Actionable step #1]
- [Actionable step #2]
- [Actionable step #3]