| Layer | Key Concepts | Tools / Frameworks |
| Data | Embeddings, tokenization, chunking, vector DB | Pandas, NumPy, HuggingFace Datasets |
| Models | LLM, fine-tuning, LoRA, RLHF, quantization | PyTorch, HuggingFace Transformers |
| Application | RAG, agents, function calling, prompt engineering | LangChain, LangGraph, LlamaIndex |
| Serving | FastAPI, Docker, cloud deployment, monitoring | FastAPI, Docker, AWS/GCP/Azure, MLflow |
| Evaluation | Metrics, RAGAs, A/B testing, model drift | RAGAs, Evidently AI, Weights & Biases |
| Term | One-Line Definition |
| Machine Learning | Systems that learn patterns from data without being explicitly programmed |
| Supervised Learning | Train on labeled (input, output) pairs to predict outputs for new inputs |
| Unsupervised Learning | Find structure in unlabeled data (clustering, dimensionality reduction) |
| Reinforcement Learning | Agent learns by taking actions and receiving rewards/penalties |
| Neural Network | Layers of interconnected nodes that learn hierarchical representations |
| Deep Learning | Neural networks with many layers — enables learning complex patterns |
| Feature Engineering | Transforming raw data into informative inputs for ML models |
| Overfitting | Model memorizes training data, fails to generalize to new data |
| Underfitting | Model too simple to capture the underlying patterns in data |
| Regularization | Technique to penalize model complexity and reduce overfitting (L1, L2, dropout) |
| Cross-Validation | Evaluate model performance on multiple train/test splits of the data |
| Gradient Descent | Optimization algorithm that minimizes loss by moving in the direction of steepest descent |
| Backpropagation | Algorithm to compute gradients of loss w.r.t. all model parameters via chain rule |
| Bias-Variance Tradeoff | Trade-off between underfitting (high bias) and overfitting (high variance) |
| Ensemble Method | Combine multiple models to get better predictions (Random Forest, XGBoost) |
| Bagging | Train models on random subsets of data in parallel, average results (reduces variance) |
| Boosting | Train models sequentially, each correcting previous errors (reduces bias) |
| Transfer Learning | Use pretrained model weights as starting point for a new, related task |
| Data Augmentation | Artificially expand training data by applying transformations (flip, crop, noise) |
| Class Imbalance | When one class has far fewer examples — requires special handling |
| Term | One-Line Definition |
| LLM | Large Language Model — transformer trained on massive text to predict next tokens |
| Token | Smallest unit of text the model processes — roughly 0.75 words on average |
| Context Window | Maximum number of tokens (input + output) an LLM can process in one call |
| Temperature | Controls randomness of output — higher = more creative, lower = more deterministic |
| Top-p (Nucleus Sampling) | Sample from smallest set of tokens whose cumulative probability ≥ p |
| Tokenization | Splitting text into tokens (subwords) — BPE, WordPiece, SentencePiece |
| Embedding | Dense vector representation of text capturing semantic meaning |
| Attention Mechanism | Each token attends to all others — captures long-range dependencies |
| Self-Attention | Attention within the same sequence — computes Q, K, V from same input |
| Multi-Head Attention | Run attention multiple times in parallel with different projections, concatenate |
| Positional Encoding | Adds position information to tokens (transformers are permutation-invariant) |
| BERT | Bidirectional encoder — reads left and right context, good for understanding tasks |
| GPT | Generative Pretrained Transformer — decoder-only, causal, good for generation |
| T5 | Text-to-Text Transfer Transformer — frames all NLP tasks as text-to-text |
| Instruction Tuning | Fine-tune base LLM on (instruction, response) pairs to follow user directions |
| RLHF | Reinforcement Learning from Human Feedback — trains LLMs to be helpful and safe |
| Constitutional AI | Anthropic's method: model critiques itself against a set of principles |
| Hallucination | Model generates plausible but factually incorrect information |
| Grounding | Tying LLM outputs to retrieved facts/documents to reduce hallucinations |
| System Prompt | Instructions set before user conversation — defines model role and behavior |
| Few-Shot Prompting | Give model 2–5 examples in the prompt to guide behavior |
| Chain-of-Thought | Prompt model to "think step by step" — improves multi-step reasoning |
| Prompt Engineering | Craft prompts to elicit specific, high-quality outputs from LLMs |
| Function Calling | Structured API for LLMs to output tool calls as JSON schemas |
| Structured Output | Force LLM to output valid JSON/XML matching a schema |
| Term | One-Line Definition |
| RAG | Retrieval-Augmented Generation — retrieve relevant docs, inject into LLM prompt |
| Vector Database | Database optimized for ANN search over high-dimensional embedding vectors |
| ANN Search | Approximate Nearest Neighbor — fast (not exact) similarity search |
| Cosine Similarity | Dot product of normalized vectors — measures angle between embeddings |
| Chunking | Splitting documents into smaller pieces for embedding and retrieval |
| Semantic Search | Search by meaning (embedding similarity) rather than keyword matching |
| Hybrid Search | Combine keyword (BM25) + semantic (vector) search for better retrieval |
| Reranking | Second-pass model that re-scores retrieved chunks for relevance |
| ChromaDB | Open-source vector DB — great for local/development RAG pipelines |
| Pinecone | Managed cloud vector DB — enterprise-scale RAG deployments |
| FAISS | Facebook's library for fast ANN search — used inside many vector DBs |
| pgvector | PostgreSQL extension for vector storage and search |
| RAGAs | Framework for evaluating RAG systems: faithfulness, precision, recall, relevance |
| Term | One-Line Definition |
| AI Agent | LLM that autonomously takes actions (calls tools, observes results) to achieve goals |
| ReAct | Reasoning + Acting loop: Think → Act (tool) → Observe → repeat |
| LangChain | Framework for building LLM applications — chains, tools, memory, agents |
| LangGraph | Graph-based agent orchestration framework — handles branching, loops, multi-agent |
| LlamaIndex | Framework focused on RAG — document loading, indexing, querying |
| Tool Use | Agent ability to call external functions (search, code, APIs, databases) |
| Agent Memory | Store conversation history, summaries, or facts for later retrieval |
| MCP | Model Context Protocol — Anthropic's standard for connecting LLMs to tools/data |
| Multi-Agent | Multiple specialized LLM agents collaborating on a task |
| Orchestrator | Agent that routes tasks to specialized sub-agents |
| Term | One-Line Definition |
| Fine-Tuning | Update model weights on domain-specific data to improve performance on that task |
| LoRA | Low-Rank Adaptation — train small adapter matrices instead of full weights |
| QLoRA | Quantized LoRA — 4-bit quantization + LoRA, fits 70B fine-tuning on 1 GPU |
| PEFT | Parameter-Efficient Fine-Tuning — umbrella term for LoRA, prefix tuning, adapters |
| Quantization | Reduce weight precision (32-bit → 8-bit or 4-bit) to shrink model size |
| GGUF | File format for quantized models — used with llama.cpp for local inference |
| Ollama | Run quantized LLMs locally — ollama run llama3 |
| Distillation | Train small student model to mimic large teacher model's outputs |
| Model Drift | Model performance degrades over time as real-world data distribution shifts |
| A/B Testing | Deploy two model versions to different user groups, compare business metrics |
| Paper | Year | One-Line Summary |
| Attention Is All You Need | 2017 | Introduced the transformer architecture — replaced RNNs for NLP |
| BERT | 2018 | Bidirectional transformer encoder — pretraining for understanding tasks |
| Language Models are Few-Shot Learners (GPT-3) | 2020 | 175B model can do few-shot tasks from examples alone |
| LoRA: Low-Rank Adaptation | 2021 | Fine-tune LLMs efficiently by training only small adapter matrices |
| Retrieval-Augmented Generation (RAG) | 2020 | Combine retrieval from a knowledge base with generation — reduces hallucinations |
| ReAct: Synergizing Reasoning and Acting | 2022 | LLMs can reason + use tools iteratively to solve complex problems |
| Chain-of-Thought Prompting | 2022 | Prompt model to think step by step — dramatically improves reasoning |
| Constitutional AI (Anthropic) | 2022 | Use model to critique itself against principles — scales alignment |
| InstructGPT / RLHF | 2022 | RLHF makes language models helpful, honest, and harmless |
| Llama 2 | 2023 | Open-source LLM competitive with proprietary models — enabled local AI |
| Library | Category | What It Does | Install |
| numpy | Data | Arrays, linear algebra, math | pip install numpy |
| pandas | Data | DataFrames, CSV/SQL, data manipulation | pip install pandas |
| matplotlib / seaborn | Viz | Static plots and statistical visualizations | pip install matplotlib seaborn |
| scikit-learn | ML | Classical ML algorithms + preprocessing | pip install scikit-learn |
| xgboost / lightgbm | ML | Gradient boosting — best for tabular data | pip install xgboost |
| torch (PyTorch) | Deep Learning | Neural network training — industry standard | pip install torch |
| tensorflow / keras | Deep Learning | Alternative DL framework (Google) | pip install tensorflow |
| transformers | NLP/LLM | HuggingFace models, pipelines, tokenizers | pip install transformers |
| datasets | NLP/LLM | HuggingFace dataset hub | pip install datasets |
| langchain | LLM Apps | Chains, agents, tools, memory | pip install langchain |
| langgraph | Agents | Graph-based agent orchestration | pip install langgraph |
| anthropic | LLM API | Claude API client | pip install anthropic |
| openai | LLM API | OpenAI API client | pip install openai |
| chromadb | Vector DB | Local vector database for RAG | pip install chromadb |
| pinecone | Vector DB | Cloud vector database | pip install pinecone-client |
| fastapi | Serving | Production REST API | pip install fastapi uvicorn |
| streamlit | UI | Quick ML demo web apps | pip install streamlit |
| mlflow | MLOps | Experiment tracking, model registry | pip install mlflow |
| docker | MLOps | Containerize ML apps | (install separately) |