AI Engineering NotesRohit’s interview study guide
AI Lab

Real models, running in your browser.

Five hands-on tools for the ideas this course teaches. Everything runs on your device: open models from Hugging Face run with transformers.js on your GPU (WebGPU) or CPU, and nothing you type is sent to a server. Tools that need a model say how big it is and ask before downloading; your browser keeps it for next time.

Tokenizer

Models don't read letters or words: they read tokens. Type anything and watch real tokenizers cut it up.

Try this: Try the strawberry, Hindi and code presets, then switch tokenizers: the same text is a different number of tokens on each, which is why prices and context limits are per token. Read: Tokens and tokenizers →

Next token and sampling

A real 135M-parameter model shows its probabilities for the next token. Bend them with temperature, top-k and top-p, then let it write.

Try this: Generate at temperature 0 twice (identical), then at 1.5 (different every time, and stranger). Watch which tokens top-p cuts. Read: Sampling: temperature, top-p and top-k →

Embeddings

Every sentence becomes 384 numbers. Similar meanings land close together, even with no words in common.

Try this: Open “Same words, different meaning”: the two “bank” sentences share a word but sit far apart, while “central bank increased the cost of borrowing” lands next to “raised its interest rates”. Read: What embeddings are →

RAG pipeline

Retrieval-augmented generation with every stage visible. Chunking, vector and keyword search, fusion, reranking, the prompt and the answer.

Try this: Ask “Can I use Lumen on a Linux server?”: nothing in the documents answers it, so a good answer says it doesn't know. Change the chunk size and watch the hits change. Read: The RAG pipeline end to end →

Agent loop

A model, four tools and the loop between them. Step through it and watch the messages list grow on every call.

Try this: Step through the recorded runs first (a real Gemma 4 E4B model's choices, recorded on a Mac), then run the same task live with the tiny model in your browser and read what the automatic check at the end flags. Read: The agent loop in code →

Models: all-MiniLM-L6-v2 and ms-marco-MiniLM-L-6-v2 (sentence-transformers / cross-encoder, Apache 2.0), SmolLM2-135M-Instruct (Hugging Face, Apache 2.0), Qwen3-0.6B (Qwen, Apache 2.0). Downloads come from huggingface.co and the ONNX Runtime WebAssembly from cdn.jsdelivr.net. The documents in the RAG tool are a made-up app's help centre written for this Lab.

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.