- Context engineering is the discipline of designing and building dynamic systems that provide the right information and tools, in the right format, at the right time, to give an LLM everything it needs to accomplish a task.
- Context engineering is curating knowledge as a continuously maintained data product that delivers the smallest useful set of relevant, trustworthy, and fresh information to an agent at the right time. The goal is to encode expert judgement into the infrastructure to allow agents to produce correct analysis.
- Agents need all the tacit, implicit, scattered knowledge you can give them. Spend resources here.
- Context includes prompts, instructions, retrieved documents, tool calls and results, history, memory, and output schemas—not just retrieved knowledge.
- Output is the product of context and weights. You can go bigger (expensive), think harder (slow), or improve the context (cheap and fast).
- The job is choosing where to be deterministic (code) and where to be probabilistic (the model). Context assembly keeps moving from model calls into the harness.
- Every capability advance moves the problem. Long contexts let in more bad information. Long-horizon agents run longer than they should.
- Context is one of the few inputs that you can tune to get the results you want.
- Context is what an agent has available when doing a task. Knowledge is the reusable understanding we maintain so it can do that task correctly (what a metric means, which source to trust, or how we handle a particular situation). Sometimes written down, often not.
- Knowledge needs to be managed as code (versioning, dependency management).
- Teams share context through a context system where people and agents read and write together.
- Everyone wants your context as their moat. “Rent the intelligence. Own the context.” Keep context in a model-agnostic layer and rent replaceable models and commodity infrastructure so it outlives any agent, model, or vendor.
- Keep context headless and agent-readable. Expose definitions, owners, filters, code, values, lineage, and canonical sources through files and APIs rather than vendor-specific interfaces.
- Context is finite and has diminishing returns. You need to model and clean it.
- Experiment with representations that improve information density and understanding.
- Core tactics are augmentation, tool loadout, quarantine (subagents), pruning, offloading, and summarization. Prune what’s irrelevant before summarizing.
- LLMs have bounded cognition too. A context window is a hard limit on how much it can take into account at any one time. Design sessions so the model doesn’t lose the thread.
- Context is king. Managing the context window effectively is crucial for getting good results.
- Use Progressive Disclosure to ensure that the agent only sees tasks or project-specific instructions when it needs them.
- Tool/skills overload confuses models. Just because you can connect every tool doesn’t mean you should. Each tool description consumes context window space and can confuse the model about which tool to use when.
- Design against three dominant failure modes: concept-to-entity ambiguity, stale knowledge, and retrieval failure. Collapse competing definitions into governed sources, update context with the systems it describes, and route the agent into a small relevant search space.
- Good context is data plus interpretation, procedure, authority and memory.
- Separate declarative knowledge from procedural knowledge. Sources of truth define what concepts mean, while thin routing and runbook skills specify what to consult, in what order, how to resolve ambiguity, and how to verify the result.
- Different source types need different modeling. Slack threads, CRM records, documents, and meetings should not share one generic chunking pipeline.
- Pre-model recurring meaning from expensive unstructured data with versioned prompts and domain taxonomies. Preserve raw sources and lineage.
- Context transformations are lossy compression. Preserve canonical sources and lineage.
- The context window is only the final delivery mechanism (deployment target).
- There is a big bottleneck on information retrieval. Even if you had a magical oracle with perfect information access, the agent (like humans) needs to know how to write the query and the oracle needs to know how to interpret it to fetch only the relevant information given that query.
- Reduce the number of intermediary AI artifacts to avoid compounding slop. Keep interfaces clean and point to the relevant sources.
- The fundational assumption, if you give an agent enough information about a company, the model will figure out how the work gets done, migh not be enough
- More context isn’t the fix
- Docs and Slack record plans and results, not how people did the work
- People decide what matters before they read thanks to selective attention, models read everything, and the output is just more text
- Every workflow has 100 edge cases for which people that are used to it cant explain
- Most of the relevant information only exist in peoples heads and no one knows what almost anyone else is doing on a company
- Design processes to turn all this implicit / tacit process-specific instructions into a format more legible to an agent.
- This is a coordination and organizational problem that cannot be solved by folks spending more time with agents.
- Context is easy to mess up: context poisoning, context distraction, context confusion, context clash, and in agentic models, context inertia and fighting the weights. See Artificial Intelligence Models for training mismatch.
- If you need to gather context, do that first in its own session. Create an artifact that you can later use in a fresh session to give your agent all the context it needs without polluting its context window with tool outputs.
- Apply the bitter lesson to agent memory. Keep an append-only event log and let the agent query it on demand. Give the agent full-text search and read-only SQL so it can decide what to read and summarize once it knows the task.
- Use the raw log as the source of truth. Cache frequently used facts and index past sessions with snippets or summaries that point back to the original events.
- Watch for context inertia. Long-running agents fixate on one hypothesis or subtask and keep pursuing it. Periodically reset the conversation while keeping the environment and a short handoff note.
- Memory needs strategic forgetting. Agent-written memories and skills accumulate conflicting one-off fixes over time. Expire, merge, and deprecate them.
- Scope memory by domain or project so unrelated contexts don’t leak into each other.
- Model decisions, assumptions, evidence, and dependent work as a typed graph.
- Package expertise with the means to apply it. Domain types and knowledge, skills, tools, and review interfaces. Keep project-specific evidence and decisions separate from reusable methods.
- Every correction is an opportunity to improve the system itself.