- Published on
Extreme Precision
- Authors
- Name
- Strategic Machines
Engineering AI for precision results
In customer apps, hallucinations aren't just quirky—they're dealbreakers. Companies hesitate to deploy generative AI at critical customer touchpoints because missteps can damage the Brand. The solution isn't just better prompt engineering; it's context engineering - a structure for defining and capturing instruction sets, function calls, and data that deliver results with extreme precision. By leveraging patterns, we can address the unpredictability of large language models (LLMs) and unlock their potential for mission-critical applications.
It has been 2 ½ years since ChatGPT dramatically entered the world and demonstrated the power of Generative AI. When we evaluated the early release of these models, we noted in our posts that content is the new code, but prompt engineering still failed to deliver the precision required by many use cases. While LLMs are astonishing, and every company should pilot the technology, significant risks persist in unsupervised AI applications. Most recently, we highlighted a new risk that has come to our attention, with the ‘unreadable rules’ that are driving business outcomes but are outside of the traditional quality processes. Alas even with all this, it is imperative that we push ahead, address the issues systematically, and leverage the manifold benefits of AI applications. That is precisely our plans at Strategic Machines
The Power of Patterns in AI Engineering
Patterns are the backbone of predictability. In her book Once Upon a Prime, Susan Hart, a professor at the University of London, draws a profound connection between literature and mathematics, noting, “Wherever there is structure, there is mathematics.” Models, like OpenAI’s ChatGPT, implicitly rely on patterns, using word co-occurrence frequencies to generate text. Similarly, Eugenia Cheng, a professor from the University of Cambridge, highlights permutations—a reordering of objects—as a pattern that demands constraints in engineering. She illustrates this in her book, How to Bake Pi, with a vivid example:
If bell-ringers produce every possible permutation in a sequence without repetitions, this has traditionally been called a full peal. The math means that the 30-minute sequence which you might hear at St. Paul’s is far short of that: For 12 bells rung individually, there are over 400 million possible permutations, so at a fairly standard rate of one change rung every two seconds, this would take over 30 years. Understanding that, bell-ringers now call a sequence a peal if it contains at least 5,000 permutations, which takes about three hours.
This insight is critical for AI: exhaustively accounting for every permutation is impractical for businesses which expect to use AI for capturing orders, making payments, addressing client issues or shipping product efficiently. Instead, we must impose constraints to achieve precision within finite resources at acceptable levels of quality.
Context Engineering: The MCP Advantage
Enter the Meta-Context Protocol (MCP), a game-changer in AI architecture. As the fundamental theorem of computer science quips, “All problems in computer science can be solved by another level of indirection.” MCP embodies this by introducing two elegant tools: tools/call
, which invokes any tool by name and arguments, and tools/list
, which lists all available tools. Think of it as reflection in Java or C#—a streamlined way to manage complexity.
MCP reduces the agentic loop—deciding which tool to call, executing it, and iterating—to a simple, reliable process. LLM providers like OpenAI and Anthropic now handle this loop natively, freeing engineers to focus on defining precise contexts. This is where context engineering shines: by constraining actions to a curated set of functions and data, we eliminate the chaos of unbounded LLM outputs.
Precision in Action: A Real-World Example
Consider a user request that demands flawless execution: "Book me the cheapest flight from New York to Los Angeles next Tuesday." The following table illustrates how a context-engineered system processes this request with precision, using multiple tool calls:
Step | Rationale | Action | Outcome |
---|---|---|---|
1 | Check flight availability for the requested date and cities. | Invoke flight search API. | Two flights found: Delta (9:00am–12:00pm), United (10:30am–1:30pm). |
2 | Select the cheaper Delta flight (9:00am–12:00pm). | Invoke flight booking API. | Booking confirmed, PNR: ABC123. |
3 | Make payment. | Submit credit card information. | Payment confirmed, receipt ZXTL15. |
4 | Provide confirmation to the user. | Return response. | "Successfully booked 9:00am Delta flight from New York to Los Angeles next Tuesday. PNR: ABC123." |
5 | Update user calendar. | Invoke calendar API. | "Calendar successfully updated" |
This interaction showcases MCP’s strength: multiple tool calls (flight search, booking) orchestrated within a constrained context, ensuring accuracy. No hallucinations, no detours—just results.
Beyond Prompt Engineering: The Precision Pattern
Our research tested various patterns—Chain of Thought, Few Shot, Meta Prompting, and more—but they faltered under high-precision demands. The winning approach? Context-constrained actions paired with supervised outcomes. By limiting actions to predefined functions and reviewing outputs via a supervisory agent, we’ve achieved reliable precision in client deployments. This isn’t just prompt tinkering; it’s a holistic reengineering of the AI interaction model.
Looking Ahead
Extreme precision in AI isn’t a luxury—it’s a necessity. Context engineering, powered by architectures like MCP, offers a path to reliable, high-fidelity results. In our next post, we’ll dive deeper into blending context and content engineering to achieve the precision required in demanding environments.