Repository for the 5-day cohort course on building production AI systems with retrieval, memory, evals, and human-in-the-loop patterns.
- Node.js (version 22 or higher)
- pnpm (recommended) or npm/yarn/bun
- AI SDK v5 knowledge (prerequisite)
- API keys for AI providers:
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude)
- Google AI Studio (Gemini)
- Clone this repository:
git clone https://github.com/mattpocock/cohort-002-skill-building.git
cd cohort-002-skill-building- Install dependencies:
pnpm install- Configure your environment:
cp .env.example .env- Add your API keys to
.envand you're ready to start!
- BM25 keyword search, embeddings, rank fusion, query rewriting
- Chunking (fixed-size vs structural), reranking
- Agentic search, metadata-first patterns
- Semantic and episodic memory
- Working memory with infinite conversations
- CRUD operations on memory store
- Evalite framework testing
- Deterministic scorers, LLM-as-judge
- A/B testing models and prompts
- Approval flows for destructive actions
- Thread-scoped permissions
- MCP server integrations
Start by running pnpm dev:
pnpm devThis will allow you to choose between the different course sections.
You can also run pnpm exercise <exercise-number> to jump to a specific exercise.
exercises/
├── 01-retrieval-skill-building/ (6 exercises)
├── 02-retrieval-project-work/ (3 exercises)
├── 03-retrieval-day-2-skill-building/ (5 exercises)
├── 04-retrieval-day-2-project-work/ (4 exercises)
├── 05-memory-skill-building/ (4 exercises)
├── 06-memory-project-work/ (3 exercises)
├── 07-evals-skill-building/ (6 exercises)
├── 08-evals-project-work/ (2 exercises)
├── 09-human-in-the-loop-skill-building/ (6 exercises)
└── 10-human-in-the-loop-project-work/ (3 exercises)
Each exercise follows this learning structure:
- Your coding playground - Start here!
- Contains
readme.mdwith detailed instructions - Code files with
TODOcomments for you to implement
- Reference implementation - Check when you're stuck
- Complete, working code for each exercise
- Great for comparing approaches and learning best practices
- Deep dives - Additional explanations and concepts
- Extended walkthroughs of complex topics
- Perfect for reinforcing your understanding
- AI SDK v5 - Core LLM interactions
- React 19 + Vite - Frontend
- Hono - Backend API framework
- okapibm25, embeddings - Retrieval techniques
- Evalite - Testing framework
- OpenAI, Anthropic, Google - AI providers
datasets/emails.json- Email corpus (75-547 emails)datasets/total-typescript-book.md- TypeScript documentation- Custom dataset support via Gmail mbox export
- Check the solution - Each exercise has a completed version
- Verify your setup - Ensure API keys and dependencies are correct
- Visit the course - Full explanations available on aihero.dev
