Managing Context and Mastery When Building Agentic Systems
Building reliable agentic systems requires careful management of context and a recognition of where human judgment still matters. Context is a scarce resource when working with large language models: packing too much upfront information into a session consumes the context window and increases the chance of degraded or hallucinated outputs. Instead, structure interactions to surface only the minimal instructions needed to locate and retrieve relevant artifacts, and prefer reading code or data directly rather than dumping large narratives into the prompt.
A practical pattern is to treat Markdown files as the stable harness for deterministic behaviors. Use code for parts that require precise control (for example: pulling messages from an external provider, deterministic classification, or scheduling). Keep note content and intent in Markdown so the system can iterate on ideas without coupling them to brittle, hand-coded workflows.
Mastery of the domain and disciplined product thinking matter more than piling features. Quality comes from making the right tradeoffs, understanding the downstream uses of computed values, and applying human verification where stakes are high. For numerical computations, financial logic, or medical contexts, plan for human review and clear auditing of how values were produced and where they are stored.
An effective pipeline mixes deterministic algorithms for classification and structure with LLMs for summarization and enrichment. For example, extract summaries and keywords deterministically and then use an LLM to generate narrative drafts. This separation reduces unexpected behavior while still leveraging generative models for creative tasks.
When designing an assistant, build small, focused instructions for discovery and let the model fetch or compute context incrementally. This reduces token waste and keeps the model focused on the active problem. It also makes debugging easier because each step has a clear purpose and smaller input sizes.
Finally, invest in tooling that surfaces context capacity and warns when sessions approach dangerous limits. Logging and tests that assert behavior for edge cases (e.g., rounding rules, classification boundaries) prevent surprising production errors. Combining human oversight, deterministic components, and careful prompt engineering leads to more robust agentic systems.
Tags: agent, ai, context, productivity