For leaders: AI features in two hours¶
For engineering managers, directors, product leaders and architects who approve, fund or review AI work. You won't build the labs. You will learn enough to ask the right questions, spot a weak plan, and know what "done" looks like.
Time: about 2 hours. 30 minutes reading, 45 minutes running three labs, 45 minutes applying it to a real proposal. Needs: the setup in INSTALL.md (or ask an engineer to run the labs with you). No Python needed to follow along. For your team: the skills ladder says what engineers at each level should be able to show you.
1. Six ideas that explain most AI projects (10 min)¶
- The model only knows what you send it in this one call. No memory, no access to your systems, unless your code adds them. Most "the AI got it wrong" bugs are "we didn't give it the right context".
- The model proposes; code decides. Prices, stock, credit, permissions and anything that writes or spends money live in code. A fooled model should only be able to produce a wrong suggestion.
- No eval, no ship. A team that can't show a score on a fixed set of test cases (a golden set) can't tell you whether a change made things better or worse. Demos prove nothing.
- Tokens are the unit of cost and speed. Every word in and out is billed and adds latency. Long prompts and retrieved documents, sent on every call, are usually most of the bill.
- A workflow first, an agent only when needed. If the steps are known, write them in code. Let the model choose steps only when they depend on what it finds. Agents are slower, cost more and fail in new ways.
- Every call is traced. If you can't see what the model was sent, what it called and what it returned, you can't debug, audit or price it.
The longer version of each is in System design sections 1 and 2.
2. Run three labs and watch them fail (45 min)¶
Each lab ends with an Expected output from a real run, mistakes included. Compare yours with it.
| Lab | Time | What to watch for |
|---|---|---|
| prompting/04_prompt_versions.py | ~3 min | Three versions of one prompt, scored on 20 cases. Clear definitions jump the score; adding examples on top costs more tokens for no gain. A version ships only if it's better on a slice and worse on none. This is what "we improved the prompt" should look like. |
| agents/01_agent_loop.py | ~1 min | The agent finishes, says "done", and is wrong: it invents a business rule. The trace shows it in seconds. "Done" means the model stopped, not that the goal was met. |
rnr: 00_generate_data.py, then 05_golden_set_eval.py, then 09_cost_meter.py |
~4 min | A golden-set eval with precision and recall, then the same calls priced in ₹ per 1,000 reviews, API vs self-hosted. Cost and quality side by side: a cheaper prompt is only cheaper if the score held. |
Run them from the topic folder, for example cd prompting && python 04_prompt_versions.py.
3. Questions for every AI design review (15 min to learn, use forever)¶
Ask for these before approving a build. A good team has answers on one page.
The problem - Which parts need language, and which are plain code? (If the answer is "all of it", push back.) - What happens today without AI, and what does a mistake cost?
Quality - What is the golden set: how many cases, from where, labelled by whom? - What score do we need to launch, and on which slices (language, customer type, product)? An average can hide a slice that got worse. - What does the model do when it doesn't know? Is "I don't know" or "a person will reply" an allowed answer?
Safety - What can the model do, not just say? Which tools write, spend or send? - Where does a person approve, and is that enforced in code? - Can one customer see another's data through search or tools? Where is that filter? - What happens when someone types "ignore your instructions"? (See the OWASP map.)
Cost and speed - Tokens per request, requests per day, cost per request. Show the working (System design §3). - Time to first word and time to full answer, at p95. - What happens when the model provider is down or slow? Fail open or closed?
Operations - Is every call traced, with the prompt version and model? - Who can change a prompt, and does that change run the eval before it ships? - What happens when the provider releases a new model version?
4. Rules of thumb for decisions (10 min)¶
| Decision | Start with | Change when |
|---|---|---|
| Build or buy | Buy for generic jobs (meeting notes, code assistants, ticket summaries). Build when it touches your own data, rules and workflows | A vendor can show an eval on your data, and their data and security terms pass review |
| Hosted model or self-hosted | Hosted, behind one internal gateway | Data can't leave, or volume makes GPUs cheaper than per-token billing (rnr/09 shows the crossover) |
| Big model or small | The smallest model that passes the eval | A slice that matters fails and a bigger model fixes it on the eval |
| RAG or fine-tuning | RAG: facts change, and you need citations | Fine-tuning only for style or a narrow, stable task, after RAG and prompting are measured |
| Framework | Hand-rolled, small, readable | Long-running, pausable, multi-step flows: a framework such as LangGraph |
| Agent or workflow | Workflow | The steps really depend on what the model finds, and the eval shows the agent is worth the cost |
| Launch | Shadow mode or internal users first, people checking outputs | The eval and real traffic agree, and the failure path is tested |
More in each topic's learn guide, section "Decisions your team will face".
5. How to read an eval number (5 min)¶
- Ask for the set, not just the score. 95% on 20 easy cases means little. 85% on 200 real, hard cases means a lot.
- Ask for slices. "Better on average, worse for Hinglish buyers" is a regression.
- Ask which mistakes are expensive. Holding a good review for a person costs a minute. Publishing an abusive one costs trust. Precision and recall are weighed by cost, not equally (rnr/learn-evals.md).
- An LLM judge is a tool, not a truth. If a model grades the output, ask how often the judge agrees with people (rnr/13).
- Scores go stale. Real users write differently from test cases. Good teams add real misses to the golden set every week.
6. Why AI projects stall (5 min)¶
| Pattern | What you see | What to ask for |
|---|---|---|
| Demo trap | A great demo, then months of "almost ready" | A golden set and a launch score agreed in week one |
| Model as database | The model is asked for prices, stock or policy from memory | Facts from tools and documents, with citations |
| Agent for everything | Slow, costly, unpredictable flows that a script could do | A workflow first; an agent only where the steps vary |
| No owner for quality | Nobody can say if this week is better than last | One person owns the eval and its trend |
| Cost surprise | The bill arrives after launch | Cost per request measured before launch, a budget per feature in the gateway |
| Silent drift | Quality drops after a provider updates the model | Pinned model versions; the eval reruns before any change |
| Trust gap | Users don't trust answers, so they check everything | Citations, "I don't know", and a clear handoff to a person |
7. Growing your team (5 min)¶
What to look for when hiring or growing AI engineers. None of these need an ML degree.
| Skill | What it looks like | Where the course teaches it |
|---|---|---|
| Structured output and validation | Gets data, not prose, back from a model and checks it | prompting 03, llm-api 05 |
| Evals | Builds a golden set, scores a change, reads the misses | prompting 04, rag 09, rnr 05 |
| Retrieval | Gets the right passages in front of the model, with access control | rag |
| Tool design and safety | Tools with tight inputs, approval for writes, idempotent actions | llm-api, mcp-server, whatsapp-agent 04 |
| Operating | Traces, cost per request, fallbacks, fail closed | rnr phases 3 and 5 |
| Judgment | Knows when not to use a model, an agent or many agents | multi-agent 06, System design |
To roll the course out to a team: engineers take the Core path, about 28 labs over a few weeks.
Each topic's PRACTICE.md ends with a build task; review those like real pull requests.
Leads add the "Before you ship" labs before anything reaches real users.
8. Apply it (45 min)¶
Take one AI proposal from your own team. Write one page:
- The request path: which boxes from System design §1 it uses.
- The quality bar: golden set size, launch score, the slices that matter.
- The envelope: requests a day, tokens per request, cost per request.
- What the model can never do on its own.
- Your three biggest open questions from section 3 above.
If the team can't fill it in yet, that's the first milestone.
Where next¶
- System design: the whole request path, the sizing method and a worked example.
- OWASP LLM Top 10 map: for security reviews.
- Glossary: every term from design reviews, in one line each.
- Model providers: cost and data rules per provider.