20 AI Concepts Explained in 40 Minutes
Twenty Concepts
Every AI Engineer Should Know
The twenty terms engineers building AI applications actually use — from next-token prediction and attention to agents and quantization — explained by Gaurav Sen (GKCS) with concrete examples and honest caveats.
Source: youtube.com/watch?v=OYvlznJ4IZQ · Channel: Gaurav Sen (GKCS)
Agenda
What We'll Cover
Language & Meaning
- Large language models
- Tokenization
- Vectors
- Attention
Training & Behavior
- Self-supervised learning
- Transformers
- Fine-tuning
- Few-shot prompting
Context & Action
- RAG & vector databases
- MCP & context engineering
- Agents
Capability & Efficiency
- RLHF, chain of thought, reasoning models
- Multimodal models
- SLMs, distillation, quantization
The Vocabulary · Concepts 1–2
Predict the Next Token, One at a Time
Large Language Model
A neural network trained to predict the next token of an input sequence.
Pass "All that glitters" and it predicts "is," then "not," then "gold." The output looks like the model understands poetry; mechanically it is only ever completing a sequence.
Two ideas recur across all twenty terms: a neural network is numerical weights mapping input to output; training adjusts those weights so predictions improve.
Tokenization
Splitting text into discrete tokens — the smallest pieces the model derives meaning from.
Why not split on spaces? Natural language carries meaning inside words: shimmers, murmurs, flickers share the suffix "-s," which signals the subject performs the action; eating, dancing, singing share "-ing," the action is ongoing.
Stems and meaningful suffixes let the model recognize grammatical patterns and generalize to words it has never seen.
The Vocabulary · Concepts 3–4
Coordinates for Meaning, Context for Ambiguity
Vectors
Meaning becomes a coordinate in n-dimensional space.
- Words close in meaning land close together — synonyms cluster, opposites sit far apart
- Once the model knows its vocabulary's vectors, it knows the meaning of any input it can look up
- The catch: a word's spelling is fixed, but its meaning is not
Attention
Nearby words adjust the vector of an ambiguous word.
"Apple" — a tasty apple (fruit), Apple's revenue (company), the apple of my eye (a person). The word itself cannot decide; the surrounding words can.
"Revenue" pushes the vector toward the company cluster (Google, Meta, Microsoft); "tasty" pushes it toward the fruit cluster (banana, chiku, guava).
Attention was introduced in a landmark 2017 paper but stayed largely academic until 2022, when a consumer-facing chatbot built on the architecture reached the public and made LLMs famous.
Training · Concept 5
The Input Supplies Its Own Answer
Instead of telling the model what to do for every input, rely on the structure of the input itself: a blanked-out section can be predicted from what remains.
Supervised learning is expensive
A human must label every example: "if the input is 'All that glitters,' predict 'is not gold.'" Self-supervised learning instead takes text that already exists in the world — scraped from the internet — and creates multiple challenges from it with no human involvement.
From one sentence, three puzzles
"Et tu, Brute" yields three parallel puzzles: predict the token after "Et," after "Et tu," after "Et tu, Brute."
Guess right → weights stay unchanged. Guess "Caesar" instead of "Brute" → the loss rises and the weights are updated.
Architecture · Concept 6
The Transformer Is the Engine, Not the Car
The stack
Input tokens pass through an attention block, whose outputs feed a feedforward network; then another attention layer, then another feedforward network — stacked many layers deep (twelve, sometimes more, and hundreds in recent GPT architectures).
Meaning is manipulated again and again until the model is confident enough to emit the next token.
Each layer does something different
Early layers disambiguate terms using context; later layers find complex relationships — sarcasm, implications. In "A crane was hunting a crab," one layer settles that "crane" is the bird, not the construction machine; a deeper layer infers the crab is fearful and the crane is hungry.
Steering Behavior · Concepts 7–8
Change the Model, or Change the Request
| Fine-tuning | Few-shot prompting | |
|---|---|---|
| What changes | The model — weights adapted through curated question–answer sets | The request — example query–response pairs added to the prompt |
| When | A second training stage after self-supervised pre-training | At inference time, in production, while the user waits |
| Purpose | Domain behavior: medical jargon, financial terms, no more "I would like to know that too" | Output format and tone — one of the cheapest, most reliable steering tools |
What fine-tuning penalizes
Responses that are plausible and not strictly wrong but undesirable — refusals too, since models are trained to be helpful. Weights update until the model reliably answers as expected; one base model can be fine-tuned by many companies for their own customers.
Few-shot in action
"Where is my parcel?" is never sent alone — the server attaches a handful of example query–response pairs so the model shapes its reply accordingly. No training, no weight updates, and the quality of the response goes up noticeably.
Grounding · Concept 9
Retrieve, Augment, Generate
Few-shot examples teach the model how to respond — but where does it get the information? Your server fetches relevant documents in real time and sends them to the LLM alongside the examples and the user's query.
Three prompt ingredients
- Few-shot examples teach the format of a good response
- Documents supply company-specific context (policies, terms and conditions)
- The query carries the user's actual intent
The storage debate
Ask a graph database company and you will be told to store everything in a graph; a database vendor says vector; others say memory or cache. The choice matters less than the pattern itself — in practice it is usually a vector database, because finding relevant documents is just a similarity search.
Grounding · Concept 10
Similarity Search, Not Keyword Search
Why "upset" finds "low rating"
"I am upset with your payment system. I expect a refund." Your policy may never contain the word "upset" — but it may contain documents about low ratings or drop-offs. Vectors capture that semantic nearness, so the distance is small and those documents get fetched.
Retrieved content
The closest documents join the prompt along with the original query and the system prompt; the LLM converts them into vectors internally and generates the response.
A black box with a job
To the application engineer the vector database is mostly a black box: store documents in it, and when a query arrives, quickly retrieve the ones closest to it. Under the hood, algorithms such as hierarchical navigable small world (HNSW) graphs make the similarity search efficient.
External Context · Concept 11
A Standard Protocol for the Outside World
Vector databases handle context inside your system — but what if the context the model needs lives outside it entirely? MCP is a standardized way of transferring context into a model from the outside world. An MCP server wraps another company's database.
Context · Concept 12
The Umbrella Over Modern Techniques
Context engineering covers few-shot prompting (examples), RAG (retrieved documents), and MCP (external servers and actions) — plus two new challenges: user preferences and context summarization.
Beyond prompt engineering
Prompt engineering is a single, stateless prompt applied the same way whenever you ask the model to behave a certain way. Context engineering is long-term and dynamic — it evolves according to the user's declared preferences and previous chat history, adapting what the model sees over time.
The scale problem
You cannot keep sending every message ever exchanged. A common solution is a sliding window: the last hundred chats go verbatim, while everything older is summarized into about five sentences. Documents get the same treatment — summarize first, then send.
Summarization can be delegated to a cheap small language model or a distilled model, reserving the expensive large model for the final generation over compact, high-value context.
Autonomy · Concept 13
Long-Running Processes, Not Single Recipes
What an agent is
A long-running process — think of a server that receives API calls — with many capabilities.
It can query an LLM, query external systems, and query other agents, all to meet the user's requirements.
The travel agent example
It looks into booking flights, books hotels, and manages your email while you are away. When it spots a window of opportunity — flights have suddenly become cheap — it goes ahead and books according to your preferences, no prompting required.
Alignment · Concept 14
Plus One, Minus One, Repeated
Feedback that exists in nature
Pavlov's dog: ring a bell, give food, repeat — eventually the dog salivates at the bell alone, because it expects food. Its behavior has been reinforced, and the human's plus-one or minus-one reinforces good outputs the same way.
The fair-coin limit
An RL agent watching heads after heads keeps predicting heads — outcomes keep reinforcing it. A human told the coin is fair says 50/50, because they carry an internal model of how a fair coin works. RL cannot build such mental models; humans are not limited to outcome-based learning.
Reasoning · Concepts 15–16
Thinking Step by Step, Out Loud
Chain of thought
During training the model sees problems solved step by step, with the thought process made explicit — and applies that habit to new problems. The result is a series of deductions, usually much higher in quality than a direct, one-shot answer.
Crucially, the model can add new steps as it sees fit. This has been observed with DeepSeek: harder problem → more steps; easy problem → fewer.
Reasoning models (LRMs)
A model that can look at a problem and figure out how to solve it step by step. Chain of thought is one technique these models use, but not the only one: tree of thought explores multiple lines of reasoning in parallel, graph of thought branches further, and tool use calls external tools to strengthen the reasoning.
The category is defined by the capability, not the algorithm. Well-known examples: DeepSeek's reasoning models and OpenAI's o1 and o3 series.
Capability · Concept 17
Beyond Text: Images and Video
Accepting and creating media
Multimodal models can analyze an image — counting the apples in a photograph, say — or modify an image to create a new one, and the same applies to video.
The applications
Text already changed marketing — social media is full of LLM-generated copy. Video could be an even bigger deal: if celebrities can generate video advertisements through these models, the cost expectations for creating video will drop. It is already happening, though the quality is not yet very good.
A surprising quality bonus
Any input mode combined with text tends to produce models that perform better than text-only training: learn "cat" and "feline," then also see images of cats, and output improves — a deeper understanding of objects, not just their names.
Efficiency · Concept 18
Smaller Models, Company-Specific Data
| Small language model | Large language model | |
|---|---|---|
| Parameters | 3 million – 300 million | 3 billion – 300 billion |
| Training data | Less; company-specific or task-specific | Massive, general-purpose corpora |
| Character | Decent expert in a narrow task | Broad generalist |
Drivers: control and privacy
Companies want control over what their models generate, and they want to keep their data close rather than exposing it to a third-party company.
A tradeoff, not a downgrade
A bot trained only on customer queries, complaint handling, and sales technique performs decently well as a sales expert — but it probably cannot give a detailed weather analysis. For most companies that tradeoff does not matter; for NASA the priorities are reversed: a foundation model that predicts the weather well and never bothers with sales.
Efficiency · Concepts 19–20
Compress the Network, Cut the Cost
Distillation — teacher and student
The same input goes to a large teacher model and, in parallel, to a small student model. If the student's output matches the teacher's, no weights change; if it falls short, the student's weights update within its limited budget of 3 to 300 million parameters.
You condense the complex teacher into the most reasonable representation that fits the student: performance stays acceptable while costs drop significantly, and the distilled model responds much faster and is easier to host.
Quantization — shrink the weights
Every weight in a neural network is a number — say, a 32-bit number. Condense it to 8 bits and roughly 75% of the memory taken up by the weights is expected to be saved.
Two caveats: the savings do not map one-to-one — quantization usually applies to feedforward weights while attention stays in full precision — and training cost is unchanged. You train a genuinely good model first and quantize only once it is fully trained: it reduces inference cost, not training cost.
Final Takeaway
The Twenty Terms at a Glance
The End
Know the Terms, See Through the Hype
These are the twenty words engineers in the AI space actually use — knowing them helps you communicate with any engineer or teammate. No single video can fully unpack every subject, but once you truly understand the terms, much of the hype and nonsense in the AI space becomes recognizable for what it is.
Source: "20 AI Concepts Explained in 40 Minutes" — Gaurav Sen (GKCS) · youtube.com/watch?v=OYvlznJ4IZQ