LLM, Token, Context, Prompt, RAG, MCP, Skill, Agent: How AI's Core Concepts Fit Together
The AI stack has matured past single-model calls into a multi-component system. Understanding how these pieces divide labor—and where each one breaks—is what separates a brittle prototype from a production system that can retrieve, reason, and act reliably.
An LLM is a probabilistic prediction engine that serves as the reasoning hub, but it cannot access the outside world or execute actions on its own. Token is the basic unit of cost, speed, and capacity, while Context is the dynamically assembled temporary workspace the model sees for each request. Prompt structures the task, RAG retrieves external knowledge to ground answers, and MCP standardizes tool connections to cut integration complexity from M×N to M+N.
Skill packages stable processes, templates, and scripts into reusable modules for things like code review or security checklists. Agent ties everything together into a planning-memory-tools loop that breaks down goals, calls tools, observes results, and iterates until a task is complete. A ReAct-style agent skeleton shows the core cycle: decide, act, observe, repeat.
Common pitfalls include assuming bigger context windows always help, treating RAG as a universal knowledge fix, or believing every task needs an agent. The real shift is organizing the model, context, knowledge, tools, and process into a single coherent system.
The M×N-to-M+N framing for MCP is a crisp way to explain why a protocol layer matters: without it, every new AI client and every new tool multiplies integration work.
Treating Context as a budgeted, noise-sensitive workspace—not an infinite bucket—reframes the engineering problem from 'how to fit everything' to 'what to leave out and where to place it.'
The three-layer memory model (working, short-term, long-term) maps cleanly onto existing infrastructure: context window, session store, and vector DB or external storage.
Skill vs. RAG is a useful stability heuristic: if the content changes weekly, it belongs in a retrievable document store; if it's stable for months, bake it into a Skill module.
Calling an Agent an 'executor' rather than a 'consultant' captures the leap from single-turn Q&A to multi-step goal-driven loops—and explains why reliability and cost control become the hard problems.