Large Language Model Terms Explained: A Developer's Guide to Context, RAG, and Agents
This article breaks down the high-frequency terminology used by AI bloggers and maps it back to an engineering perspective. It explains what closed and open-weight models mean for architecture choices, why context windows behave like a fixed desk, how prompt engineering translates vague requirements into explicit constraints, and how retrieval-augmented generation grounds answers in your own data. It also covers when fine-tuning and agents are the wrong tool, and closes with a practical checklist for shipping LLM features with evaluation, observability, and replaceable architecture.
Introduction: Why AI Bloggers Are Hard to Follow
Discussion of large language models has dominated technical communities for the past couple of years. Many developers have had the same experience: you open a explainer video and it is packed with terms like “closed source,” “feed it context,” “prompt engineering,” “vector retrieval,” and “agent.” Each word makes sense on its own, but strung together they are impossible to follow.
The problem is not that the concepts are profound. It is that terminology gets heavily compressed during transmission. Technical detail is dropped, and only conclusions and slogans survive. This article puts those high-frequency terms back into an engineering frame and explains, one by one, what problem each one solves, where its limits are, and how it actually lands in a real project.
1. Closed Source vs. Open Weights: The First Boundary of Model Capability
One pattern that keeps coming up: some mainstream large models expose only an invocation endpoint and publish neither weights nor training details. That is a closed model in engineering terms. The counterpart is an open-weight model, where the parameters are released.
The difference is not just “can you see the code.” It determines your technical route:
- Controllability. A closed model’s behavior is decided by the provider. You cannot intervene when versions are upgraded or policies change. An open-weight model can be deployed locally, so its behavior is comparatively under your control.
- Data flow. Calling an external API means data leaves your own environment, which triggers compliance review when sensitive data is involved. Local deployment keeps data inside your network.
- Cost structure. Closed models are usually billed per call, so the upfront investment is low. Self-hosted inference requires compute and operations spending, and only becomes cheaper at sufficient scale.
- Depth of customization. Closed models generally support adjustment at the prompt level only. Open weights allow deeper parameter-efficient fine-tuning.
Practical advice: treat this as an architecture decision, not a matter of allegiance. Most teams adopt a hybrid strategy. Non-sensitive scenarios that need to ship fast go through API calls; scenarios with strict compliance requirements, high concurrency, or a need for predictability go through self-hosted inference.
2. Context: Models Have No Memory, Only a Current Window
“Feed it context” sounds mysterious, but the mechanism is plain: the model is stateless. It can only see what your single request carries.
Think of the context window as a desk of fixed size. The system instructions, prior conversation, reference material, and the user’s current question all sit on that desk together. When the desk is full, something has to be pushed off. That is why context gets truncated.
A few engineering conclusions follow:
- Multi-turn conversation is not the model remembering. The application resends the history every time. Most “memory features” are external storage plus concatenation logic.
- Longer context does not mean better output. Irrelevant content dilutes the key information, attention gets spread thin, and output quality drops while latency and cost rise.
- Context needs structured organization. A recommended order is: role and task description, hard constraints, reference material, a summary of history, then the current question.
An illustrative way to organize messages:
[System] You are a code review assistant. Point out issues only; do not output a full rewrite.[Constraint] Every conclusion must cite the ID of the relevant guideline item.[Reference] <Insert retrieved guideline excerpts here, with source markers>[Summary] The first 3 turns confirmed a layered architecture; the user cares about maintainability.[User] What are the risks in this implementation?
3. Prompt Engineering: Turning Vague Requirements into Explicit Constraints
Prompts work because they use natural language to supply three things the model is missing: the goal, the constraints, and the output format.
A reusable template has five parts:
- Role: fixes the perspective and the area of expertise.
- Task: one sentence stating what should be produced.
- Constraints: state what must not happen. “No more than 200 words, no metaphors” is far more effective than “write it better.”
- Format: provide a structure or fields so a program can parse the result.
- Examples: one or two input-output samples. This is the cheapest way to improve consistency.
A cold shower is also warranted: prompts are not a master key. They cannot fill gaps in the model’s knowledge, and they cannot guarantee factual correctness. Anything involving internal company data, real-time data, or exact calculation cannot be made reliable through wording alone. You have to bring in external data and tools.
4. Retrieval-Augmented Generation: Look It Up Before Answering
If context is the desk, then “what to put on it” becomes the central question. Retrieval-augmented generation answers it: first find relevant excerpts in your own knowledge base, then place those excerpts in the context so the model answers from the material.
The standard pipeline:
Documents → chunking → embedding → vector store↓User question → embedding → similarity search → reranking → context assembly → model generation → citation trace
Three places cause most of the trouble. Chunk granularity that is too coarse introduces noise; too fine cuts semantics apart. Chunking by semantic paragraph while preserving heading hierarchy usually works. Vector search alone misses proper nouns and identifiers, so it needs keyword search layered on top for hybrid recall. Generated output must be required to mark its source excerpts, otherwise it cannot be verified and errors cannot be traced back.
5. Fine-Tuning and Agents: When Not to Use Them
Fine-tuning continues training a model on business data so it fixes a particular style or task pattern. It fits scenarios where the task boundary is clear, samples are plentiful, and prompt tuning has already hit a ceiling. If the real problem is missing knowledge, retrieval augmentation is usually faster and cheaper.
An agent gives the model the ability to plan and call tools: decompose a task, select a tool, execute, observe the result, then decide the next step. This significantly widens the range of tasks that can be completed, but it also introduces uncertainty. So you need a tool allowlist, an execution budget cap, human confirmation for critical operations, and complete call logs with monitoring and alerting.
6. A Shipping Checklist for Developers
- Classify first. Determine whether the requirement is knowledge Q&A, content generation, workflow automation, or data analysis. Each category maps to a different approach.
- Treat context as resource management. Set a budget, summarize and compress, strip irrelevant history.
- Build an evaluation set. Use a few dozen real cases for regression, and quantify every change with a comparison. Do not judge by feel.
- Prioritize observability. Log the full request, retrieval hits, latency, and failure reasons, and wire them into a logging service with monitoring and alerting.
- Keep the architecture replaceable. Abstract the model invocation layer so business code is not bound to a single implementation, making it easy to switch between API calls and self-hosted inference.
Conclusion
Strip away the packaging and most of the terms AI bloggers use are old problems from distributed systems, information retrieval, and software engineering playing out in a new setting. Once you accept that context is a finite resource, that a model is a stateless function, and that generated output needs external verification, most of the mystique disappears. For developers, the real edge is not how many terms you can recite, but whether you can wrap uncertainty inside engineering boundaries you control.
