AI & Data Vocabulary
AI & Data Vocabulary
AI is not magic. It is statistics at scale with a very good user interface.
How LLMs Actually Work
An LLM (Large Language Model) is a next-token predictor. Trained on billions of documents, it learns the statistical patterns of language — what word follows what, in what contexts.
When you send a prompt, the model generates tokens one at a time, each based on the probability distribution of what comes next given everything before it.
This is why hallucinations happen. The model does not "know" things — it predicts plausible text. Sometimes plausible is wrong.
The Token Economy
Everything in LLM (Large Language Model) APIs (Application Programming Interfaces) is measured in tokens:
- Input tokens (your prompt)
- Output tokens (the response)
- Context window (max tokens in one call)
A 200,000-token context window means you can send an entire book in one call.
RAG (Retrieval-Augmented Generation): Grounding AI in Your Data
Without RAG (Retrieval-Augmented Generation): "What are our Q3 sales?" — hallucination.
With RAG (Retrieval-Augmented Generation): retrieve Q3 sales data from database — generate answer grounded in real data.
RAG (Retrieval-Augmented Generation) architecture:
- Chunk and embed your knowledge base
- Store vectors in a vector database
- Query: embed the user question, find similar chunks, inject into prompt
- LLM generates with real context
Agents: AI That Acts
An agent is an LLM with tools: search the web, query a database, send an email, write and run code. Multi-step tasks that previously required hours of human work become automated loops.