local-ai·lab
local-ai-lab — a neural network flowing into ascending learning steps

Build local AI,
one lesson at a time.

A hands-on course where you build small, fully working programs from scratch — and understand every line. Everything runs on your own machine, with no API key required.

The curriculum

Lesson 1

RAG from scratch

Extract → chunk → retrieve (BM25 + embeddings) → grounded answer with citations. A drag-and-drop document Q&A app.
✓ Available
Lesson 2

MCP servers

Expose your document search as a Model Context Protocol tool that Claude Code can call natively.
✓ Available
Lesson 3

Hybrid retrieval & reranking

Combine BM25 keyword search with a semantic arm and fuse them with Reciprocal Rank Fusion — offline, in Python, Node.js and C#.
✓ Available
Lesson 4

RAG safety & prompt injection

Treat retrieved documents as untrusted input — defend against prompt injection and poisoned content.
Planned
Lesson 5

RAG evaluation & regression testing

Golden questions, groundedness scoring, and regression tests — turn "seems good" into a tracked number.
Planned
Lesson 6

Repo-aware AI assistant

Ground an assistant in your codebase so it answers with repo-specific context instead of generic guesses.
Planned
Lesson 7

LangChain

Rebuild the RAG pipeline with LangChain and compare the trade-offs against your from-scratch version.
Planned
Lesson 8

LangGraph

Turn the pipeline into a stateful agent graph with retries, tool routing, and memory.
Planned
Lesson 9

Ollama + Function Calling

Give a local model real tools it can call (function calling) — 100% offline.
Planned
Lesson 10

Microsoft Semantic Kernel

Rebuild the agent in C# / .NET with SK plugins and auto function calling — runs locally.
Planned
Lesson 11

AWS Bedrock Agents

Knowledge bases + action groups on a managed cloud agent, built and driven from your machine.
Planned
Lesson 12

Google AI Development Kit

Build and run a Gemini agent locally with Google's open-source ADK.
Planned
Lesson 13

AI-assisted testing

Generate, run, review, and let failures guide the fix — better coverage without blindly trusting generated tests.
Planned
Lesson 14

AI code review & issue detection

Use AI to catch the serious issues in review — real bugs, security, and risky changes.
Planned
Lesson 15

Documentation from sprint changes

Generate release notes and docs straight from a sprint's commits and pull requests.
Planned

Why "from scratch"?

Most tutorials teach you to glue frameworks together. This course does the opposite: you write the chunker, the retriever, the grounding prompt, and the provider abstraction yourself — a few dozen lines each. Once you understand the primitives, every framework (LangChain, LlamaIndex, LangGraph) becomes obvious, because you already know what it automates.

How each lesson works

Every lesson is an interactive step-by-step slider. Each step explains what you're building and why, gives you the exact command to type, and shows the code. Use the / arrow keys, the dots, or the buttons to move between steps. Any step is deep-linkable, so you can share a link straight to a specific point.

Setup, PDFs & languages

Runs with the language toolchains directly — no Docker. One-time setup and per-lesson dependencies for Linux, macOS, and Windows are in the install guide. Every lesson is also a printable PDF. The course is polyglot: Python is the reference today, with Node.js and C# opt-in per lesson (./run -l 1 --lang node).

Begin Lesson 1 → Install guide (PDF) Lesson 1 (PDF)