Glossary
The words you'll hear in AI design reviews, one line each, with where to see them in code. Breadth without extra labs.
Who needs it sets how deep to go:
Everyone: you should explain it in one sentence.
Builders: you should be able to build it; there's a lab.
Architects: you should know when to choose it and what it costs; most have no lab.
Pairs people mix up
Pair
The difference
RAG vs fine-tuning
RAG gives the model facts at question time, with citations. Fine-tuning changes how it behaves (style, format, a narrow task). Facts that change belong in RAG.
RAG vs CAG
RAG searches for a few passages. CAG puts the whole (small) knowledge base in the prompt and caches it. CAG works only while everything fits and rarely changes.
Function calling vs MCP
Function calling is the model asking your code to run a function. MCP is a standard way to package those functions once so any AI client can use them. An agent doesn't need MCP to use tools.
Agent vs workflow
A workflow's steps are fixed in code. An agent's model picks the next step. Start with a workflow.
Chatbot vs agent
A chatbot answers. An agent acts: checks, fetches, drafts, routes, and pauses for approval.
LangChain vs LangGraph
LangChain is a library of building blocks (models, prompts, retrievers). LangGraph runs stateful graphs with loops, pauses and checkpoints. Neither adds reasoning; the model does that.
FAISS vs HNSW
FAISS is a library. HNSW is one index type, available inside FAISS and in most vector databases.
Guardrails vs governance
Guardrails are runtime checks in code. Governance is company policy: which models and data are allowed, who approves, what's audited.
Temperature vs hallucination
Temperature controls how varied answers are. Hallucination drops with grounding and checks, not with temperature 0.
Model basics
Term
In one line
Who needs it
See
LLM
A model that predicts the next token, one at a time
Everyone
llm-api/01
Token
A piece of a word; limits and bills are counted in tokens. Hinglish and Hindi use more tokens per word than English
Everyone
rnr phase 5
Context window
The most tokens one call can hold, input plus output
Everyone
agents/04
Temperature
How random the next-token pick is; 0 for extraction and classification
Everyone
prompting/01, rnr FAQ
Hallucination
A confident answer nothing supports
Everyone
agents/03
Inference
Running a trained model to get an answer
Everyone
Parameters
The model's learned numbers; 8B means 8 billion
Builders
INSTALL.md
Quantization
Storing weights in fewer bits (e.g. 4-bit) so a model fits in memory, with a small quality loss
Builders
qwen3:8b is about 5 GB this way
Reasoning (thinking) model
Writes hidden reasoning before answering: better on multi-step problems, slower, more tokens
Builders
think=True in rag; rnr phase 5
Transformer, attention
The architecture behind LLMs: each token looks at every other token, which is why long prompts cost more
Architects
Encoder vs decoder
Encoders turn text into vectors or labels (BERT, embedding models); decoders generate text (GPT, Qwen)
Architects
Mixture of Experts (MoE)
Only a few "expert" parts of the model run per token: big-model quality at lower compute, but all of it still sits in memory
Architects
Multimodal, vision-language model (VLM)
A model that takes images (or audio) as well as text. Use it to read the picture into text, then run your text pipeline
Builders
whatsapp-agent/09
Image tokens
A picture is cut into patches that count as input tokens; a bigger image costs more and is slower. Shrink before sending
Builders
bot/photo.py prepare()
Open-weight vs hosted
Download and run it yourself, or call a provider's API
Architects
System design §4
Prompts and context
Term
In one line
Who needs it
See
System prompt
Standing instructions sent with every call
Everyone
prompting/01
Prompt injection
Input that tries to override your instructions
Everyone
prompting/05, rnr/03
Few-shot
Showing examples in the prompt; one good example often beats a paragraph of rules
Builders
prompting/02, rag/07
Chain of thought
Asking the model to reason step by step before answering; reasoning models do this on their own
Builders
think=True in rag
Structured output
The model answers in JSON that matches a schema; validate it in code
Builders
prompting/03, llm-api/05
Context engineering
Choosing what goes into each call: rules, chunks, tool results, memory, trimmed history
Builders
agents/04
Memory
Short-term: the conversation so far. Long-term: facts saved across sessions
Builders
agents/04, whatsapp-agent/03
Prompt versioning
Prompts are code: versioned, traced and evaluated
Builders
prompting/04, rnr
Retrieval (RAG)
Term
In one line
Who needs it
See
Embedding
A list of numbers that captures meaning; similar text gives similar numbers
Everyone
rag/01
Embedding model (sentence transformer)
The model that turns a sentence or chunk into one embedding; nomic-embed-text is ours
Builders
rag/01
Cosine similarity
How close two embeddings point; the usual "how similar" score
Builders
rag/01
Chunking
Cutting documents into searchable pieces: fixed size, by structure, recursive, semantic or by an LLM
Builders
rag/02
BM25
Classic keyword search; catches exact codes like IS 2925 that vectors miss
Builders
rag/05
Hybrid search, RRF
Run vector and keyword search, merge by rank
Builders
rag/05
Metadata filter
Restrict search by tier or doc type inside the query
Builders
rag/06
Query rewriting
Turn "and for bulk?" into a full question before searching
Builders
rag/07
Reranker
A slower, smarter model reorders the top results
Builders
rag/08
Agentic RAG
The model decides what to search, and searches again if the results are weak
Builders
rag/10
Incremental indexing
Re-embed only what changed, using hashes
Builders
rag/03
Document parsing
Turning PDFs and spreadsheets into clean text with structure: headings, one chunk per table row with its column names, scans sent to OCR
Builders
rag/11
Text-to-SQL
The model writes SQL from a question, code runs it, the model explains the rows; scored by running it (execution accuracy)
Builders
rag/12
Semantic layer
Metrics defined once in code (revenue, overdue); the model picks one and code writes the SQL
Architects
rag/13
Vector database
Stores embeddings and finds the nearest ones fast: Chroma, pgvector, Qdrant, Pinecone, Weaviate
Architects
rag/FAQ.md
ANN index (HNSW, IVF)
Approximate nearest-neighbour search: milliseconds instead of a full scan, at about 95 to 99% recall
Architects
rag/FAQ.md
Term
In one line
Who needs it
See
Tool (function) calling
The model asks your code to run a function and reads the result
Everyone
llm-api
MCP
A standard protocol (JSON-RPC over stdio or HTTP) for publishing tools, resources and prompts to any AI client
Everyone
mcp-server
Agent
A loop where the model picks tools until a goal is met or a budget runs out
Everyone
agents/01
Human in the loop
A person approves before anything risky happens
Everyone
agents/06
ReAct
Reason, act, observe, repeat: the default agent loop
Builders
agents/01
Plan-and-execute
Write a plan first, then run it; reviewable, but goes stale
Builders
agents/02
Reflection, critic, verifier
A check (code or model) reviews the output before it goes out
Builders
agents/03, multi-agent/04
Router, supervisor
Sends each request to the right tool, agent or person
Builders
multi-agent/02
Checkpointing
Save agent state so it can pause for approval and resume later
Builders
agents/06
Idempotency key
The same request twice does the action once
Builders
whatsapp-agent/04
Multi-agent
Several small agents with typed handoffs; worth it only when one agent's prompt gets too crowded
Architects
multi-agent/06
Agent frameworks
LangGraph, LlamaIndex, CrewAI, PydanticAI: they save plumbing, not thinking
Architects
agents/07
Quality and safety
Term
In one line
Who needs it
See
Eval, golden set
Fixed cases with known right answers, scored on every change
Everyone
rnr/05
Guardrails
Runtime checks on input and output
Everyone
rnr/01 to 04
Precision and recall
Of what we flagged, how much was right; of what we should flag, how much we caught
Builders
rnr/05
hit@k
Did the right chunk appear in the top k results?
Builders
rag/09
Faithfulness (groundedness)
Is every claim in the answer backed by the retrieved text?
Builders
rag/09
LLM as judge
A model scores answers against a rubric; calibrate it against humans first
Builders
rnr phase 6
Fail closed
When unsure or broken, block or hold rather than let it through
Builders
rnr/04
PII redaction
Mask personal data before it reaches a model or a log
Builders
rnr/03
Trace, span
The record of one request; a span is one step inside it
Builders
rnr phase 3
Regression gate
CI blocks a prompt or model change that lowers the eval score
Architects
rnr/05 is the eval it would run
Serving and scale
Term
In one line
Who needs it
See
Streaming
Send tokens as they're made so users start reading sooner
Builders
llm-api/08
Time to first token, tokens per second
The two latency numbers that matter
Builders
System design §3
Rate and token limits
Caps per user or key, per minute
Builders
Prompt (prefix) caching
Reuse work for a repeated prompt start; put fixed text first
Builders
rnr phase 5
AI gateway
One front door for all model calls: keys, limits, retries, fallback, cost (LiteLLM is one)
Architects
rnr/11
KV cache
Saved attention data for tokens already read, so each new token is cheap; its memory grows with context × users
Architects
Continuous batching
The server adds and drops requests from the GPU batch at every step, so many users share one GPU
Architects
Ollama vs vLLM
Ollama runs models on a laptop; vLLM (or TGI, Triton) serves many users on GPUs
Architects
Semantic cache
Reuse an answer for a similar question; unsafe when answers depend on the customer
Architects
CPU, GPU, TPU
GPUs (and Apple Silicon's shared memory) run models; CPUs are too slow for big ones; TPUs are Google's chips
Architects
Model cascade
Try a small, cheap model first; escalate to a bigger one when unsure
Architects
rnr/01 (rules first), rnr/10 (think only when unsure)
Training and adaptation
Term
In one line
Who needs it
See
Pre-training
Training a model from scratch on huge text: months and millions; not your team's job
Architects
Fine-tuning
Further training on your examples to change behaviour, not to add facts
Architects
PEFT, LoRA
Fine-tuning a small add-on instead of the whole model: cheap, swappable
Architects
Distillation
Train a small model to copy a big one's answers on your task
Architects
RLHF
Training from human preference ratings; how chat models learn to be helpful
Architects
Business words in the examples
The labs use Indian B2B building-materials examples. You don't need the industry; these are the words you'll meet.
Word
Meaning
Where you meet it
B2B
Business-to-business: the buyer is a company (a contractor, a store), not a consumer
Every topic
MSME
Micro, small and medium enterprises: the small businesses that buy from a B2B marketplace
System design
SKU
Stock-keeping unit: one exact product code, such as NUT-M8 or CEM-KIR-PPC
Every topic
RFQ
Request for quotation: a buyer's list of items and quantities, asking for prices
multi-agent
Quote vs order
A quote is our offer with prices and a validity date; an order is the buyer's commitment. No lab lets a model turn one into the other
llm-api/06, agents/06, multi-agent
Credit limit, payment terms
How much a buyer can owe us, and how many days they get to pay (e.g. 30-day terms)
llm-api, mcp-server, whatsapp-agent/05
GST, GSTIN
India's goods and services tax, and a business's tax ID; treated as personal data to mask
rag docs, rnr/03
₹, lakh, crore
Indian rupees; 1 lakh = 100,000 and 1 crore = 10,000,000 (₹5 lakh = ₹500,000)
rag pricing docs, multi-agent/PRACTICE.md
TMT bar, sariya
Steel reinforcement bars for concrete; sariya is the everyday Hindi word, sized in mm (8 mm, 12 mm)
whatsapp-agent
OPC, PPC
Two common cement types (ordinary and pozzolana Portland cement), sold in 50 kg bags
whatsapp-agent
Bag, bundle, ton
Units buyers order in; code converts them to SKU quantities, never the model
whatsapp-agent/02
Hinglish
Hindi and English mixed, typed in Latin letters: "50 bag cement aur 20 sariya bhej do" (aur = and, bhej do = send)
whatsapp-agent, rnr, prompting
All brands, customers and prices are made up.
Next: see these terms working together in System design .