Gen AI
Transformers, LLMs, RAG, Agents, and the generative AI stack
Generative Vision Audio Multimodal
- Gen AI
3D Scene Representation
Instead of storing a 3D video game level using millions of tiny triangles (polygons), NeRFs memorize the entire 3D room inside the weights of a neural network, calculating what the room looks like on-the-fly based on where you are standing.
- Gen AI
Automatic Speech Recognition (ASR)
When you speak to Siri, your phone records a physical sound wave. Automatic Speech Recognition is the AI process that listens to that messy, continuous wave and types out the exact text you said.
- Gen AI
Autoregressive Image Generation
Instead of starting with static and slowly denoising an entire image at once, an autoregressive model starts at the top-left corner and generates the image one pixel at a time, reading it exactly like a book.
- Gen AI
Consistency Models
Instead of walking step-by-step from noise to an image, a consistency model learns a mathematical shortcut that allows it to instantly teleport from any point on the noise trajectory directly to the final image.
- Gen AI
Contrastive Vision-Language Pretraining (CLIP)
To teach an AI that the word 'Dog' and a picture of a dog mean the exact same thing, you have to mathematically pull them together while simultaneously pushing them away from pictures of cats and cars.
- Gen AI
ControlNet and Spatial Conditioning
Text prompts are too vague to describe exactly where an arm should be or what shape a building should take. ControlNet allows you to use rigid spatial maps—like edge detection or depth maps—to strictly force the AI to follow a specific layout.
- Gen AI
CTC Loss (Connectionist Temporal Classification)
When transcribing speech, some people talk fast and some talk slow. CTC Loss allows a neural network to output the exact same text word regardless of how much the audio stretches or compresses over time.
- Gen AI
Denoising Diffusion Probabilistic Models
DDPMs generate images by taking pure television static and iteratively removing the noise step-by-step until a clear image emerges.
- Gen AI
Diffusion Samplers
If a diffusion model is a map of the territory, the sampler is the GPS routing algorithm telling you exactly which path to walk to get from pure noise to a clean image as fast as possible.
- Gen AI
Document Understanding
Instead of using old OCR software to transcribe a receipt into a messy wall of text, Document Understanding VLMs read the image directly, perfectly capturing the relationship between columns, rows, and totals.
- Gen AI
Embodied AI and Robotics
Instead of an AI just outputting text on a screen, Embodied AI allows the model to output physical motor commands, giving the 'brain' of a Large Language Model a physical robotic 'body'.
- Gen AI
Flow-Based Models (Normalizing Flows)
Flow-based models use a sequence of mathematically reversible funhouse mirrors to perfectly morph a simple block of clay (noise) into a complex statue (an image), allowing you to exactly calculate the probability of any given statue existing.
- Gen AI
Flow Matching
Flow matching replaces the confusing math of standard diffusion models by simply drawing a straight line between pure noise and a real image, and teaching a neural network to walk down that line.
- Gen AI
Generative Media Evaluation
Evaluating a math model is easy: the answer is either right or wrong. Evaluating an image generator is incredibly hard: how do you mathematically prove that one picture of a sunset is 'more beautiful' than another?
- Gen AI
Image Editing and Inpainting
Instead of generating an entirely new image from scratch, inpainting lets you erase a specific part of a photo (like a coffee cup) and ask the AI to generate something else in its place (like a vase) without touching the rest of the image.
- Gen AI
LoRA for Image Models
Instead of retraining a 5GB diffusion model to learn how to draw your pet dog, LoRA trains a tiny 50MB 'adapter' that sits on top of the base model, injecting the specific knowledge of your dog into the generation process.
- Gen AI
Multimodal Fusion
Humans don't just read text; we look at images, hear sounds, and combine all that sensory data in our brain to understand the world. Multimodal Fusion is how AI combines different types of data into a single neural thought.
- Gen AI
Music Generation
Generating a hit song with drums, bass, and vocals sounds impossible for an AI. But if you compress all those instruments into a single 'alphabet' of sounds, an AI can simply 'write' a song the same way ChatGPT writes an essay.
- Gen AI
Neural Audio Codecs
Neural audio codecs compress massive, continuous audio waves into a tiny 'alphabet' of sounds. Once audio is reduced to an alphabet, you can just use ChatGPT to 'write' new songs and speech.
- Gen AI
Neural Style Transfer
Before diffusion models existed, researchers figured out how to use an image recognition network in reverse to extract the 'content' of a photograph and paint it using the 'style' of a famous painting.
- Gen AI
Projector vs. Cross-Attention
There are two ways to give an LLM vision: either translate the image into 'words' and paste them at the front of the prompt (Projector), or surgically rewire the LLM's brain so it can look at the image during every step of its thought process (Cross-Attention).
- Gen AI
Promptable Segmentation
Instead of training a vision model that can only detect 80 specific objects (like cars or people), we can build a model that can perfectly trace the outline of ANY object in the world simply by clicking on it or typing its name.
- Gen AI
Rectified Flow
If Flow Matching draws a straight line between noise and an image, Rectified Flow is the process of training a model on that line, simulating its predictions, and using those predictions to draw an even straighter line, repeating until the model can generate a perfect image in a single step.
- Gen AI
Score-Based Generative Models
Instead of learning to generate an image in one shot, score-based models learn a map of 'which direction points toward a real image' and follow those arrows from pure noise.
- Gen AI
Self-Supervised Vision Features
Instead of teaching an AI to recognize a dog by showing it a million pictures labeled 'dog', we can teach it to understand the visual world by removing 75% of an image and forcing it to guess the missing pixels.
- Gen AI
Speaker Diarization
When recording a meeting with five people, speech recognition just spits out a giant wall of text. Speaker Diarization is the AI process of analyzing the acoustic fingerprints of the voices to label exactly who spoke when.
- Gen AI
Speech Synthesis (Text-to-Speech)
Modern Text-to-Speech uses a Language Model trained to 'speak'. By feeding the model a 3-second recording of someone's voice as a prompt, the model will 'continue' speaking the target text using that exact same voice, accent, and emotion.
- Gen AI
Speech-to-Speech Models (S2S)
Instead of converting your voice to text, processing the text, and generating a new voice, true Speech-to-Speech models process audio directly. This allows them to hear your sarcastic tone or nervous laughter and respond with the appropriate emotion.
- Gen AI
Text-to-Speech (TTS)
Converting text to speech is a two-step process: first, the AI acts like a composer, writing the 'sheet music' (a spectrogram) of how the words should sound. Then, a second AI acts like an instrument, turning that sheet music into actual physical sound waves.
- Gen AI
U-Net vs. Diffusion Transformers (DiT)
For years, image generation models relied on U-Nets to understand spatial data. Diffusion Transformers threw that away, proving that if you just chop an image into puzzle pieces, the same architecture that powers ChatGPT can also generate world-class images.
- Gen AI
Video Generation
Generating a video isn't just about generating 24 images per second; it's about forcing the AI to remember what the previous images looked like so the cat doesn't turn into a dog halfway through the clip.
- Gen AI
Vision-Language Models (VLMs)
To give ChatGPT the ability to see, you don't need to rebuild ChatGPT from scratch. You can take a pre-trained Vision model, a pre-trained Text model, and build a tiny 'translator' network between them.
- Gen AI
Visual Question Answering (VQA)
Instead of just asking an AI to 'identify the dog', VQA tests the AI's ability to reason. 'Is the dog in the picture likely to fall off the couch?' To answer this, the AI has to combine visual physics with logical language.
- Gen AI
Voice Cloning and Consent
Because AI can instantly clone a human's voice from a 3-second recording, the industry had to develop cryptographic consent mechanisms and invisible audio watermarks to prevent deepfakes and fraud.
- Gen AI
Whisper Architecture
Instead of building separate AI models for English transcription, Spanish translation, and Japanese dictation, Whisper is a single massive Transformer that uses special 'Task Tokens' to switch its brain between transcribing and translating on the fly.
Mechanistic Interpretability
- Gen AI
Activation Steering
Instead of fine-tuning a model to change its behavior, what if we just find the 'politeness' vector in its brain and mathematically inject it into every prompt?
- Gen AI
The Logit Lens
What if we don't wait for the final layer to see the prediction? By attaching the final vocabulary decoder to the middle layers, we can watch the model 'change its mind' in real-time.
- Gen AI
Probing Classifiers
How do we know if a language model actually learned grammar, or if it just memorized text? We train a tiny 'probe' model on its hidden states to see if we can extract grammatical concepts.
- Gen AI
Sparse Autoencoders (SAEs)
LLMs store concepts by mixing them together into dense, unreadable vectors. Sparse Autoencoders untangle this mess, expanding one dense vector into thousands of isolated, readable concepts.
- Gen AI
Steering Vectors
In the mathematical space of an LLM's brain, concepts have directions. By subtracting a 'bad' thought from a 'good' thought, you get an arrow pointing directly toward 'goodness'.
- Gen AI
Circuits and Superposition
LLMs don't just memorize data; they build tiny, logical sub-networks called 'circuits' that execute specific reasoning algorithms (like 'find the previous name and repeat it').
Applied Gen Ai
- Gen AI
Agent Cost Control
Because agents run in automated loops, a tiny logic error can cause them to make 10,000 API calls in an hour, draining your bank account. Agent Cost Control involves strict budgeting, caching, and model-routing to prevent financial disaster.
- Gen AI
Agent Harness Design
You can't just unleash an agent into a production database and hope it behaves. An Agent Harness is the strict software boundary that catches errors, logs token usage, manages timeouts, and prevents the agent from running forever.
- Gen AI
Agent Sandboxing
You should never give an AI agent access to your real computer. Sandboxing is the practice of running the agent inside an isolated, disposable virtual machine so that if it makes a mistake (or gets hacked), your real system is perfectly safe.
- Gen AI
Agent-to-Agent Protocols
Just like humans use email, Slack, or Jira to communicate and assign tasks, AI agents need standardized messaging protocols so they can talk to each other without losing context or hallucinating.
- Gen AI
Agentic RAG
Instead of a rigid pipeline where retrieval happens once, Agentic RAG gives an LLM a set of tools and allows it to autonomously decide what to search, when to search, and when it has enough information to stop.
- Gen AI
Automatic Prompt Optimization
Instead of manually tweaking a prompt when it fails, you feed the failure into an LLM. The LLM analyzes why the old prompt failed and automatically rewrites a new, better prompt.
- Gen AI
Chain of Thought
Instead of forcing the LLM to output the final answer immediately, you prompt it to 'think step by step'. By outputting the intermediate steps, the model essentially creates a scratchpad for itself, drastically improving math and logic performance.
- Gen AI
Citations and Attribution
Users don't trust AI. To build trust, a RAG system must provide exact, verifiable citations pointing back to the specific source documents it used to generate its answer.
- Gen AI
Computer Use Agents
Instead of calling APIs under the hood, a Computer Use Agent actually 'sees' your screen and clicks your mouse to use applications just like a human would.
- Gen AI
Context Budgeting
Every LLM has a maximum number of words it can 'see' at one time, and you pay for every word. Context budgeting is the math of deciding exactly how much space to allocate to the prompt, the retrieved documents, the conversation history, and the final answer.
- Gen AI
Context Compaction
Instead of putting a massive 10,000-word document into the LLM's prompt, you use a cheaper, faster LLM to summarize and compress the document down to 500 words first, saving massive amounts of money and latency.
- Gen AI
Context Degradation
Just because an LLM can 'see' 100,000 words in its prompt doesn't mean it can remember all of them. The more irrelevant filler you put in a prompt, the 'dumber' the LLM gets at finding the actual answer.
- Gen AI
Corrective RAG (CRAG)
When the vector database fails to find a good answer, CRAG detects the failure and automatically pivots to a web search to find the missing information.
- Gen AI
Document Ingestion Pipelines
Before an LLM can answer questions about your data, the data must be extracted from its raw format, cleaned, split into chunks, embedded, and loaded into a vector database.
- Gen AI
Episodic and Semantic Memory
Agents need to remember things. Episodic memory is remembering exact past conversations (the transcript). Semantic memory is extracting facts from those conversations to build a permanent knowledge base about the user.
- Gen AI
Few-Shot Prompting
Instead of just giving the LLM instructions, you give it 2 or 3 examples of the exact input-output pairs you expect. The LLM copies the pattern.
- Gen AI
Graph RAG
Instead of searching independent text chunks, Graph RAG extracts entities and relationships into a knowledge graph, allowing the LLM to traverse connections to answer highly complex, multi-hop questions.
- Gen AI
Human-in-the-Loop (HITL)
You shouldn't let an AI send emails to your investors or wipe a database without checking. Human-in-the-loop pauses the agent right before it takes a dangerous action, waits for you to click 'Approve' or 'Deny', and then resumes.
- Gen AI
Hypothetical Document Embeddings (HyDE)
Instead of searching the database with a short, vague user query, HyDE asks an LLM to hallucinate a fake answer to the query, and searches the database using that fake answer.
- Gen AI
Long-Horizon Agents
Most agents crash after 5 minutes because they forget what they are doing. Long-Horizon Agents are designed to run for hours or days by continuously saving their progress, summarizing their history, and adjusting their long-term plans.
- Gen AI
Meta-Prompting
Instead of writing a prompt yourself, you ask an LLM to write the prompt for you. It's 'prompting about prompting'.
- Gen AI
Metadata Filtering
Vector databases search by semantic meaning, but sometimes you just want exact constraints (like 'only documents from 2024'). Metadata filtering combines the fuzziness of AI search with the precision of SQL.
- Gen AI
Model Context Protocol
MCP is like USB-C for AI. Instead of writing custom API wrappers for every tool you want your agent to use, MCP provides a universal standard so agents can instantly plug into databases, file systems, and SaaS apps without custom code.
- Gen AI
Multi-Agent Systems
Instead of building one massive 'God Agent' that tries to do everything, you build a team of small, highly specialized agents that talk to each other to solve a complex problem together.
- Gen AI
Multimodal RAG
Instead of just embedding text, Multimodal RAG converts images, charts, and text into a shared vector space, allowing you to answer questions about complex visual data.
- Gen AI
Parallel Tool Calling
Instead of calling one API, waiting 2 seconds, and then calling a second API, modern LLMs can output 5 tool calls at the exact same time, cutting response times drastically.
- Gen AI
Parent-Child Chunking
Small chunks are easy to find via search, but bad for LLM context. Large chunks are hard to find via search, but great for LLM context. Parent-child chunking indexes the small chunks but retrieves the large ones.
- Gen AI
Prompt Chaining
Instead of asking a single LLM to perform 5 complex tasks in one massive prompt, you break the task into 5 separate, focused prompts. The output of Prompt 1 becomes the input for Prompt 2.
- Gen AI
Prompting Anti-Patterns
Using polite words, writing giant mega-prompts, and focusing on what NOT to do instead of what TO do are common mistakes that make LLMs perform worse, not better.
- Gen AI
Query Decomposition
When a user asks a multi-part question, vector databases fail to find a single document that answers all parts. Decomposition uses an LLM to split the complex question into several simple questions that are searched in parallel.
- Gen AI
Query Rewriting
Users write terrible search queries. Query rewriting intercepts the user's input and uses an LLM to rephrase it into something the vector database will actually understand.
- Gen AI
Query Understanding
Users type terribly. If you take a messy, misspelled user query and embed it directly into a vector database, you will get terrible results. Query understanding fixes, expands, and structures the query before it ever hits the search engine.
- Gen AI
RAG Fusion
Instead of trusting a single search query, RAG Fusion generates multiple variations of the query, searches the database for all of them, and mathematically fuses the results together.
- Gen AI
RAG in Production
Building a RAG prototype in a Jupyter Notebook takes an hour. Moving that prototype to production requires caching, guardrails, analytics, feedback loops, and robust access controls.
- Gen AI
ReAct Pattern
ReAct combines Reasoning (thinking aloud) and Acting (using tools). The LLM thinks about what to do, takes an action, observes the result, and thinks again. It is the core loop of autonomous agents.
- Gen AI
Reflection and Self-Correction
Instead of accepting the LLM's first answer, you force the LLM to pause, read its own work, actively look for mistakes, and rewrite the answer if it finds an error.
- Gen AI
Relevance Tuning
You built a semantic search engine, but the 3rd result is actually better than the 1st result. Relevance tuning is the process of building test sets (judgements) and tweaking the retrieval weights until the best result is reliably at the top.
- Gen AI
Self-Consistency
Instead of asking the LLM to think through a problem once, you ask it to think through the problem 5 different times in parallel. You then look at the 5 final answers and pick the one that appeared most often.
- Gen AI
Self-RAG
Self-RAG trains an LLM to actively decide when it needs to retrieve information, critique its own retrieved documents, and grade its own final answer.
- Gen AI
Semantic Chunking
Instead of splitting documents at arbitrary character limits, semantic chunking uses embeddings to split documents only when the actual topic shifts.
- Gen AI
Semantic Search
Instead of searching for exact keywords (CTRL+F), semantic search searches for meaning. If you search for 'dog', it will return results for 'puppy' and 'hound', even if the word 'dog' never appears in the text.
- Gen AI
Structured Data Agents
Instead of just generating a single SQL query, a structured data agent actively explores your database. If its first query hits an error, it reads the error and writes a new query, acting like an autonomous data analyst.
- Gen AI
Sub-Agents and Handoffs
Instead of an agent doing the work itself, it acts like a dispatcher. When a user asks for a refund, the Main Agent transfers the conversation to a specialized 'Refund Agent', handing over the context seamlessly.
- Gen AI
Supervisor Pattern
Instead of letting agents talk to whoever they want, you create a rigid hierarchy. A 'Manager' agent receives the task, delegates sub-tasks to 'Worker' agents, reviews their work, and compiles the final answer.
- Gen AI
Text-to-SQL
You don't need to write SQL queries by hand anymore. You can type 'Show me the top 5 customers from last month' and the LLM translates that English into perfect SQL syntax.
- Gen AI
Tool Result Curation
When an agent uses a tool (like a database query), the tool often returns thousands of lines of raw JSON. If you pass all that JSON back to the agent, the agent gets overwhelmed and crashes. Curation is the act of filtering tool outputs before the agent sees them.
- Gen AI
Tool Retrieval
Instead of overwhelming the LLM by listing 5,000 available tools in the system prompt, you use a Vector Database to search for only the 5 most relevant tools for the current query, and inject those into the prompt.
- Gen AI
Tree of Thoughts
Instead of writing a single chain of logic, the LLM explores multiple branching possibilities, evaluates each branch to see if it's a dead end, and backtracks if necessary to find the optimal solution.
- Gen AI
Voice Agent Architecture
Instead of piping Speech-to-Text into an LLM and then piping the output into Text-to-Speech (which is very slow), modern Voice Agents use natively multimodal models that 'hear' and 'speak' directly in audio, enabling sub-second conversational latency.
- Gen AI
Zero-Shot Prompting
You give the LLM instructions and ask it to perform a task immediately, without providing any examples of what a 'correct' answer looks like.
Agents
- Gen AI
Agent Evaluation
Scores an agent by whether its steps were sensible and efficient along the way, not just whether the final answer happened to land on the right number.
- Gen AI
Agent Failure Modes
Agents fail in three distinct ways — looping without progress, hallucinating a tool call, or finishing only part of the job, each with its own signature.
- Gen AI
AI Agent Architecture
An agent is a model wrapped in a loop with tools and memory, deciding at each step whether to act, remember, or give a final answer, unlike a plain chatbot.
- Gen AI
Planning & Reasoning
An agent either writes a full step-by-step plan before doing anything, or it reasons, acts, and checks the result one step at a time, adjusting as it goes.
- Gen AI
Tool Use & Function Calling
Tool use lets a model ask real code to run something on its behalf, naming what to call and what to pass in, so a program can check it before running.
Security
- Gen AI
Agent Security
Securing an autonomous agent requires moving beyond just securing the LLM, and instead building defense-in-depth across the agent's memory, tools, and execution environments.
- Gen AI
Guardrails
Guardrails are external security layers that sit between the user and the LLM, screening inputs for attacks and filtering outputs for harmful or incorrect content.
- Gen AI
Hallucination Mitigation
Because LLMs predict what sounds plausible rather than what is factually true, developers use grounding, retrieval, and verification pipelines to force the model to stick to reality.
- Gen AI
Indirect Prompt Injection
When an LLM ingests external data (like a webpage or a PDF) that contains hidden instructions, the model might execute those instructions instead of serving the user.
- Gen AI
Jailbreaking
Jailbreaking is a specialized form of prompt injection aimed entirely at tricking a safety-filtered model into ignoring its own rules and outputting restricted content.
- Gen AI
Memorization and Extraction
LLMs accidentally memorize exact snippets of their training data. Attackers can prompt the model to spit out this memorized data verbatim, leaking copyrighted code, PII, or API keys.
- Gen AI
Model Supply Chain Security
Before downloading and running a model from the internet, developers must verify its cryptographic signature and scan its weights for malware to ensure it hasn't been tampered with.
- Gen AI
Prompt Injection
Prompt injection happens when a model mistakes untrusted user data for administrative instructions, hijacking the application's intended behavior.
- Gen AI
Red Teaming
Before releasing a model to the public, organizations hire specialized security teams to intentionally attack, jailbreak, and break the model in a controlled environment to find and fix its vulnerabilities.
- Gen AI
Synthetic Media Detection
To identify unmarked deepfakes, specialized AI models analyze media for imperceptible biological errors (like unnatural blinking) or pixel-level inconsistencies that human eyes cannot see.
- Gen AI
Tool Permissions
When an LLM is given tools to act in the real world (like sending emails or deleting files), it must be restricted by the principle of least privilege to minimize the blast radius if it gets hacked.
- Gen AI
Watermarking and Provenance
To prevent deepfakes and AI plagiarism, systems embed invisible statistical signals into generated text or images, allowing future systems to verify that the content was created by an AI.
Future Frontiers
- Gen AI
Agentic Software Engineering
Instead of an AI just autocompleting your current line of code, an Agentic Software Engineer reads a GitHub issue, clones the repo, runs the tests, writes the fix, and opens a Pull Request entirely on its own.
- Gen AI
AI for Science
Instead of humans spending decades looking through microscopes or running physics simulations, AI can learn the fundamental laws of nature directly from data, discovering new drugs and materials in days.
- Gen AI
Automated Research
What if AI didn't just help humans do research, but actively hypothesized, conducted experiments, read the results, and wrote the scientific paper entirely on its own?
- Gen AI
Energy and Efficiency of AI
Training a cutting-edge LLM consumes as much electricity as a small city. We cannot reach AGI by just plugging in more GPUs; we have to fundamentally rethink how AI uses energy.
- Gen AI
Hardware-Software Co-Design
You can't build a Formula 1 race car by putting a jet engine into a minivan. To get maximum performance, the engine (software) and the chassis (hardware) must be designed together.
- Gen AI
Measuring General Capability
When an AI can pass the bar exam, code like a senior developer, and write poetry better than a human, how do we actually measure how 'smart' it is? The old benchmarks are broken.
- Gen AI
Neurosymbolic AI
Neural networks are great at intuition and pattern matching, but terrible at logic and math. Symbolic AI is perfect at logic and math, but terrible at intuition. Neurosymbolic AI combines them to get the best of both worlds.
- Gen AI
Program Synthesis
Instead of writing code line-by-line, what if you could just describe what you want a program to do, and the AI writes the entire source code for you?
- Gen AI
Self-Improving Systems
What happens when an AI becomes smart enough to write a better version of its own source code?
Safety And Alignment
- Gen AI
The Alignment Problem
Making an AI smart is a capability problem. Making sure that smart AI actually wants what humans want—and nothing else—is the alignment problem.
- Gen AI
Reward Hacking
When a metric becomes a target, it ceases to be a good metric. Reward hacking is when an AI finds a technically correct but practically useless (or harmful) way to maximize its score.
- Gen AI
Scalable Oversight
How do you grade a student's test when the student is vastly smarter than you and the answers are too complex for you to verify? You need oversight mechanisms that scale with the AI's intelligence.
Retrieval
- Gen AI
Approximate Nearest Neighbor Search
Exact search checks every stored vector against a query; approximate search checks only a promising subset, trading a small chance of missing the true nearest match for a much faster query.
- Gen AI
Chunking Strategies
Splitting a document at fixed intervals can cut a sentence in half, while splitting along the document's own structure keeps each idea whole — the choice trades retrieval precision against surviving context.
- Gen AI
Embedding Models
An embedding model is trained specifically so that related things land close together, and the strongest retrieval models use two different encoders for short queries and long documents.
- Gen AI
Embeddings
A model maps discrete things like words or documents into a continuous vector space where distance carries meaning, so semantically related items land close together.
- Gen AI
Hybrid Search
Dense retrieval finds semantically related passages while lexical retrieval finds exact rare-term matches, and combining their two ranked lists catches cases either method alone would miss.
- Gen AI
Reranking
A fast retriever pulls a wide shortlist of candidates cheaply, then a slower, more accurate model rescores only that shortlist, reordering it before the top few results ever reach the language model.
- Gen AI
Similarity Metrics
Cosine similarity measures only the angle between two embeddings; the choice of metric decides whether a search ranking is measuring meaning or accidentally measuring vector length.
- Gen AI
Vector Databases
A vector database wraps an approximate-nearest-neighbor index with the operational layers a raw index lacks — filtering, multi-tenancy, and persistence — turning a search structure into a real system.
Inference Mechanics
- Gen AI
Beam Search
Instead of blindly committing to the best token at each step, keep several parallel universes alive, explore their futures, and prune the paths that score the worst overall.
- Gen AI
Constrained Decoding
Instead of hoping the model generates valid JSON or follows your rules, use a strict mathematical mask at every step to physically block the model from generating anything other than what your schema allows.
- Gen AI
Decoding Strategies
Given the same next-token probability distribution, greedy always takes the single most likely token, sampling draws from the whole distribution, and beam search tracks several candidate continuations at once.
- Gen AI
KV Cache
Store every previous token's key and value vectors instead of recomputing them at every generation step, turning per-token generation cost from quadratic back down to linear.
- Gen AI
Min-P Sampling
Instead of adding up probabilities to hit a target, simply look at the most likely token, calculate a percentage of its probability, and mercilessly chop off anything smaller than that threshold.
- Gen AI
Paged Attention
Instead of storing a sequence's KV cache in one massive, contiguous chunk of memory that wastes space, break it into fixed-size blocks mapped through a table—just like an operating system manages virtual memory.
- Gen AI
Prefix Caching
Instead of recomputing the attention states for a massive system prompt every time a new user connects, compute it once, store it, and let every concurrent request share those exact same memory blocks.
- Gen AI
Repetition Penalties
LLMs can easily get trapped in infinite loops of repeating the same phrase. Repetition penalties mathematically tax the probability of words that have already appeared, forcing the model to generate new vocabulary.
- Gen AI
Speculative Decoding
Instead of waiting for a massive 70B model to generate one token at a time, use a tiny 1B model to quickly guess the next 5 tokens, then have the massive model grade all 5 guesses at once in a single, lightning-fast parallel pass.
- Gen AI
Temperature & Sampling
Temperature is a knob that controls the randomness of generation: turn it down to make the model conservative and predictable, turn it up to make it creative and erratic.
- Gen AI
Top-K Sampling
Instead of risking a random draw from the thousands of terrible words in the long tail of the distribution, forcefully truncate the list to only the K best options before rolling the dice.
- Gen AI
Top-P (Nucleus) Sampling
Instead of keeping a fixed number of tokens, Top-P dynamically keeps as many tokens as needed until their combined probability hits a target percentage, adapting beautifully to how confident the model is.
The Deep Math
- Gen AI
BM25 and Inverted Indexes
An inverted index maps words to the documents that contain them, and BM25 scores those matches by balancing term frequency against how rare the word is overall.
- Gen AI
Embedding Fine-Tuning
Off-the-shelf embedding models fail on domain-specific vocabulary. Fine-tuning adjusts the model's weights so that documents and queries in your specific niche map closer together.
- Gen AI
Hierarchical Navigable Small World (HNSW)
HNSW builds a multi-layered graph where top layers have long-distance links for fast skipping, and bottom layers have dense links for precise local search.
- Gen AI
IVF and Product Quantization (IVF-PQ)
IVF clusters vectors to narrow the search space, while PQ chops vectors into chunks and compresses them to save massive amounts of memory.
- Gen AI
Late Interaction Retrieval (ColBERT)
Late interaction models delay the pooling of token embeddings, computing a similarity matrix between every query token and every document token for extreme precision.
- Gen AI
Learned Sparse Retrieval
Learned sparse retrieval uses a neural network to inject context and synonyms into a lexical search index, creating a best-of-both-worlds search strategy.
- Gen AI
Locality-Sensitive Hashing (LSH)
LSH uses special hash functions that intentionally cause collisions for similar items, allowing you to find nearest neighbors without checking every pair.
- Gen AI
Maximal Marginal Relevance (MMR)
MMR balances relevance with diversity. It scores documents not just on how well they match the query, but on how different they are from the documents already selected.
The Model
- Gen AI
Byte-Pair Encoding
Start from individual characters and repeatedly merge whichever adjacent pair appears most often in the training corpus, building a vocabulary of frequent fragments one merge at a time.
- Gen AI
Chat Templates
Models only understand flat sequences of tokens, so chat templates use special control tokens to format distinct user and assistant messages into a single continuous string.
- Gen AI
Compute-Optimal Training
To get the smartest possible model for a fixed budget, parameter count and training data must be scaled equally; historically, models were too large and severely undertrained.
- Gen AI
Context Windows
The context window is a fixed-size frame of tokens the model can actually see — anything outside it, on either end, simply isn't part of the input anymore.
- Gen AI
Emergent Abilities
Models sometimes suddenly acquire complex new skills—like arithmetic or logical deduction—only after passing a massive threshold of compute and scale, despite no specific training for those skills.
- Gen AI
How LLMs Work
Text becomes tokens, tokens become vectors, a stack of transformer blocks refines those vectors, and the last position's output becomes a probability distribution over the next token.
- Gen AI
In-Context Learning
Place a few input-output examples directly in the prompt and the model's behavior shifts on the very next request, with no gradient update and no change to any weight.
- Gen AI
Long-Context Extension
Long-context extension rescales a model's positional signal so sequences longer than its trained length still land back in the range it actually learned.
- Gen AI
Next-Token Prediction
Train a model on one simple task, predict the next token from everything before it, and getting that one prediction right at scale quietly forces grammar, facts, and style into the same weights.
- Gen AI
Perplexity
Take the average negative log-probability a model assigns its own held-out text and exponentiate it — a confident, correct model scores close to one, a confused model scores much higher.
- Gen AI
Scaling Laws
Model performance improves predictably as you increase compute, dataset size, and parameter count, forming a smooth power-law curve that lets researchers forecast success before spending millions on a training run.
- Gen AI
Tokenization Artifacts
Because tokenizers blindly merge frequent text strings, they create quirks like separate tokens for capitalized words and leading spaces, forcing models to learn redundant concepts.
- Gen AI
Tokenization
Cut text into discrete units the model can index — word-level, character-level, or subword — and the choice among them trades vocabulary size against sequence length.
- Gen AI
Tokenizer Training
Before a model can learn weights to predict text, the tokenizer must learn a vocabulary from a corpus by repeatedly merging the most frequent symbol pairs.
Reasoning
- Gen AI
Chain-of-Thought Faithfulness
Just because an AI provides a logical, step-by-step explanation for its answer does not mean it actually used that logic to arrive at the answer. It is often just inventing a plausible story after the fact.
- Gen AI
Chain-of-Thought Training
Instead of just training a model on 'Question -> Final Answer' data, train it on 'Question -> Step 1 -> Step 2 -> Final Answer' data, fundamentally wiring the model to prefer methodical logic over blind guessing.
- Gen AI
Hallucination Mechanisms
LLMs do not have a database of facts. They have a statistical map of which words sound good next to each other. When they don't know an answer, they simply generate the most plausible-sounding fiction.
- Gen AI
LLM Confidence & Calibration
A well-calibrated model knows what it doesn't know. If it says it is 80% sure, it should be right exactly 80% of the time. Unfortunately, modern training techniques often destroy this self-awareness, making models arrogant and wrong.
- Gen AI
Process vs Outcome Rewards
When training a model via reinforcement learning, grading only the final answer (Outcome) teaches the model to cheat. Grading every single intermediate step (Process) teaches the model true, rigorous logic.
- Gen AI
Reasoning Effort Controls
When solving a problem, you can tell an AI to think quickly and cheaply, or you can give it a massive compute budget to rigorously double-check its work. Effort controls make intelligence a scalable commodity.
- Gen AI
Reasoning Models
Instead of trying to instantly guess the right answer to a complex problem, reasoning models are trained to output a long, hidden chain of intermediate thoughts before providing their final answer.
- Gen AI
Test-Time Compute
Instead of trying to make the model infinitely smarter during training (which is wildly expensive), spend your compute budget during inference (test time) to have the model generate multiple answers and verify the best one.
Diffusion
- Gen AI
Classifier-Free Guidance
At each denoising step, the diffusion model predicts the image both with and without the text prompt, then pushes toward the prompt version by a set amount.
- Gen AI
Diffusion Models
A diffusion model learns to remove noise from a picture one small step at a time, so reversing that process on pure random static builds a brand-new image.
- Gen AI
Forward & Reverse Processes
A noise schedule sets how much noise each forward step adds, and at every reverse step the network predicts that added noise, not the clean image itself.
- Gen AI
Latent Diffusion
Latent diffusion runs the slow, iterative denoising process in a small compressed space instead of on raw pixels, so a single consumer GPU can handle it.
Post Training
- Gen AI
Constitutional AI
Instead of paying humans to write tens of thousands of examples of polite, harmless behavior, you give a strong LLM a 'Constitution' (a list of rules) and ask it to automatically critique and revise its own toxic or unhelpful answers.
- Gen AI
Data Mixing and Curriculum
You don't just dump terabytes of data into a model; you carefully balance the proportions of code, math, and prose (mixing) and sometimes order them from simple to complex (curriculum) so the model learns grammar before calculus.
- Gen AI
Fine-Tuning Data Preparation
Most failed fine-tunes are just data-formatting bugs wearing a hyperparameter costume. Perfecting chat templates, deduplication, and loss masking is what determines if the run works at all.
- Gen AI
Catastrophic Forgetting in Fine-Tuning
Neural networks have finite capacity. If you pull all the gradients toward a narrow task (like reading legal contracts), the model will literally overwrite the weights it used to perform other tasks (like writing Python). Replay data prevents this.
- Gen AI
Full Fine-Tuning
Full fine-tuning unlocks every single parameter in the model and updates them all simultaneously. It is the most powerful way to change a model's behavior, but it requires massive memory and compute overhead.
- Gen AI
GRPO
Standard PPO requires a massive 'Value Model' that doubles the VRAM cost of RLHF. GRPO ditches it entirely by scoring a group of answers and simply reinforcing the ones that scored above the group's average.
- Gen AI
Instruction Tuning
Instruction tuning is the behavioral shift that turns a chaotic autocompleter into a polite assistant. It teaches the model that when a user asks a question, the correct next tokens are the answer, not a continuation of the question.
- Gen AI
LoRA Rank Selection
LoRA compresses the learning space into a small rank (r). Choosing 'r' is a tradeoff between capturing complex reasoning (high r) and saving VRAM while preventing overfitting (low r).
- Gen AI
Mid-Training
Mid-training is the bridge between raw pretraining and specialized fine-tuning, used to inject deep domain knowledge or extend context windows at scale before narrowing the model's focus to instruction following.
- Gen AI
Model Merging
Because fine-tuned models share the exact same starting weights, you can literally average their weights together using math formulas. You can combine a math expert and a coding expert into a single model without running a single training step.
- Gen AI
PEFT Methods
Parameter-Efficient Fine-Tuning (PEFT) is an umbrella term for finding the cheapest possible place to inject trainable parameters into a frozen model. LoRA does it with matrices; other methods do it with prefixes, adapters, or scaling vectors.
- Gen AI
Post-Training Evaluation
You just spent $5,000 fine-tuning a model to answer customer support tickets. How do you know it actually works? Post-training evaluation requires testing it against a prompted baseline to prove the tune was worth it, and checking for regression to ensure it didn't forget how to speak English.
- Gen AI
Post-Training Quantization
Models are trained in high precision (16-bit) to capture tiny gradient updates. Once training is over, you don't need that precision anymore. You can brutally compress the weights down to 8-bit or 4-bit integers to save VRAM and make the model faster to run.
- Gen AI
Preference Optimization Variants
DPO proved we don't need a Reward Model to train preferences. Newer variants like ORPO, IPO, and SimPO strip the process down further, attempting to remove the massive VRAM penalty of needing a reference model in memory.
- Gen AI
Pretraining
Pretraining is the massive, unsupervised ingestion of raw text that turns random noise into a statistical model of language, building the foundational world model that fine-tuning later shapes into a useful assistant.
- Gen AI
Reasoning Distillation
Instead of forcing a small model to figure out complex math on its own, you take a massive, brilliant model, ask it to write out its step-by-step logic, and train the small model to mimic that exact chain of thought.
- Gen AI
Rejection Sampling Fine-Tuning
Instead of relying on humans to write perfect training data, you ask a model to answer a question 10 times. You use a reward model to pick the best answer, and then fine-tune the original model on its own best work.
- Gen AI
Reward Modeling
Before you can use reinforcement learning to train an LLM, you need a teacher to grade it. A reward model is an LLM trained to act as that teacher, reading text and outputting a single number representing how helpful or harmless the text is.
- Gen AI
RL from Verifiable Rewards (RLVR)
Instead of using a fuzzy, biased AI model to score text, RLVR uses deterministic rules (like a Python interpreter or a math solver) to give a definitive Pass/Fail. It is the engine that creates true reasoning models.
- Gen AI
Synthetic Data for Post-Training
Instead of paying humans to write 10,000 Q&A pairs to fine-tune a small model, you write a clever prompt and ask a massive frontier model like GPT-4 to generate those 10,000 pairs for you. AI trains AI.
- Gen AI
When to Fine-Tune
Fine-tuning is the priciest rung on a ladder starting with sharper prompts, then retrieved facts, and only reshapes the model's weights once both genuinely fail.
Context Engineering
- Gen AI
Context Engineering
Context engineering decides what fits in the model's fixed window, since the prompt, history, retrieved text, and tool output all compete for the same space.
- Gen AI
Memory Systems
Short-term memory is just what's sitting in the context window right now; long-term memory is saved somewhere durable so it survives after the session ends.
Advanced Architectures
- Gen AI
Continual and Lifelong Learning
Humans learn continuously; if you learn to ride a bike today, you don't instantly forget how to walk. AI, however, usually suffers from 'catastrophic forgetting'—learning task B completely overwrites its knowledge of task A.
- Gen AI
Diffusion Language Models
Standard LLMs generate text left-to-right, one word at a time. Diffusion Language Models generate the entire paragraph at once, starting with pure static and slowly refining it into coherent text.
- Gen AI
Memory-Augmented Architectures
Instead of trying to memorize the entire internet inside its neural weights, what if an AI had a searchable, external hard drive it could read and write to?
- Gen AI
Tokenizer-Free Models
Computers don't read words, they read bytes. So why do we force AI to read artificial 'tokens' instead of just reading the raw bytes directly?
Alignment
- Gen AI
DPO
DPO trains a model straight on pairs of preferred and rejected answers, skipping the reward model and reinforcement learning that RLHF needs entirely.
- Gen AI
RLHF
After a model learns to follow instructions, humans compare pairs of its answers, and that preference signal nudges it toward replies people actually like.
Agents And Embodiment
- Gen AI
Embodied AI
Intelligence isn't just a brain in a jar. Embodied AI is the idea that true artificial intelligence requires a physical or virtual body that can interact with the environment, experience physics, and learn from its own actions.
- Gen AI
Robot Learning
Instead of a human programming exactly how a robot should move its joints to flip a pancake, the robot tries, fails, and learns the physics of pancake-flipping on its own.
- Gen AI
Simulation and Sim-to-Real
You can't train a self-driving car by letting it crash 10,000 times on a real highway. You have to train its brain in a video game, then carefully transfer that brain into a real car without it realizing the physics changed.
- Gen AI
Video World Models
Instead of explicitly coding the laws of physics, what if an AI could learn gravity, object permanence, and momentum just by watching millions of hours of YouTube videos? That's a video world model.
- Gen AI
Vision-Language-Action Models (VLAs)
What if the same neural network that understands a picture of a cup and the word 'cup' could also output the exact motor commands to pick it up?
- Gen AI
World Models
To navigate the real world, an AI needs more than pattern matching; it needs an internal physics engine that predicts what will happen next if it takes a specific action.
Audio And Speech
- Gen AI
Encoder-Decoder ASR
Encoder-decoder models listen to the entire audio clip first, then use cross-attention to translate the sounds into text one word at a time, looking back at the audio as needed.
- Gen AI
RNN Transducer (RNN-T)
RNN-T splits speech recognition into an acoustic encoder and a text predictor, then joins them to predict the next word without waiting for the speaker to finish the sentence.
Evaluation Science
- Gen AI
Judge Bias & Calibration
LLMs used as automated judges suffer from systematic blind spots—such as preferring the first option, the longer option, or their own writing style—which invalidate their scores if left unmitigated.
- Gen AI
LLM-as-a-Judge
Using a powerful language model to automatically grade the open-ended outputs of another model, serving as a scalable proxy for human evaluation.
- Gen AI
Pairwise Preference & Elo
Instead of grading models on an absolute scale, we pit them against each other in blind head-to-head matches and use chess rating math to build a global leaderboard.
- Gen AI
Prompt Regression Testing
Because language models are highly sensitive to phrasing, editing a prompt to fix one edge case frequently breaks ten other use cases. You cannot edit prompts safely without a regression test suite.
- Gen AI
Safety Evaluation & Red Teaming
You cannot deploy a generative model hoping it will behave. You must actively attack it with adversarial prompts to measure its refusal rate before it hits production.
Tuning
- Gen AI
LoRA & QLoRA
Freeze the pretrained model and train only a small pair of low-rank matrices per layer; QLoRA also shrinks the frozen weights to 4-bit so it fits on one GPU.
- Gen AI
Supervised Fine-Tuning
SFT keeps training a pretrained model on a curated set of example answers, so it reliably repeats that exact style instead of just guessing plausible text.
Prompting
- Gen AI
Prompt Anatomy
A prompt is built from parts: which role is speaking, clear markers around any pasted-in text, and how precisely you spell out the exact format you want back.
- Gen AI
Structured Outputs
Structured outputs force a model to return data in an exact, predictable shape a program can trust, instead of prose you have to parse and hope is right.
- Gen AI
System Prompts & Personas
A system prompt is a standing instruction set placed ahead of the conversation once, so the model treats it as a persistent rule, not a message to reread.
Compression
Rag
- Gen AI
RAG Architecture
Documents are indexed once ahead of time, and each query is embedded, matched against that index, and the retrieved passages are inserted into the prompt before the model generates an answer.
- Gen AI
RAG Evaluation
Retrieval quality and generation quality are two separate scores measuring two separate stages, and a single end-to-end answer-quality number can't tell you which of the two actually failed.
- Gen AI
RAG Failure Diagnosis
A bad answer has four possible origins — ingestion, chunking, retrieval, generation — and they get checked in that order, cheapest first, instead of jumping straight to prompt edits.