📝

LLM Concepts Summary

image

Concepts

Core

  1. LLM: A model that generates text by predicting the next token.
  2. Foundation Model: broad AI model trained on vast amounts of data that can be adapted to many tasks.
  3. Base Model: pre-trained model that predicts text but lacks instruction-following tuning.
  4. Parameter: Internal variables that store the model's learned patterns.
  5. Token: piece of text (word or symbol) used as the basic unit of processing.
  6. Tokenization: process of converting raw text into tokens.
  7. Embedding: Numerical vectors that represent the semantic meaning of tokens.
  8. Latent Space: mathematical "map" where embeddings are organized by meaning.
  9. Multimodality / Multimodal AI: ability to process multiple input types (text, images, audio).
  10. MCP: open standard that enables AI models to connect to data sources and tools seamlessly.

Prompting Layer

  1. Prompt: The complete input (instructions + context) sent to the model.
  2. System Prompt: High-level instructions defining the model's persona/limits.
  3. User Prompt: specific question or request from the human.
  4. Prompt Engineering: craft of refining prompts to get better, more accurate outputs.
  5. Context Window: maximum number of tokens a model can "remember" at one time.
  6. Context Engineering: Managing and optimizing the information provided within the context window.
  7. Zero-Shot Learning: Task performance without any provided examples.
  8. Few-Shot Learning: Including a few examples in the prompt to guide the output.
  9. Chain of Thought: Prompting the model to show its step-by-step reasoning.

RAG

  1. RAG (Retrieval-Augmented Generation): Adding external data to a prompt before generation.
  2. Semantic Search: Searching for information based on meaning rather than just keywords.
  3. Chunk: smaller segment of larger document used for indexing in RAG.
  4. Vector Database: specialized database designed to store and search embeddings efficiently.
  5. Grounding: Linking model responses to verifiable, external facts to prevent errors.

Training

  1. Pre-training: Initial training on massive datasets to learn language patterns.
  2. Fine-tuning: Training a pre-trained model on a specific dataset to shape behavior.
  3. Instruct Model: model fine-tuned specifically to follow directions.
  4. Alignment: Ensuring the AI's goals match human values (helpful, honest, harmless).
  5. RLHF (Reinforcement Learning from Human Feedback): Using human ranking to guide model behavior.
  6. Distillation: Creating a smaller, faster "student" model from a large "teacher" model.
  7. Train-time Compute: The total computational power used during the training phase.
  8. Inference-time Compute (Reasoning Models): The extra processing a model does while thinking before it answers.

Execution

  1. Inference: The process of the model actually generating an output from an input.
  2. Latency: The delay between sending a prompt and receiving the response.
  3. Temperature: A setting that controls the randomness/creativity of the output.
  4. Evals (Evaluations): Systematic tests used to measure a model's performance.
  5. Benchmarks: Standardized tests (like MMLU) used to compare different models.
  6. Workflow: fixed, predefined sequence of steps for an LLM to follow.

Agents

  1. AI Agent: system where the LLM plans and uses tools to achieve a goal.
  2. Agentic AI: AI designed with high degree of autonomy and goal-oriented behavior.

41. Agentic RAG: RAG system where agent decides which data to retrieve and how to use it.

  1. Multi-agent System: Multiple AI agents working together to solve complex tasks.
  2. Agent2Agent: Communication and collaboration between different AI agents.
  3. Reasoning Models: Models (OpenAI's o1) designed to "think" longer to solve complex logic problems.

Safety

  1. Hallucination: When a model confidently generates false or fabricated info.
  2. Guardrails: Rules or systems that block unsafe, biased, or inappropriate content.
  3. Prompt Injection: security vulnerability where a user tries to trick the AI into ignoring its instructions.

Resources

SuperMade with Super