From deterministic software execution to probabilistic intelligence engineering.
One acronym, two different meanings
For decades, those of us in software engineering have understood ASAP to mean As Soon As Possible. Build faster, execute faster, respond faster and deliver faster. Performance optimization has always been a fundamental engineering objective.
However, as we move from traditional software development into Generative AI and Agentic AI engineering, I believe ASAP deserves a second interpretation: As Slow As Possible.
Semantically, these two expressions represent opposite intentions. Architecturally, however, they complement each other.
An intelligent system should know when to respond immediately, when to reason deeply, when to gather additional context, when to validate its decisions and when to stop.
I call this the Dual ASAP Principle an architectural approach to balancing speed, intelligence, reliability and cost in AI systems.
1. From deterministic execution to probabilistic intelligence
In traditional software engineering, much of our application logic is deterministic. Given the same input, state and execution conditions, we generally expect the same output.
We define the rules, implement the business logic, establish execution paths and validate the expected results. Performance optimization primarily focuses on executing that logic efficiently.
Generative AI introduces another dimension: uncertainty.
The same prompt can produce different responses, execution paths, tool selections and decisions. In an agentic system, this variability can extend across an entire workflow.
This does not mean deterministic engineering becomes irrelevant. Instead, modern AI architecture must combine probabilistic reasoning with deterministic controls.
We are no longer simply optimizing how fast software executes. We are also deciding how much reasoning, context, computation and verification a particular task deserves.
2. ASAP: As Soon As Possible
Not every request deserves deep reasoning. Not every question requires a powerful model. Not every business problem needs a multi-agent architecture.
Sometimes, the most intelligent architectural decision is to avoid using intelligence unnecessarily.
Cache before computing
Before invoking an LLM, determine whether the request can be satisfied through an exact cache, semantic cache, validated previous response or deterministic function.
Semantic caching can eliminate unnecessary model calls and reduce latency and cost. However, semantic similarity does not guarantee that two requests have the same business meaning.
Cache reuse must consider authorization, contextual compatibility, data freshness, source versions and invalidation policies.
A fast response containing outdated or unauthorized information is not a performance improvement.
Route before reasoning
Model routing should select an appropriate execution strategy based on task complexity, business risk, quality requirements, latency and cost.
A classification request may require only a lightweight model. A mathematical calculation may need no LLM at all. A complex regulatory analysis may require a more capable reasoning model supported by external tools.
The objective is not to use the most powerful model for every request. It is to use the least expensive execution path that reliably satisfies the requirements.
Compress before consuming
More context does not automatically produce more intelligence.
Selective retrieval, metadata filtering, reranking, context compression and conversation summarization can reduce unnecessary token consumption while preserving relevant information.
Prompt caching can also reduce repeated processing of common prompt prefixes, where supported by the model provider.
Context optimization should preserve critical facts, business constraints, numerical precision and source references.
The objective is not to minimize context blindly but to maximize its usefulness.
Optimize before orchestrating
Every additional model invocation, agent interaction, retrieval operation and tool call introduces potential latency, cost and failure.
Independent operations can run concurrently. Repeated tool calls can be eliminated. Connections can be reused, and compatible operations can be batched.
Parallel execution can reduce elapsed time, but it does not automatically reduce computational cost.
Before introducing another agent, ask whether a deterministic function, existing capability or simpler workflow can accomplish the same task.
As Soon As Possible means eliminating unnecessary work without sacrificing the required quality.
3. ASAP : As Slow As Possible
Consider an AI agent performing a SOX audit, validating an engineering drawing or supporting a critical financial decision.
Would we prefer an immediate but unreliable answer or a carefully verified result that takes longer?
In these situations, the cost of an incorrect decision may significantly exceed the cost of additional computation.
Reason before deciding
Complex tasks may benefit from decomposition, planning, increased reasoning effort, multiple retrieval steps and iterative problem-solving.
However, additional reasoning should be adaptive rather than mandatory. A system must not continue reasoning simply because more computational capacity is available.
Additional computation is justified only when it meaningfully improves the outcome.
Enrich before concluding
When available information is insufficient, an AI system should gather additional evidence from enterprise knowledge bases, databases, APIs, external tools and relevant conversation history.
Context enrichment is not about filling the context window. It is about resolving uncertainty with relevant and trustworthy information.
Sometimes, asking a clarifying question is more effective than performing ten additional LLM calls.
Verify before trusting
An LLM can generate a convincing answer without generating a correct answer.
Self reflection and evaluator agents may improve quality, but they can also reproduce the same underlying mistakes.
Where possible, probabilistic outputs should be verified against independent evidence, deterministic business rules, calculations, schemas, source documents, test cases or human expertise.
For consequential actions, human approval may be necessary before execution.
Stop before overthinking
An intelligent system must also know when to stop.
Reasoning budgets, token limits, execution deadlines, maximum iterations and acceptance criteria prevent agents from entering expensive or unproductive loops.
If the system cannot establish sufficient reliability within its allocated budget, it should communicate uncertainty, request clarification or escalate to a human rather than manufacture confidence.
As Slow As Possible means spending sufficient effort where accuracy and reliability matter — not deliberately making the system slower.
4. Context engineering: compress and enrich
Context engineering is where the two ASAP principles intersect most clearly.
As Soon As Possible encourages context compression, selective retrieval, memory reuse and token optimization.
As Slow As Possible encourages context enrichment, additional evidence collection, deeper retrieval and verification.
These are not mutually exclusive strategies. A complex agent may retrieve information from multiple enterprise systems and then compress that information into a focused, evidence-based context.
Memory must also be governed. Previously stored information is not necessarily accurate, current or authorized for reuse.
The goal is neither the smallest nor the largest context window.
The goal is the most relevant, reliable and sufficient context for the decision being made.
5. Adaptive intelligence: choosing the right execution path
The real engineering challenge is determining when to go fast and when to think deeply.
A well designed AI system should support multiple execution paths.
The deterministic path handles tasks through business rules, calculations, conventional APIs and validated data without unnecessary LLM involvement.
The fast intelligence path uses caching, lightweight models, selective retrieval and minimal orchestration for straightforward requests.
The deep intelligence path uses additional reasoning, planning, evidence collection, external verification and human oversight where justified.
Dual ASAP: Adaptive Execution Architecture
Execution paths are selected by risk and task requirements. Escalation occurs when the current path cannot satisfy acceptance criteria.
The initial routing decision should not be permanent. A seemingly simple request may reveal conflicting evidence or hidden complexity during execution.
The system should progressively escalate when retrieval quality is insufficient, validation fails, tools return conflicting results or an action carries significant business consequences.
However, high risk tasks must have mandatory minimum verification requirements, regardless of how simple they appear.
This is what I call adaptive intelligence allocation — dynamically determining how much intelligence a task actually needs.
6. The Agent Harness: where Dual ASAP becomes architecture
The Dual ASAP Principle cannot depend entirely on the intelligence of the LLM. It needs an architectural mechanism to enforce it.
This is where the Agent Harness becomes essential.
The harness coordinates model routing, context management, semantic caching, short-term and long-term memory, tool governance, reasoning budgets, checkpointing, security policies, human approvals and execution recovery.
It determines which models and tools an agent is authorized to use, how much computation it can consume and under what conditions it should escalate or terminate.
For agents performing transactional operations, the harness must also support idempotency, controlled retries and duplicate action prevention. A timeout should not cause an agent to accidentally execute the same financial transaction twice.
For long-running tasks, durable execution, checkpointing and progress notifications can improve reliability and user experience without compromising verification.
The LLM provides reasoning capabilities. The harness governs how those capabilities are applied.
The intelligence belongs to the model. The discipline belongs to the architecture.
7. AI can fail quietly even on the fast path
One of the greatest challenges in AI engineering is that an incorrect response may look completely successful.
Imagine an employee asking about the company's leave policy. The AI retrieves an outdated document, generates a well written response and returns it within milliseconds.
The response is fast. The infrastructure is healthy. No exception is thrown. No guardrail is triggered.
Yet the answer is wrong.
Traditional infrastructure monitoring alone cannot detect this kind of failure.
AI systems require continuous evaluations, representative test datasets, production sampling, source freshness checks and human review where necessary.
Even apparently successful cached responses should be periodically evaluated.
When a failure is identified, it should become part of the regression evaluation dataset. The associated retrieval strategy, cache invalidation policy, routing logic or verification mechanism should then be improved.
The fast path should earn its speed through demonstrated reliability rather than assumed correctness.
8. Measure intelligence, not just latency
Traditional software performance engineering commonly measures response time, throughput, resource utilization and error rates.
AI engineering must extend those measurements to include intelligence quality and business outcomes.
We should measure P50, P95 and P99 end-to-end latency, time to first token, token consumption, reasoning effort where observable, retrieval quality, cache effectiveness, tool-call success, groundedness, task accuracy, policy compliance and escalation rates.
We must also measure the additional costs of retries, verification, infrastructure and human intervention.
A cheap model that repeatedly fails may ultimately be more expensive than a capable model that succeeds on the first attempt.
Similarly, an expensive reasoning model performing a trivial classification task is unnecessary spending.
Metrics should be analyzed separately for deterministic, fast and deep execution paths. Otherwise, aggregate averages can conceal important quality and performance problems.
The objective is not merely lower latency or lower token consumption.
The objective is the most economically efficient, reliable business outcome.
9. Optimize perceived latency as well as execution latency
Not every long running AI task needs to keep the user waiting without feedback.
Streaming, asynchronous execution, progress notifications and intermediate status updates can improve the user experience while deeper reasoning and verification continue.
A comprehensive audit may legitimately take several minutes. The application can acknowledge the request immediately, report meaningful progress and deliver the validated result upon completion.
This allows both ASAP principles to coexist within the same application.
Respond to the user as soon as possible. Complete the task as carefully as necessary.
10. Think fast and slow but engineer the transition
Daniel Kahneman's Thinking, Fast and Slow provides a useful analogy through the concepts of System 1 and System 2 thinking.
System 1 represents fast, intuitive processing, while System 2 represents slower, deliberate processing.
AI architecture can adopt a similar conceptual distinction, although LLMs do not necessarily reason in the same way humans do.
The difference is that AI engineers must explicitly design, govern, evaluate and monitor the transition between execution strategies.
We should not assume that an AI model automatically knows when additional reasoning is necessary.
That responsibility belongs to the architecture.
Conclusion: The right amount of intelligence
Traditional software engineering taught us to execute efficiently.
Generative AI engineering challenges us to reason efficiently.
Agentic AI engineering requires us to orchestrate, verify and govern intelligence efficiently.
The Dual ASAP Principle brings these responsibilities together.
As Soon As Possible Cache, route, compress, reuse, simplify and optimize.
As Slow As Possible Reason, enrich, validate, verify and escalate.
Both must operate within business defined boundaries for accuracy, security, reliability, latency and cost.
The future of AI engineering is not about building systems that always respond faster or always reason longer.
It is about building systems that know when speed is valuable, when deeper reasoning is necessary and when uncertainty requires human judgment.
A mature AI architecture is not measured by how much intelligence it consumes, but by how intelligently it consumes intelligence.
Thanks
Sreeni Ramadorai


