
Issue #108 Agents Edwin Dong, Ahmad Khan
The Math-Based Guide to RAG, MCP, and Agents
Free editionPRO edition
This week’s PRO issue includes a Colab notebook, implementing RAG, MCP, and Agents from scratch with Python code.
We'll load official models, investigate embeddings, build an agent loop from scratch, and do some visualizations. Please do read the full article before attempting the code tutorial.
As always, the code in this issue can be executed on a normal home PC and does not require a large amount of VRAM.
The monthly interview question bank can be found here. As we’re approaching the end of June, look out for a new update!
These are industry standard questions that are tested across major tech companies, AI research firms, and more. The questions are sorted by difficulty and topic.
Check back frequently for more questions, and let us know what type of questions you would like to see next!
After pre-training, a large language model is considered frozen, with its knowledge sealed inside its weights.
At this point, the transformer base itself is only able to take inputs and sample output tokens, meaning it can’t search the web, execute multi-step goals by itself, and access a specific company's documents or data.
These are notable limitations if you want a model to do real work.
Suppose an employee asks an LLM: "Is this customer eligible for a refund?" A model can't answer this on its own.
It doesn’t have the company refund policy,
It can't look up the order or interact with the company systems,
And it can't reliably carry out a multi-step workflow from start to finish.

We present 3 techniques that remove a constraint from foundational LLMs:
Retrieval-Augmented Generation (RAG) gives it knowledge it doesn't have to access information in an efficient way.
Model Context Protocol (MCP) gives it tools it can't reach, to act on systems.
Agents give it a loop to pursue a goal across many steps.
They build on each other and combine into a system that can actually tackle real, complex problems.
This edition is for PRO members.


