Blog Post
Context Engineering
Context engineering isn't just for AI—it's how we navigate complexity everywhere. Explore micro-level techniques (RAG, prompt engineering, agents) and macro-level enterprise applications that transform banking operations through structured intelligence.
The Context Engineering Discipline
Consider your morning routine. You don't recite your entire life history when ordering coffee—you engineer context. "The usual" works because the barista has accumulated relevant information over time. You've optimized the context window for this specific transaction, filtering out irrelevant details while preserving critical ones (extra shot, oat milk, no foam).
Andrej Karpathy popularized the term "context engineering" to describe this discipline of curating information for AI systems—and like his concept of "vibe coding," it quickly resonated across the tech industry. The phrase captures something fundamental: we're not just prompting models or feeding them data; we're deliberately structuring information to enable intelligent behavior. But what is context engineering really, beyond the buzzword?
Context engineering pervades human interaction. A doctor doesn't review your complete medical history for a prescription renewal. A lawyer doesn't cite every precedent in every brief. We constantly curate, filter, and present information in doses calibrated for specific outcomes. The art lies in determining what to include, what to omit, and how to structure what remains.
Now scale this to AI systems navigating enterprise complexity. The challenge isn't fundamentally different—it's exponentially harder. The context window isn't human memory; it's comprehension ability. The filtering isn't intuition; it's algorithmic precision. The stakes aren't a wrong coffee order; they're production failures affecting millions of customers.
Context engineering for AI systems requires systematic approaches to a universal problem: how do you give intelligent agents exactly the information they need, in the structure they need it, at the moment they need it?
Micro-Level Context Engineering
Academic research has codified context engineering into specific techniques optimizing how AI systems process and utilize information. These aren't abstract theories—they're (becoming) battle-tested methods addressing concrete limitations.
Prompt Engineering crafts inputs guiding model behavior without retraining—few-shot learning through examples, chain-of-thought for reasoning transparency, role-based prompting for behavioral expectations.
Retrieval-Augmented Generation (RAG) dynamically injects relevant information into context windows through vector databases and similarity search. Modern implementations combine embeddings for semantic retrieval with knowledge graphs for relational intelligence—finding not just "payment processing" documents but revealing dependency chains like PaymentExecution→CustomerAuthentication→IdentityVerification→RegulatoryCompliance.
Context Window Optimization maximizes information density within token budgets through intelligent summarization, hierarchical structures, and sliding windows maintaining recent information while compressing historical context.
While expanding context windows address information capacity constraints, effective context engineering remains essential for precision, relevance, and computational efficiency.
Memory Systems extend context beyond single interactions—short-term for conversation state, long-term across sessions, semantic for factual knowledge, episodic for interaction histories.
Agent Architectures orchestrate multiple techniques simultaneously, decomposing complex tasks, maintaining working memory, invoking specialized tools, and reflecting on outcomes. They represent context engineering's evolution from static prompts to dynamic, adaptive reasoning systems.
The technical sophistication is impressive. But it addresses a simpler question: given a well-defined task and structured information, how do we optimize AI performance? Enterprise reality asks different questions: How do we structure chaos? How do we comprehend complexity? How do we create the organized intelligence that these techniques require?
Macro-Level Context Engineering
Banking systems evolved organically over decades. A core banking platform from 1987 runs COBOL no one fully understands. A fraud detection system from 2003 uses proprietary algorithms its vendor won't document. A customer data platform from 2015 integrates seventeen sources with inconsistent schemas. A mobile app from 2022 orchestrates all three plus twelve other systems through patterns existing only in senior developers' heads.
This isn't structure. This is archaeology.
Micro-level context engineering techniques fail here because they assume semi-organized knowledge to retrieve. Vector databases need documents to embed. RAG needs coherent information sources. Prompt engineering needs defined tasks. These simpler schemas do not exist in an enterprise - at least not in standardized forms. The fundamental problem isn't optimizing context delivery—it's creating comprehensible context from almost insurmountable complexity.
Macro-level context engineering addresses this through systematic comprehension preceding optimization. The discipline mirrors micro-level principles while operating at organizational scale. Just as RAG retrieves relevant documents, macro-level approaches discover relevant systems, data, processes and their elements. Just as prompt engineering structures model inputs, macro-level approaches structure enterprise understanding. Just as memory systems maintain state, macro-level approaches preserve institutional knowledge.
This comprehension operates across four critical dimensions:
Systems Comprehension and Structuring analyzes code, APIs, configurations, and architectures—extracting business logic, mapping integration patterns, identifying operational behaviors, tracing dependencies. Result: technical intelligence mapping what systems do and what they depend upon.
Data Comprehension and Structuring maps schemas and semantic relationships across fragmented sources—discovering structures, extracting entity definitions, tracking lineage. This turns schema chaos into coherent data intelligence showing what data represents, where it originates, how it transforms.
Process Comprehension and Structuring captures workflows and orchestration patterns by analyzing workflow definitions, business rules, event processing, and operational runbooks—reconstructing actual operational patterns including undocumented workarounds and tribal knowledge.
Architecture Comprehension and Structuring maps system interconnections, dependency chains, and integration patterns—tracing communications, detecting circular dependencies, modeling topologies. This reveals critical systems, bottlenecks, change propagation, and architectural debt.
These four dimensions create structured intelligence representing the enterprise as it actually operates—not as documented or designed, but as it functions today. This living representation provides the organized intelligence micro-level techniques require.
Schema-Based Context Comprehension recognizes that enterprise chaos follows patterns. Regulatory frameworks, industry standards (like BIAN's 300+ banking service domains), and business domains provide scaffolding. AI agents systematically analyze artifacts but filter discoveries through these frameworks—mapping payment code to Payment Execution domains, recognizing regulatory requirements, inferring data dependencies. Raw artifacts transform into structured intelligence with semantic meaning.
Multi-Dimensional Vector Embeddings preserve multiple semantic dimensions simultaneously—technical characteristics, business semantics, operational context, regulatory requirements. Query precision eliminates noise: "SEPA instant transfers for retail customers through mobile channels" activates specific filters returning exactly the context required, not generic documentation.
Ontological Construction organizes embeddings into graph structures capturing relationships micro-level techniques miss. When architects simulate migrations, graph queries reveal dependency impacts automatically—which processes break, which data becomes inaccessible, which reports fail—against actual system state, not outdated documentation.
Validation and Refinement ensure accuracy through technical, semantic, and operational validation mechanisms. AI agents perform systematic checks; domain experts review ambiguous cases. Result: 95%+ system discovery versus 60-70% traditional approaches, finding 30-40% more systems including shadow IT. Continuous synchronization maintains currency as systems evolve.
This progression creates what micro-level techniques assume exists: organized, accurate, accessible intelligence enabling effective context engineering.
Domain Expertise as Structured Schema
Banking operates under regulatory frameworks (PSD2, GDPR, AML) and industry standards (ISO 20022, SWIFT, BIAN) that aren't just suggestions—they're schemas banking systems should implement. Context engineering incorporating these schemas automatically identifies compliance gaps and inherits decades of domain expertise without manual encoding.
Organizational schemas capture institutional specifics through product hierarchies, geographic structures, channel taxonomies, and business unit divisions. BYOM (Bring Your Own Model) dimensions accommodate these enterprise-specific structures alongside industry standards.
Queries to this type of structured knowledge base activate multiple schemas simultaneously. "Retail savings account opening through mobile channel in European region" triggers product hierarchy, channel taxonomy, geographic structure, service domains (Customer Offer, Account Management), and regulatory frameworks (GDPR, PSD2)—returning precisely relevant context. Schema-based engineering also enables progressive disclosure: junior developers receive simplified contexts, senior architects access detailed specifications, compliance officers view regulatory mappings—each role receiving exactly the context their responsibilities require.
Superior Results Through Structured Context
Micro-level context engineering techniques optimize AI performance when given structured intelligence. Macro-level approaches create that structure from enterprise chaos. Together, they enable transformational capabilities.
Legacy Modernization: Schema-based comprehension accelerates discovery from months to weeks through automated artifact analysis. AI agents extract comprehensive understanding from code, schemas, configurations, and documentation. Result: 95%+ system discovery including shadow IT traditional methods miss, enabling confident modernization planning.
Developer Productivity: When 70% of capacity goes to integration work, context-aware coding assistance changes everything. Developers receive examples from their specific environment; AI-generated code respects discovered patterns, regulatory requirements, and data constraints. Integration development accelerates 70% as developers shift from plumbing to innovation.
M&A Integration: Context comprehension transforms mysterious acquisitions. Pre-close analysis discovers complete architectures including shadow IT. As-Is/To-Be simulations test strategies before production changes, identifying optimal consolidation saving 30-40% integration time and costs—comprehensive context enabling confident decisions versus gambling.
Data Model Construction: When customer data fragments across 20+ systems, semantic data modeling through schema-based comprehension reduces months to weeks. AI agents discover structures, extract meanings, construct universal models reflecting actual usage. Multi-dimensional embeddings enable precise retrieval—"customer address for retail savings accounts in mobile channel" returns context-specific models, not generic tables.
Process Deployment: Natural language process description converting directly to executable BPMN workflows eliminates translation layers across multiple teams. AI agents understanding specific systems, data models, and regulatory constraints generate workflows mapping to actual endpoints. Processes launch in weeks instead of months through intelligence-driven automation comprehending complete operational context.
Enterprise AI Delivery: Fails 60% when lacking data, integration, and governance foundations. Context engineering solves this. Unified data access provides clean intelligence across fragmented systems. Context-aware agents understand banking-specific requirements—regulatory compliance, business rules, operational constraints. Organizations deploy fraud detection, credit decisioning, and customer service AI in weeks rather than years through comprehensive structured intelligence.
From Concept to Practice
Context engineering isn't new—humans practice it constantly. Ordering coffee. Writing legal briefs. Teaching concepts. We curate information for specific outcomes, filtering noise, structuring relevance, delivering precision.
AI systems require the same discipline, but systematic. Micro-level techniques—prompt engineering, RAG, memory systems, agent architectures—optimize performance when given structured intelligence. Macro-level approaches create that structure from enterprise complexity through schema-based comprehension, multi-dimensional embeddings, ontological construction, and continuous validation.
The convergence delivers transformation. Chaos becomes comprehensible. AI gains the structured intelligence it needs to deliver value. Organizations move from firefighting complexity to managing it and escaping its burdens.
Banking's digital transformation stalls not from lack of technology, but from lack of comprehension. The systems exist. The data exists. The processes exist. What's missing is organized intelligence making complexity navigable. Context engineering—properly applied at both micro and macro levels—provides that intelligence.
The platforms enabling this exist today. The techniques are accumulating proof and are getting better and better. The results are measurable. The question isn't whether context engineering works—it's whether organizations will adopt it now or continue struggling with chaos while competitors transform.



