Post

AI glossary: my cheat sheet

The AI terms from the series in one place, grouped by topic, each with a one-line definition and a link to the post that explains it: tokens, RAG, tools, MCP, agents, LoRA, evals and more.

The AI series has five parts: the basics, knowledge and RAG, tools and agents, adapting a model and production.

Models and tokens

Generation and prompting

Knowledge and retrieval

  • Embedding: a vector that represents the meaning of a text. Embeddings and semantic search
  • Cosine similarity: a measure of how close two vectors point. Embeddings and semantic search
  • Vector database: stores vectors and finds the nearest ones fast. Embeddings and semantic search
  • RAG (retrieval-augmented generation): retrieve relevant text and put it in the prompt. RAG
  • Chunking: splitting documents into small pieces before indexing. RAG
  • BM25: the classic keyword-ranking algorithm. Better retrieval
  • Hybrid search / RRF: combining keyword and vector search, often with reciprocal rank fusion. Better retrieval
  • Reranker: a model that scores query and candidate together, to reorder results. Better retrieval
  • Contextual retrieval: adding a short context to each chunk before indexing it. Better retrieval
  • Agentic RAG: the model searches as a tool, as often as it needs. Agentic RAG and GraphRAG
  • Knowledge graph / GraphRAG: facts as connected entities; GraphRAG summarizes graph communities to answer global questions. Agentic RAG and GraphRAG

Tools and agents

Adapting models

  • Fine-tuning: further training on your own examples, which changes the weights. Fine-tuning
  • LoRA / adapter: training a small add-on instead of the whole model. Fine-tuning
  • QLoRA: LoRA on top of a 4-bit base model. Fine-tuning
  • Distillation: training a small student model to imitate a large teacher. Distillation
  • Soft targets: the teacher’s full probability distribution, used to train the student. Distillation
  • Quantization: storing weights with fewer bits to save memory. Running models locally
  • Ollama / GGUF: a tool for running open models locally, and a common file format for them. Running models locally

Production

  • Eval: test cases plus a way to grade the output. Evals
  • LLM-as-judge: a model that grades output against a rubric. Evals
  • Trace / span: all the steps of one request, and each step within it. Observability
  • Prompt caching: reusing a repeated prompt prefix, cheaper and faster. Cost and latency
  • Batch API: asynchronous requests at a discount. Cost and latency
  • Prompt injection: untrusted text that tries to act as an instruction; direct or indirect. Security
  • Excessive agency: a model with more tools or permissions than the task needs. Security
  • Guardrails: checks around the model on input, output and actions. Guardrails
  • Red-teaming: attacking your own system on purpose before attackers do. Security