Understanding Non-Determinism: When is it the superior choice?
This is the third of four posts to introduce my views on how software development is changing in the agentic era. For this post, it's about some of the questions to ask before applying non-determinism to your product. In the future we'll go deeper into non-determinism to help understand what it's best at and how to ask the right questions in building those features.
Software engineering is a discipline that seeks to solve problems with the lowest energy solution possible. Agents represent a new way to solve problems. They're an addition to the solution toolkit. Developing the skills to critically analyze when they're fundamentally superior to deterministic system is paramount. Once they're a part of your product and more traffic flows through non-deterministic automation you will also need to understand how to build insights into its performance (both business metrics and technical correctness).
What should a human do?
Always start with asking what humans should do. Humans are best at craft, creativity and relationships. Agents were never meant to replace any of that. You can think of agents as a very powerful tool but they have a specific role. You don’t give a jackhammer to a skilled labourer and ask them what to jackhammer.
When you identify what humans should do, then you're inevitably left with what they shouldn't be doing. There's rote work. And there are illusionary decisions; the kind where there's only one choice after analysis. These problems were difficult to automate and technological limitations required us to place humans in charge of these tasks. Think of frontline support situations where a customer makes an initial request and it needed a human to route it to the right place to get it resolved.
What were originally incredibly complex processes can now be automated through agents. Identifying which are perfect for non-deterministic automation requires a new system design sense. We'll cover that more in the next section.
What's key is that you make people in your organization are set up to do what humans do best; applying wisdom, craft and relationships. Then the rest is automation, deterministic and non-deterministic. Imagine a financial advisor that uses an agent to build a starting point for a customer's portfolio. From there they add the emotional elements, the personal ambitions of the client, understand what risk a person is actually willing to tolerate, walk through real financial decisions and so on. Human work made better by use of non-deterministic tooling.
We've all heard the joke that we could automate the performance review process. Agents could pull up lines of code written and then when that gets gamed then you develop "significant" lines of code. When that gets gamed then maybe you find an even more complex metric. Maybe with agents then you can now run through each and every PR and ask it questions?
But this is a prime example of what humans should do: humans should be making judgement calls. Managers should be applying their wisdom, past experience and relationship building in a performance review process to be able to say how people will be performing better in the future under their guidance than without. Rubrics serve as a guideline in understanding what it looks like when someone is performing well but not as a set of strict rules and checkboxes. Human performance is rarely about raw output; it's an assessment whether someone has developed strong critical thinking skills and can consistently make the right judgement calls.
Instead, what are agents good at? Shifting through large amounts of well labelled data while asking simple straightforward questions. A manager can ask questions of all the PRs an IC has written and see if what they're thinking has some evidence. These tools can help add quantitative information within the qualitative framework that a manager creates. But the agent cannot possibly create the qualitative statements first; at least not until we see a much more powerful AI tool.
When is non-deterministic superior to deterministic?
When should you opt for non-determinism or determinism in your system? It's important to remember that DB calls are preferable to token spend. Token spend is fundamentally worse; it is more expensive by at least an order of magnitude and it is less reliable. So where do they shine?
Develop your own set of questions to ask. Take a look below for some starting examples.
Is there an intractable size to the mapping between inputs and correct output?
Non-deterministic systems shine where the sunk cost to building a deterministic system is prohibitive. It's obvious when there's already a pre-existing deterministic system that solved the problem; that means industry already spent that sunk cost, so what are you even solving? Don't retread old problems. Aim for the intractable.
Is the task constrained by human labour hours?
Sales, support, paralegal and frontline real estate are common examples of tasks that are generally understood, with many software tools in the space, but remain constrained by human labour hours. Agents are the final automation to lift that restriction.
How it's currently solved was due to technological limitations.
In many cases, a paradigm shift was locked behind technological limitations. An example below helps illustrate.
Email systems represented all three problems from above. There could be any sort of email written to an intractable number of situations. The task is constrained by human labour hours; no company can possibly hire enough people to write all the emails at the right time to all leads. And as much as technology would have liked to solve this problem more elegantly, there were hard limitations.
Non-determinism unlocks a paradigm shift: emails can be generated from scratch with context from a company's CRM (and other sources) to be hyper personalized without a specified email journey to guide what comes first or next. Agents can make all these decisions without human intervention. Agents can react to any and all lead events no matter the time and immediately craft the right email within minutes.
There's a fundamental difference between a purely deterministic system and one that includes non-deterministic elements. That makes it a good bet to build.
Measuring Performance
If you understand a problem well then you’ll already know the business metrics. But can you get deeper insights? Let's use a time machine for a moment and go back to the days before the Internet. This was a time when ads were commercials injected into the shows you watched. How did they measure performance then? They used Nielsen Ratings, essentially a survey to ask households what they saw. Then through voodoo magic you related how much people saw an ad to how it affected sales. Sound wishy-washy? That’s because it was. Once the Internet was widely used and ads migrated there, you suddenly had concepts such as impressions, clickthroughs and conversions. Thus was born modern ad performance measurements.
We’re seeing the same paradigm shift with every product using agents. When we decide that a product is better with non-deterministic components, we are also saying that we can instrument new ways of measuring performance for better insights.
This changes the roles of your subject matter experts. They become part time administrators of these systems, watching and learning how to measure and then improve performance. Their expertise goes beyond staying relevant; agents are amplifying the leverage of someone being best in industry. Someone who truly understands outbound emails can help to craft a system that knows when it did a good job compared to a product whose statistical measurements are coded blindly by non-experts.
This is a deep topic that we'll explore again in the future.
A leasing agent is ultimately there to get leases signed. The business metric is fairly straight forward. Other common metrics are: "leasing agent hours per lease signed", "days vacant until lease signed" etc. However, just looking at the raw business metrics says nothing about how the leasing agent itself is performing.
Deeper insights could include:
- Was the person ready to lease at the time of the call or were they still exploring?
- What kind of features mattered to them and was the leasing agent able to find a suitable unit that matched?
- Did the person meet any eligibility requirements that exists (eg. income threshold)?
From here, you can see if the leasing agent is performing as expected (eg. if a person was not ready to rent then the goal is lead capture rather than lease signed), or if there are technical issues (eg. the leasing agent is consistently unable to find a unit that matches what the renter is looking for but the apartment building did have units that matched the criteria, indicating a problem with its unit look up functionality). You can even use an LLM to process logs or meeting transcripts to gain some of these insights (alongside any needed anonymization for privacy concerns).
More importantly, this information can be pulled up quickly through an analytics dashboard for an administrator to comb through. An experienced administrator would already know what to look for - they already do it in their daily or weekly meetings today, just that they do it with humans and receive imprecise information.
Many industries see this kind of shift from human-collected insights to agent-collected insights. More importantly, this is the value of maintaining subject matter expertise; the humans that used to manage the processes are also the ones who can drive forward how to improve it in the future.
Conclusion
Software long had limitations where the sunk cost of building deterministic systems narrowed what problems it solved. Matching the correct output to an impossibly large ocean of possible inputs was a long laborious task that was too expensive to undertake. Non-deterministic systems, such as LLMs today (and whatever newer AI solutions exist tomorrow), expands our horizons on the problems we can solve. How far can we go?
The whole industry is figuring that out right now. That’s the greenfield development happening everywhere. Those armed with the best questions are able to move quickest to the right solutions. Be that leader.