all work

~/work/cookbook-rag

RAG Cookbook

An AI chef that actually knows what's in your pantry: grounded answers, not confident guesses.

role
Solo: full-stack + AI
timeframe
2026
status
● public
stack
Python · Flask · AWS · RAG · Vector search
ai
Grounded RAG chat + AI image generation
links
GitHub · walkthrough on request

01The problem

Ask a plain chatbot for a recipe and it'll happily invent one, ignoring what you actually own and what you've actually cooked. I wanted a cooking assistant whose answers were grounded in a real, personal recipe collection and pantry, and honest about it.

Chef AI chat answering a recipe-specific question, grounded in a 505-recipe knowledge base
The AI chef answers recipe-specific and general cooking questions, grounded in a 505-recipe index.

02The approach

At the core is a RAG pipeline. Recipes are embedded and stored for vector search; when you ask a question, the most relevant recipes are retrieved and fed to the model as grounding, so the "AI chef" answers from your cookbook instead of hallucinating.

  • Recipe upload into a searchable, embedded collection.
  • Pantry tracking with suggestion logic that recommends recipes from what you already have.
  • Grounded chat for both recipe-specific and general cooking questions.
  • AI image generation to visualize new dishes.

03Architecture

A Flask backend fronts everything; the RAG engine sits between it and Amazon Bedrock, and S3 is both the recipe store and the Knowledge Base's data source. The whole thing runs as aDocker container on EC2 with an IAM instance role, so no AWS credentials are ever stored.

storesdata sourceJWT cookiehostsretrievegenerateExternal services

Google Gemini
AI recipe photos

SES + Lambda
cooking-buddy email

Amazon Bedrock

Knowledge Base
OpenSearch Serverless vectors

Titan Embeddings

Nova Lite 1.0
chat · recipe gen · parsing

Data · S3 + Aurora

Aurora PostgreSQL 17
users · recipes · pantry · chats

Amazon S3
recipe .md · images

Flask 3 · app.py

Blueprints
/auth · /recipes · /chat · /pantry

RAG Engine
retrieve_chunks · ask_chef · sync_kb

User

Docker on EC2 · IAM instance role

The full request + data flow, straight from the repo's architecture. Drag to pan, or use the +/− controls (⌘/Ctrl + scroll) to zoom.

04Highlights

Pantry view with ingredient tracking and a find-recipes action
Pantry tracking drives recipe suggestions from what you already have.
Recipe page for a Chef-AI-created cheeseburger with its AI-generated photo
A recipe created in chat, complete with its AI-generated photo (stored on S3).

05What it taught me

RAG Cookbook is where I got hands-on with the pattern behind most useful LLM products:retrieval as the guardrail against hallucination. Grounding, embeddings, and vector search stopped being buzzwords and became a pipeline I've now shipped.