Self-paced study and interview practice

GenAI engineering preparation

Understand how models, retrieval and agents work. Practise the calculations, write the supporting code and explain your design decisions.

Your study record

0/40 lessons marked complete · 0 bookmarks

Progress and notes are stored in this browser. No sign-in or model API key is needed for this course.

Use this course as a mentor

  1. Understand: read the everyday explanation, predict the next stage and step through the visual.
  2. Test: attempt the worked task before revealing its solution, then change an input in the engineering lab.
  3. Explain: answer aloud for three minutes, compare the reference answer and save one gap to revisit.
  4. Prove: complete a coding task and a project; retain tests, traces and measured limitations as interview evidence.

New to GenAI? Follow the modules in order. If you already build RAG systems, start with retrieval quality, evaluation and production engineering, then revisit weak foundations. Depth follows your relevant experience, not a guaranteed question quota or hiring outcome.

40 concepts shown

Model foundations · 15 min

Tokens

A tokenizer breaks text into pieces that a model can represent as numeric IDs. A piece can be a whole word, part of a word, punctuation or bytes.

Lesson 1

Model foundations · 15 min

Embeddings

An embedding maps an input to a numeric vector. A retrieval system compares those vectors to find related content. Similarity is useful evidence for ranking, not proof of truth.

Lesson 2

Model foundations · 15 min

Attention

Attention combines token representations using weights computed from queries and keys. It helps a token use information from other allowed positions.

Lesson 3

Model foundations · 15 min

Next token

An autoregressive model produces a distribution over possible next tokens, chooses one under a decoding rule, appends it and repeats.

Lesson 4

Generation behavior · 15 min

Temperature

Temperature changes the sharpness of a sampling distribution by scaling logits. Lower values concentrate probability; higher values spread it.

Lesson 5

Generation behavior · 15 min

Context window

The context window limits how much tokenized information a model request can accommodate. Applications choose what to include and what to leave out.

Lesson 6

Generation behavior · 15 min

Hallucination

A hallucination is generated content that is unsupported or false in the task context. A confident style does not make it reliable.

Lesson 7

Generation behavior · 15 min

Reasoning models

Some models are trained to spend more computation on difficult problems before producing an answer. Extra reasoning can improve results but cannot guarantee correctness.

Lesson 8

Prompting and tools · 15 min

System prompt

A system prompt provides high-priority behavioral instructions in APIs that support instruction roles. It shapes responses but is not a security boundary.

Lesson 9

Prompting and tools · 15 min

Few-shot

Few-shot prompting includes examples that demonstrate a desired input-output pattern without updating model weights.

Lesson 10

Prompting and tools · 15 min

Structured output

Structured output constrains an answer to a shape such as a JSON schema. Correct structure and correct meaning are separate requirements.

Lesson 11

Prompting and tools · 15 min

Tool calling

Tool calling lets a model propose a named operation with arguments. Application code validates and executes permitted operations, then returns the result.

Lesson 12

Context and memory · 15 min

Context engineering

Context engineering selects and organizes the instructions, evidence, state and tool information supplied to a model for a particular task.

Lesson 13

Context and memory · 15 min

Lost in the middle

Some long-context experiments find lower retrieval performance when relevant information appears in the middle. This is an observed behavior to test, not a rule for every model or task.

Lesson 14

Context and memory · 15 min

Memory

Agent memory is application-managed information retained across steps or sessions. It can include temporary state, past events, facts or procedures, with explicit storage and retention rules.

Lesson 15

Context and memory · 15 min

Prompt caching

Prompt caching can reuse computation for a compatible repeated prompt prefix. It is different from storing and returning a previously generated answer.

Lesson 16

RAG foundations · 20 min

RAG

Retrieval-augmented generation supplies relevant external evidence to a model before it answers. The application must retrieve authorized material and verify that the answer uses it correctly.

Lesson 17

RAG foundations · 20 min

Document parsing

Document parsing turns source files into usable text and structure while preserving reading order, headings, tables and provenance. Bad parsing can break retrieval before a model sees the content.

Lesson 18

RAG foundations · 20 min

Chunking

Chunking divides documents into retrievable units. Useful boundaries preserve enough context for an answer without filling the prompt with unrelated text.

Lesson 19

RAG foundations · 20 min

Vector search

Vector search retrieves stored representations near a query vector under a similarity metric. Approximate indexes trade some recall for speed and memory.

Lesson 20

Retrieval quality · 20 min

Hybrid search

Hybrid search combines complementary retrieval methods, commonly lexical and semantic search, to handle both exact terms and paraphrases.

Lesson 21

Retrieval quality · 20 min

Reranking

A reranker scores a smaller candidate set against the query to improve ordering after retrieval. Better ordering can improve evidence quality, at additional compute cost.

Lesson 22

Retrieval quality · 20 min

Query rewriting

Query rewriting transforms a question into a search-friendly form while preserving the user intent and known facts. It must not invent details.

Lesson 23

Retrieval quality · 20 min

Evidence-grounded abstention

Abstention means declining to assert an answer when the available evidence is insufficient. It differs from refusing a disallowed request for safety reasons.

Lesson 24

Agent foundations · 20 min

Workflow vs agent

A workflow follows application-defined steps; an agent lets a model choose some next actions based on observations. Both need limits and reliable application controls.

Lesson 25

Agent foundations · 20 min

Agent loop

An agent loop repeatedly observes state, chooses a permitted action, receives a result and decides whether to stop. The application enforces budgets and permissions.

Lesson 26

Agent foundations · 20 min

MCP

Model Context Protocol standardizes how AI applications connect to capabilities such as tools and resources. It does not grant permission to every connected system.

Lesson 27

Agent foundations · 20 min

Human in the loop

Human review pauses a workflow before a consequential action or uncertain decision. Approval must refer to the specific action the reviewer sees.

Lesson 28

Agent orchestration · 20 min

Planning

Planning breaks a task into dependencies and selects an execution order. Independent work may run together; dependent work must wait for the results it needs.

Lesson 29

Agent orchestration · 20 min

Reflection

Reflection is a review step that checks an output against criteria and may propose a revision. Repeating self-criticism does not prove the final answer is correct.

Lesson 30

Agent orchestration · 20 min

Multi-agent

A multi-agent design assigns work to multiple model-driven roles or processes. It can help some decomposable tasks but adds coordination, cost and failure paths.

Lesson 31

Agent orchestration · 20 min

Compounding errors

A multi-step task can fail even when each step usually succeeds. Long chains make it important to measure whole-task outcomes and recovery.

Lesson 32

Evaluation and safety · 20 min

Evals

Evaluations test defined behaviors on representative examples with explicit labels or scoring criteria. They help compare changes and detect regressions before and after deployment.

Lesson 33

Evaluation and safety · 20 min

LLM-as-judge

An LLM judge scores another output using a rubric. It can scale review but can exhibit position, verbosity and model-preference biases.

Lesson 34

Evaluation and safety · 20 min

Prompt injection

Prompt injection occurs when untrusted content attempts to redirect model behavior or tool use. Retrieved documents and tool responses can carry instructions that conflict with the actual task.

Lesson 35

Evaluation and safety · 20 min

Guardrails

Guardrails are layered controls that constrain inputs, outputs and actions. They reduce specific risks but need measurable coverage and cannot guarantee every attack is stopped.

Lesson 36

Production engineering · 20 min

Token cost

Token cost depends on measured usage, the applicable input and output rates, cache rules and any additional service fees. Estimate with explicit assumptions and verify against actual billing.

Lesson 37

Production engineering · 20 min

KV cache

A KV cache stores attention keys and values from previous tokens so decoding need not recompute them for each new token. Its memory grows with workload and model architecture.

Lesson 38

Production engineering · 20 min

Quantization

Quantization represents weights or activations using lower-precision formats. It can save memory and change speed, with quality and hardware-dependent trade-offs.

Lesson 39

Production engineering · 20 min

Fine-tuning and LoRA

Fine-tuning changes model parameters for a task. LoRA trains smaller low-rank updates while keeping selected base weights frozen. It is different from adding facts through retrieval.

Lesson 40