KNOWLEDGE / LEARN BY DOING
Learn AI engineering.
Practice with runnable labs.
Build your understanding of RAG, prompts, agents, and vector search. Run a small example, change one thing, then test what you know.
12 hands-on lessons · 60 explained questions · No API key needed
The labs use JavaScript and Node.js 22 or newer. Each includes its data, a downloadable script, expected output, and a follow-up exercise. You can read the explanations and questions without running code.
RAG & retrieval
Keep evidence intact, combine rankings, and measure what was found.
Keep a rule and its exception together
Split a tiny returns policy two ways, then check which chunks contain the complete answer.
LAB 02Combine two retrieval rankings
Use reciprocal rank fusion to merge keyword and semantic candidates without mixing their raw scores.
LAB 03Check the evidence behind an answer
Reject invented source IDs and distinguish a valid citation from a supported claim.
LAB 04Measure what Top K changes
Calculate precision and recall on a tiny labeled retrieval result before changing your pipeline.
Prompt & context
Separate instructions, budget context, and validate the result.
Separate the task from source text
Build a clearly structured request, then enforce a tool boundary outside the prompt.
LAB 02Make a context budget before sending
Reserve room for output, keep important evidence, and remove history with an explicit rule.
LAB 03Validate JSON before using it
Test four responses against a small application contract, including valid JSON with invalid fields.
Agent engineering
Build tool boundaries, stop failed loops, and manage memory.
Validate a tool call before it runs
Build a tiny dispatcher that rejects unknown tools and malformed arguments before execution.
LAB 02Stop a failing agent loop
Give a controller a fixed attempt budget and distinguish success, permanent failure, and exhaustion.
LAB 03Recall the right memory for the right user
Select a current preference while rejecting expired and unrelated records.
Vector search
Understand similarity and retrieve from the right records.