Project case file

Building Smarter Software: Combining the Precision of Rules with the Reasoning of AI

Building Smarter Software: Combining the Precision of Rules with the Reasoning of AI

What happens when conventional software encounters a problem its rules cannot solve? This practical how-to guide uses a fictional business example to walk readers through designing a system that combines deterministic software, AI agents and human judgement. Learn how the components work together and how to apply the same approach to build smarter business applications.

What happens when conventional software encounters a problem its rules cannot solve? This practical how-to guide uses a fictional business example to walk readers through designing a system that combines deterministic software, AI agents and human judgement. Learn how the components work together and how to apply the same approach to build smarter business applications.

Status
Building
Started
September 2026
Building Smarter Software: Combining the Precision of Rules with the Reasoning of AI project banner

When Traditional Software Meets AI: Designing a System That Can Investigate Exceptions

A practical guide to combining deterministic software, AI agents and human judgement

Project Design — Part 1 | Proposed Architecture

Introduction: What if software could investigate problems instead of simply reporting them?

Think about the software we use every day.

An accounting system processes transactions. An inventory system tracks products. A business application compares records, checks for errors, and produces reports.

Traditional software is very good at performing tasks that follow established rules. It can process thousands of records consistently and accurately, provided the information fits the rules it was designed to follow.

But what happens when it encounters something unexpected?

Suppose an application receives a product description containing a manufacturer it doesn't recognise. It searches its database, finds no match, and reports an exception.

The software has done its job. It has identified something it cannot resolve.

Traditionally, this is where a person takes over.

Someone investigates the unfamiliar manufacturer. They might search the internet, examine product catalogues, contact a supplier, or consult colleagues. They interpret what they discover and recommend how the record should be handled.

A supervisor may approve the recommendation before the information is updated in the company's database.

For decades, this division of responsibilities has been familiar: software handles predictable tasks, while people handle situations requiring interpretation and judgement.

AI introduces another possibility.

Instead of immediately handing every exception to a person, we can introduce an AI component capable of investigating the problem.

It can examine the available information, decide what additional evidence is needed, use approved tools to obtain that evidence, and recommend a resolution.

The human still makes the final decision. The conventional software still performs the database update.

But the investigation that previously required considerable human effort can now be assisted by AI.

This is not about replacing conventional software with AI. In fact, much of the value comes from keeping the conventional software and extending what it can accomplish.

And importantly, building such a system is becoming accessible to people who understand business processes but may have little experience writing software themselves.

Modern AI-assisted development tools can help translate business requirements into working code. However, before building anything, we need to understand what each component does, where AI should become involved, and how the components should work together.

That is what this project explores.

About This Project

This write-up draws on a real client project that I am currently designing and building.

The objective is to combine conventional software with AI-assisted investigation to standardise information received from different parts of an organisation.

To protect client confidentiality, I have replaced the actual business context with a fictional industrial equipment scenario.

The company, manufacturers, products, and examples used throughout this guide are illustrative. However, the architectural questions and design decisions reflect those encountered in the real project.

This first instalment documents the proposed design, not a completed implementation.

My intention is to explain the thinking behind the architecture in sufficient detail that readers can apply the same approach to their own problems.

1. Understanding the Building Blocks

Before designing the application, we need to distinguish several terms that frequently appear in discussions about enterprise AI.

They describe different components, and understanding their responsibilities is essential.

Deterministic software: The conventional application

Deterministic software is software that follows explicitly defined rules and instructions.

Given the same inputs and conditions, a deterministic process produces the same result.

Consider a simple application that standardises manufacturer names.

Its database contains an approved manufacturer called:

COPPER FINCH

The application receives these names from different locations:

  • Copper Finch
  • COPPER FINCH
  • CopperFinch
  • copper finch

We can program the application to ignore differences in capitalisation and spacing.

All four names can then be matched to the approved manufacturer.

This is conventional programming. The software doesn't need to understand the manufacturer. It simply applies predefined rules.

We can make this much more sophisticated by introducing approved aliases, fuzzy matching, and other techniques.

For example, rather than manually listing every possible spelling variation, an algorithm can calculate how closely an incoming name resembles those already in the database.

However, similarity is not necessarily identity. Two manufacturers may have similar names without being the same company.

The application therefore needs rules specifying when a match can be accepted automatically and when it should be treated as uncertain.

There will always be situations where the available rules cannot establish a sufficiently reliable answer.

When that happens, the software should identify an exception rather than invent a match.

AI model: The interpretation capability

An AI model, such as those developed by OpenAI or Anthropic, operates differently.

Rather than relying exclusively on explicitly programmed rules, a language model can interpret information, reason about relationships, and generate responses based on the context it receives.

For example, we might ask:

"Does C. Finch Industrial refer to the same manufacturer as Copper Finch?"

The model could examine the available evidence and explain why the names might refer to the same company.

It might identify possible relationships that would be difficult to capture in conventional matching rules.

But its conclusion is not necessarily correct. A plausible explanation is not proof.

An AI model also does not automatically have access to our company's database, supplier records, or the internet.

It needs an application to provide that information or tools that allow it to retrieve information.

This brings us to the next component.

Tools, connectors, and MCP: Giving AI access to information

A tool allows an AI model to interact with something outside the model itself.

Examples include searching a database, reading a document, querying an external API, or searching the web.

A connector is an integration that enables access to an external system.

MCP, or Model Context Protocol, is an open standard for connecting AI applications with external tools and information sources.

MCP is not synonymous with a connector. A connector is an integration; MCP defines a standardised way for compatible applications to discover and use tools and resources.

For example, we could make a database search function available to an AI application through MCP.

The model could then request that function when it needs information from the database.

MCP isn't mandatory. Applications can also expose ordinary functions or APIs directly to models.

The important distinction is that the AI model interprets information and requests actions, while the connected tools actually retrieve data or perform operations.

AI agent: A model that can investigate and act through tools

An AI agent combines a model with instructions, tools, and software that manages a sequence of actions.

Instead of receiving information and producing a single response, an agent can work through several steps.

Imagine asking an agent to investigate an unfamiliar manufacturer.

It might search the company's existing records, examine a supplier catalogue, search the internet, compare possible matches, and return a recommendation.

Importantly, it can select its next action based on what it discovers.

If the first search is inconclusive, it might try another source.

If the evidence is insufficient, it can report that the manufacturer cannot be reliably identified.

This capacity to adapt the investigation is what makes an agent potentially valuable for problems that do not follow predictable paths.

An agent does not necessarily require a complex framework or multiple cooperating AI models. A single model with appropriate instructions, tools, and a controlled execution loop can be sufficient.

Skills: Reusable instructions for performing tasks

An AI agent needs instructions explaining its responsibilities.

For example:

"Investigate manufacturer names that cannot be matched to the approved database. Use available evidence, distinguish verified information from assumptions, and recommend a resolution without modifying master data."

These instructions can be included directly in the application's code or configuration.

A separate skill is not required.

A skill is a reusable package of instructions and supporting resources that teaches a compatible AI system how to carry out a particular type of work.

One common implementation uses a file called SKILL.md to describe the workflow.

We might eventually develop a detailed procedure for investigating unfamiliar manufacturers.

If that procedure becomes sufficiently established, we could package it as a skill.

An agent could then consult the skill whenever that type of investigation is required. Other compatible AI applications may also be able to use it.

Skills do not provide intelligence or execute independently. They require a model-powered application to interpret and apply their instructions.

The key distinction is simple:

The model provides interpretation. The agent organises the investigation. Tools provide access to information. Skills can provide reusable procedures. Conventional software continues to enforce the business rules.

These components work together, but they are not interchangeable.

2. Our Fictional Business Problem

Let's imagine an industrial equipment company with several operating facilities.

Each facility purchases equipment and replacement parts from different suppliers.

The company wants to consolidate its purchasing records, but it faces a common problem: different facilities describe the same manufacturers and products differently.

Head office maintains two sets of standardised information.

The first is a manufacturer master, containing approved manufacturer names and recognised aliases.

The second is a product category master, defining how different types of equipment should be classified.

Each incoming record must ultimately be associated with the correct manufacturer and product category.

For this first instalment, we will concentrate on identifying the manufacturer.

A straightforward match

One facility submits the following record:

FieldValue
ManufacturerCopperFinch
ProductCF-40 Drive Belt
CategoryMechanical Spares

The approved manufacturer database already contains COPPER FINCH.

Our conventional software normalises the incoming name and identifies the match.

There is no need to involve AI.

The application can simply assign the approved manufacturer identifier to the incoming record.

An unfamiliar name

Now imagine another facility submits:

FieldValue
ManufacturerC. Finch Industrial
ProductCF-S2 Sensor
CategoryElectrical Parts

The software searches the approved manufacturer database.

It finds no exact match or approved alias.

A fuzzy matching algorithm might identify COPPER FINCH as a possible candidate, but the similarity is not sufficient to establish that the two names represent the same company.

Perhaps C. Finch Industrial is a trading name used by Copper Finch.

Perhaps it is a distributor.

Or perhaps it is an entirely different manufacturer.

This is where the deterministic system reaches the limit of what it can reliably establish.

Traditionally, the software would create an exception for someone to investigate.

Our proposed design introduces AI into that investigation.

3. Two Ways to Introduce AI

This is probably the most important architectural decision in the project.

When conventional software encounters something it cannot resolve, how much responsibility should we give AI?

There are two approaches worth comparing.

Approach A: Software decides what to search; AI interprets the results

Under this approach, conventional software remains responsible for deciding which actions to perform.

We could program the following sequence:

  1. Search the approved manufacturer database.
  2. If no reliable match exists, search an external supplier directory.
  3. Search the internet for the unfamiliar manufacturer name.
  4. Collect the results.
  5. Send the information to an AI model for interpretation.

The AI model examines the evidence and recommends whether the unfamiliar name matches an existing manufacturer.

Notice something important here.

Conventional software can search the internet without AI.

We can program it to send a search query to a search service and retrieve the results.

It doesn't need to understand what those results mean. It simply follows the programmed sequence.

The AI model is then called to interpret the information collected.

This approach has several advantages.

The process is predictable. We know which sources will be searched, in what order, and under which conditions.

We can also control costs and processing time because the investigation follows a predefined sequence.

For many problems, this may be entirely sufficient.

But there is a limitation.

The software is still responsible for deciding what information AI receives.

Consider our unfamiliar manufacturer, C. Finch Industrial.

A general internet search might return an unrelated consulting business, a retailer, or information about an individual named Finch.

The software has successfully performed the search, but the results may have little relevance to the problem.

The AI model can interpret the information it receives. However, if the investigation has omitted the most useful sources, the model may have insufficient evidence to reach a reliable conclusion.

We could keep improving the software by adding additional searches and conditional rules.

But as the number of exceptions grows, those rules can become increasingly complicated.

This leads us to the second approach.

Approach B: AI decides how to investigate

Instead of programming every search in advance, we give an AI agent responsibility for planning and conducting the investigation.

Our conventional software still performs the initial matching.

But when it encounters an unresolved case, it passes the relevant information to the agent.

The agent receives something like:

Investigation request

  • Incoming manufacturer: C. Finch Industrial
  • Product: CF-S2 Sensor
  • Possible existing match: COPPER FINCH
  • Problem: Manufacturer identity cannot be established reliably
  • Objective: Determine whether this is an existing manufacturer, an alias, or a genuinely new manufacturer

The agent now decides what information would help resolve the uncertainty.

It might first examine the product description.

The product code CF-S2 could provide a useful clue.

The agent might search for the product code rather than the company name.

If it discovers a manufacturer catalogue associating CF-S2 with Copper Finch, it can examine that evidence.

Perhaps the catalogue identifies C. Finch Industrial as a registered trading name.

Alternatively, it might discover that the product is manufactured by an entirely different company.

The agent can adapt its investigation according to what it finds.

It could also identify conflicting evidence and request human assistance rather than forcing a conclusion.

The important difference is that we are no longer programming every investigative step.

We are giving the agent an objective, a defined set of tools, and boundaries within which it can decide what to do.

That flexibility is the principal reason to consider an agent.

Comparing the two approaches

QuestionSoftware-controlled investigationAgent-led investigation
Who determines the search sequence?Conventional softwareAI agent
Who selects the next search?Predefined rulesAI, based on findings
Can the investigation adapt to unexpected evidence?Only within programmed rulesYes, within permitted tools and limits
Who interprets the evidence?AI modelAI model
Who approves the recommendation?HumanHuman
Who updates the master database?Conventional softwareConventional software

Which approach should we choose?

Neither approach is universally better.

Software-controlled investigations are appropriate when the steps are known, the sources are predictable, and the information can be obtained reliably through a fixed process.

Agent-led investigations become more attractive when the next action depends on interpreting previous findings.

For our project, I am leaning towards an agent for unresolved manufacturer identities.

The deterministic engine should resolve straightforward cases. There is little reason to pay for AI to perform work that conventional software can already handle reliably.

But when an unfamiliar name requires research across unpredictable sources, an agent may offer greater flexibility.

This remains a design hypothesis.

We will need to test whether that flexibility actually produces better results at an acceptable cost.

4. Designing the Investigation Workflow

Having decided where AI might add value, we need to define exactly how the system should operate.

The proposed workflow consists of four stages.

Stage 1: Deterministic matching

Every incoming manufacturer name first passes through the conventional matching engine.

The engine performs operations such as name normalisation, exact matching, approved-alias matching, and candidate identification.

Cases that satisfy established matching rules can be resolved automatically.

Cases that remain uncertain are passed to an exception-handling process.

This is an important design principle.

AI should not become the default solution for every problem simply because it is available.

Stage 2: AI-assisted investigation

The investigation agent receives the unresolved record and any relevant candidate matches.

It can access approved tools, such as a read-only search of the manufacturer master, permitted supplier information, or authorised external research sources.

The agent is responsible for examining the evidence and producing a recommendation.

It does not receive unrestricted access to the company's systems.

We would also define limits on the investigation, including the number of searches, maximum processing time, and conditions requiring escalation.

Most importantly, the agent must be allowed to conclude:

Insufficient evidence to determine the manufacturer.

An uncertain answer is preferable to a confident but incorrect recommendation.

Stage 3: Human review and approval

Imagine that the agent concludes C. Finch Industrial is an alternative name for COPPER FINCH.

It should return a structured recommendation containing the proposed standardised manufacturer, the supporting evidence, the reasoning behind the recommendation, and any remaining uncertainty.

A human reviewer examines the recommendation.

The reviewer may approve it, reject it, request further investigation, or correct the proposed mapping.

Human approval is particularly important when a decision creates or changes authoritative master data.

Stage 4: Deterministic write-back

Once the reviewer approves the recommendation, the conventional application takes over again.

It validates the approved change and performs the database update.

For example, it might add C. Finch Industrial as an approved alias of COPPER FINCH.

If the investigation instead established a genuinely new manufacturer, the application could create a new master record following the company's naming and approval rules.

The AI agent does not independently modify the manufacturer master.

This separation preserves control over authoritative data and provides a clear audit trail.

The complete architecture

The workflow can be summarised as follows:

  1. Incoming record — A facility submits its equipment information.
  2. Deterministic matching engine — The system applies established rules and approved mappings.
  3. Exception handling — Unresolved records are identified and prepared for investigation.
  4. AI investigation agent — The agent uses approved tools to gather and interpret evidence.
  5. Recommendation — The agent proposes a resolution or reports insufficient evidence.
  6. Human review — An authorised reviewer approves, rejects, or corrects the proposal.
  7. Deterministic write-back — Conventional software validates and records the approved decision.
  8. Future processing — The approved mapping becomes available to the deterministic engine.

The last step is especially important.

If C. Finch Industrial is approved as an alias of COPPER FINCH, the next time that name appears, the conventional software can recognise it.

There may be no need for AI to investigate it again.

Over time, the system can resolve more recurring cases deterministically as approved knowledge accumulates.

The governing principle is:

Deterministic software handles established rules. AI investigates uncertainty. Humans approve material decisions. Deterministic software records approved changes.

This gives each component a clear responsibility.

5. What Do We Actually Need to Build?

We now have an architectural concept. But how would someone translate that concept into a working application?

I would divide the implementation into several components.

The deterministic matching engine

This handles incoming records, standardised names, approved aliases, and matching rules.

It also determines when a record should be treated as unresolved.

The exception-management component

Rather than immediately invoking AI whenever something goes wrong, the application creates an exception record.

That record preserves the original information, potential matches, and reason for escalation.

It gives the investigation a clearly defined starting point.

Repeated unresolved names can also be grouped together so that the system does not investigate the same problem unnecessarily.

The AI investigation component

This contains the agent's instructions, available tools, and execution loop.

It receives the exception, conducts the permitted investigation, and returns a structured recommendation.

The instructions must specify what the agent is trying to establish, what evidence is acceptable, when it should stop, and when it must seek human assistance.

The human approval interface

A reviewer needs to see the original record, proposed resolution, evidence, and explanation.

The interface should allow approval, rejection, or correction.

The master-data update component

This conventional software component checks the approved recommendation against database constraints and business rules before applying the change.

Each action should be recorded for audit purposes.

We also need monitoring and testing across the workflow.

For example, we should measure how often the matching engine resolves cases without AI, how frequently agent recommendations are approved, how often investigations remain inconclusive, and the cost of processing each exception.

These measurements will help determine whether introducing AI actually improves the process.

Do we need an MCP server or a skill?

Not necessarily.

For an initial implementation, the agent might need only a few ordinary function tools:

  • Search approved manufacturers.
  • Retrieve candidate manufacturer records.
  • Search approved external sources.
  • Return a structured investigation result.

These tools can be integrated directly into the application.

MCP becomes useful when a standardised connection is desirable, particularly if the same tools will serve multiple AI applications.

Similarly, we can begin with instructions embedded in the investigation component.

A skill becomes worth considering when we establish a reusable investigation procedure that benefits from being maintained separately.

We should introduce additional architecture only when it serves a clear purpose.

An important operational consideration

The availability of an AI model through a company's ChatGPT or other AI subscription does not, by itself, establish that a custom application is authorised or technically configured to use that model through an API.

Before implementation, the project must confirm appropriate API access, authentication, data-handling policies, permitted tools, and organisational approval.

These are application-design requirements, not details to resolve after deployment.

6. Designing for Different AI Models

There is one more architectural decision worth making before development begins.

What happens if the organisation changes AI providers?

For example, imagine that we initially build our investigation agent using an OpenAI model.

Later, the client decides to adopt an Anthropic model.

Would we need to rebuild the entire application?

Ideally, no.

The key is to separate the business logic from the AI-provider-specific implementation.

Introducing an AI provider adapter

Instead of allowing our application to communicate directly with a particular provider throughout the codebase, we introduce a defined interface.

The application sends an investigation request through that interface.

The provider-specific implementation handles communication with the selected AI service.

It also translates provider-specific tool calls and responses into formats our application understands.

Conceptually, the architecture separates three layers:

Business application → AI investigation service → AI provider adapter → Selected model

The application should not need to know which provider is performing the investigation.

It only needs to know what information to submit and what kind of result it expects in return.

The investigation service manages the task and its boundaries. The provider adapter handles differences in how individual AI services are accessed.

What can remain unchanged?

ComponentExpected impact of changing AI provider
Deterministic matching engineShould remain unchanged
Manufacturer and category master dataRemain unchanged
Approved business rulesRemain unchanged
Human approval workflowShould remain unchanged
Deterministic database updatesShould remain unchanged
AI investigation instructionsReusable, but may need adjustment
Independently implemented tools and MCP serversOften reusable; integration may change
Agent execution frameworkDepends on whether it is provider-specific
AI provider adapterReplace or modify
Output validation and evaluationMust be tested again

The provider adapter reduces dependency on a particular model, but it does not guarantee effortless portability.

Different providers can have different API conventions, tool-calling behaviour, supported features, and model capabilities.

Even when two systems support the same general concepts, their implementations may not be identical.

The agent's investigation instructions may also need adjustment to achieve comparable performance.

Most importantly, a new model must be evaluated against representative business cases before it is approved for production.

A different model may reach different conclusions even when given the same evidence.

That is why the business rules, evidence requirements, output structure, and approval process should remain under the application's control.

What about skills and MCP?

MCP may help preserve integrations when changing AI systems because it defines a common protocol for exposing tools and information.

Similarly, skills written using a supported open format may allow some investigation procedures to be reused.

However, neither guarantees that every component will work unchanged with another provider.

Compatibility still depends on the particular application's support and implementation.

Our objective is not to eliminate all future migration work. It is to prevent the AI provider from becoming unnecessarily embedded in the business system.

7. Preparing for a More Complex Problem: Product Categories

So far, we have concentrated on identifying manufacturers.

But our fictional equipment company has a second problem.

It must also classify products into standardised categories.

Consider two products manufactured by Copper Finch.

ProductFacility's CategoryHead Office Category
CF-40 Drive BeltMechanical SparesPower Transmission
CF-S2 SensorElectrical PartsSensors & Controls

Both products belong to the same manufacturer.

But they belong to different product categories.

Knowing that the manufacturer is COPPER FINCH does not automatically determine how a product should be classified.

Different facilities may also use different category definitions.

One facility might classify a sensor as an electrical component. Another might group the same type of product under maintenance supplies.

Head office may use an entirely different classification structure.

This introduces a second dimension of investigation.

Identifying a manufacturer is primarily a question of determining identity.

Classifying a product may require examining its purpose, technical specifications, and the company's classification rules.

The relationship between manufacturer and category is not necessarily one-to-one.

A manufacturer can produce several types of equipment, and each product may require a different category assignment.

We therefore need to keep the manufacturer master and category master separate.

We also need to consider that an approved mapping may have different scopes.

An approved alternative spelling of a manufacturer can generally be reused wherever that same manufacturer appears.

But an approved category mapping might apply only to a particular product, product family, or combination of attributes.

This distinction matters when deciding what information should be stored for future deterministic reuse.

The larger principle remains the same.

We should resolve what we can through established rules, investigate genuine uncertainty using AI where appropriate, and retain human responsibility for approving changes.

However, category mapping may require more sophisticated evidence and rules than the manufacturer-identification problem explored here.

That is a natural next stage for the project.

8. What We Need to Establish During the Build

The proposed architecture gives us a starting point, but several practical questions remain unanswered.

How far can deterministic matching take us?

We need to test normalisation, aliases, and matching algorithms against realistic data before deciding which cases genuinely require AI.

How reliable is agent-led investigation?

An agent might identify relationships that conventional matching misses. But it may also be misled by incomplete evidence, unrelated search results, or incorrect information published online.

We need representative test cases to evaluate its recommendations.

How much autonomy should the agent have?

We can control which tools it may use, how many investigative steps it may take, and when it must stop.

The appropriate limits will become clearer through testing.

Do we eventually need a skill?

We may discover that certain types of exceptions follow recurring investigative patterns.

If so, documenting those patterns in a reusable skill may improve consistency and maintainability.

But we should not assume a skill is necessary before we understand the actual work.

How do we determine whether the design is successful?

A successful implementation should do more than produce plausible AI recommendations.

It should reduce repetitive manual investigation while maintaining acceptable accuracy, control, processing time, and cost.

We also need to understand how often humans correct or reject AI recommendations.

Those observations will influence the architecture as the project develops.

Conclusion: Extending What Conventional Software Can Do

The central idea behind this project is relatively simple.

We do not need to abandon conventional software to benefit from AI.

Instead, we can preserve the strengths of deterministic systems and introduce AI where interpretation and investigation are required.

Traditional software is effective when the rules are clear and the desired outcomes can be defined.

AI becomes useful when the application encounters uncertainty that cannot be resolved reliably through those rules alone.

An agent adds another capability: it can decide how to investigate an unfamiliar problem within the tools and boundaries we provide.

But the presence of AI does not eliminate the need for human judgement.

In our proposed design, the agent investigates and recommends. The human approves. The conventional application validates and records the decision.

Once an exception has been resolved and an approved mapping stored, the system can apply that knowledge deterministically the next time it encounters the same situation.

This is what makes the architecture interesting.

AI doesn't simply process the exceptions. It can help turn resolved exceptions into reusable business knowledge.

Over time, that may reduce the number of cases requiring investigation.

There is also a broader opportunity here for people who understand business processes but have never written software.

AI-assisted development makes it increasingly practical to design and build applications around problems that previously required substantial programming expertise.

Understanding the division of responsibilities between software, AI models, agents, tools, and people becomes an important part of that process.

This project is an attempt to put those ideas into practice.

The architecture described here is our starting hypothesis. The actual build will tell us which decisions work, which assumptions need revision, and where additional complexity is justified.

What comes next?

As implementation progresses, I may publish further instalments documenting what actually happens when we build and test the system.

Potential topics include the performance of deterministic matching, the effectiveness of agent-led investigations, category classification, whether reusable skills prove useful, and the practical challenges of integrating AI into a controlled business workflow.

If the implementation produces reusable components, a later instalment may also include example code or a reference architecture that readers can adapt to their own projects.

For now, the objective is to establish a sound foundation.

Start with deterministic software. Introduce AI where interpretation adds value. Keep humans responsible for approval. And design the system so that its business logic remains independent of the AI model it uses.

When Traditional Software Meets AI: Designing a System That Can Investigate Exceptions

A practical guide to combining deterministic software, AI agents and human judgement

Project Design — Part 1 | Proposed Architecture

Introduction: What if software could investigate problems instead of simply reporting them?

Think about the software we use every day.

An accounting system processes transactions. An inventory system tracks products. A business application compares records, checks for errors, and produces reports.

Traditional software is very good at performing tasks that follow established rules. It can process thousands of records consistently and accurately, provided the information fits the rules it was designed to follow.

But what happens when it encounters something unexpected?

Suppose an application receives a product description containing a manufacturer it doesn't recognise. It searches its database, finds no match, and reports an exception.

The software has done its job. It has identified something it cannot resolve.

Traditionally, this is where a person takes over.

Someone investigates the unfamiliar manufacturer. They might search the internet, examine product catalogues, contact a supplier, or consult colleagues. They interpret what they discover and recommend how the record should be handled.

A supervisor may approve the recommendation before the information is updated in the company's database.

For decades, this division of responsibilities has been familiar: software handles predictable tasks, while people handle situations requiring interpretation and judgement.

AI introduces another possibility.

Instead of immediately handing every exception to a person, we can introduce an AI component capable of investigating the problem.

It can examine the available information, decide what additional evidence is needed, use approved tools to obtain that evidence, and recommend a resolution.

The human still makes the final decision. The conventional software still performs the database update.

But the investigation that previously required considerable human effort can now be assisted by AI.

This is not about replacing conventional software with AI. In fact, much of the value comes from keeping the conventional software and extending what it can accomplish.

And importantly, building such a system is becoming accessible to people who understand business processes but may have little experience writing software themselves.

Modern AI-assisted development tools can help translate business requirements into working code. However, before building anything, we need to understand what each component does, where AI should become involved, and how the components should work together.

That is what this project explores.

About This Project

This write-up draws on a real client project that I am currently designing and building.

The objective is to combine conventional software with AI-assisted investigation to standardise information received from different parts of an organisation.

To protect client confidentiality, I have replaced the actual business context with a fictional industrial equipment scenario.

The company, manufacturers, products, and examples used throughout this guide are illustrative. However, the architectural questions and design decisions reflect those encountered in the real project.

This first instalment documents the proposed design, not a completed implementation.

My intention is to explain the thinking behind the architecture in sufficient detail that readers can apply the same approach to their own problems.

1. Understanding the Building Blocks

Before designing the application, we need to distinguish several terms that frequently appear in discussions about enterprise AI.

They describe different components, and understanding their responsibilities is essential.

Deterministic software: The conventional application

Deterministic software is software that follows explicitly defined rules and instructions.

Given the same inputs and conditions, a deterministic process produces the same result.

Consider a simple application that standardises manufacturer names.

Its database contains an approved manufacturer called:

COPPER FINCH

The application receives these names from different locations:

  • Copper Finch
  • COPPER FINCH
  • CopperFinch
  • copper finch

We can program the application to ignore differences in capitalisation and spacing.

All four names can then be matched to the approved manufacturer.

This is conventional programming. The software doesn't need to understand the manufacturer. It simply applies predefined rules.

We can make this much more sophisticated by introducing approved aliases, fuzzy matching, and other techniques.

For example, rather than manually listing every possible spelling variation, an algorithm can calculate how closely an incoming name resembles those already in the database.

However, similarity is not necessarily identity. Two manufacturers may have similar names without being the same company.

The application therefore needs rules specifying when a match can be accepted automatically and when it should be treated as uncertain.

There will always be situations where the available rules cannot establish a sufficiently reliable answer.

When that happens, the software should identify an exception rather than invent a match.

AI model: The interpretation capability

An AI model, such as those developed by OpenAI or Anthropic, operates differently.

Rather than relying exclusively on explicitly programmed rules, a language model can interpret information, reason about relationships, and generate responses based on the context it receives.

For example, we might ask:

"Does C. Finch Industrial refer to the same manufacturer as Copper Finch?"

The model could examine the available evidence and explain why the names might refer to the same company.

It might identify possible relationships that would be difficult to capture in conventional matching rules.

But its conclusion is not necessarily correct. A plausible explanation is not proof.

An AI model also does not automatically have access to our company's database, supplier records, or the internet.

It needs an application to provide that information or tools that allow it to retrieve information.

This brings us to the next component.

Tools, connectors, and MCP: Giving AI access to information

A tool allows an AI model to interact with something outside the model itself.

Examples include searching a database, reading a document, querying an external API, or searching the web.

A connector is an integration that enables access to an external system.

MCP, or Model Context Protocol, is an open standard for connecting AI applications with external tools and information sources.

MCP is not synonymous with a connector. A connector is an integration; MCP defines a standardised way for compatible applications to discover and use tools and resources.

For example, we could make a database search function available to an AI application through MCP.

The model could then request that function when it needs information from the database.

MCP isn't mandatory. Applications can also expose ordinary functions or APIs directly to models.

The important distinction is that the AI model interprets information and requests actions, while the connected tools actually retrieve data or perform operations.

AI agent: A model that can investigate and act through tools

An AI agent combines a model with instructions, tools, and software that manages a sequence of actions.

Instead of receiving information and producing a single response, an agent can work through several steps.

Imagine asking an agent to investigate an unfamiliar manufacturer.

It might search the company's existing records, examine a supplier catalogue, search the internet, compare possible matches, and return a recommendation.

Importantly, it can select its next action based on what it discovers.

If the first search is inconclusive, it might try another source.

If the evidence is insufficient, it can report that the manufacturer cannot be reliably identified.

This capacity to adapt the investigation is what makes an agent potentially valuable for problems that do not follow predictable paths.

An agent does not necessarily require a complex framework or multiple cooperating AI models. A single model with appropriate instructions, tools, and a controlled execution loop can be sufficient.

Skills: Reusable instructions for performing tasks

An AI agent needs instructions explaining its responsibilities.

For example:

"Investigate manufacturer names that cannot be matched to the approved database. Use available evidence, distinguish verified information from assumptions, and recommend a resolution without modifying master data."

These instructions can be included directly in the application's code or configuration.

A separate skill is not required.

A skill is a reusable package of instructions and supporting resources that teaches a compatible AI system how to carry out a particular type of work.

One common implementation uses a file called SKILL.md to describe the workflow.

We might eventually develop a detailed procedure for investigating unfamiliar manufacturers.

If that procedure becomes sufficiently established, we could package it as a skill.

An agent could then consult the skill whenever that type of investigation is required. Other compatible AI applications may also be able to use it.

Skills do not provide intelligence or execute independently. They require a model-powered application to interpret and apply their instructions.

The key distinction is simple:

The model provides interpretation. The agent organises the investigation. Tools provide access to information. Skills can provide reusable procedures. Conventional software continues to enforce the business rules.

These components work together, but they are not interchangeable.

2. Our Fictional Business Problem

Let's imagine an industrial equipment company with several operating facilities.

Each facility purchases equipment and replacement parts from different suppliers.

The company wants to consolidate its purchasing records, but it faces a common problem: different facilities describe the same manufacturers and products differently.

Head office maintains two sets of standardised information.

The first is a manufacturer master, containing approved manufacturer names and recognised aliases.

The second is a product category master, defining how different types of equipment should be classified.

Each incoming record must ultimately be associated with the correct manufacturer and product category.

For this first instalment, we will concentrate on identifying the manufacturer.

A straightforward match

One facility submits the following record:

FieldValue
ManufacturerCopperFinch
ProductCF-40 Drive Belt
CategoryMechanical Spares

The approved manufacturer database already contains COPPER FINCH.

Our conventional software normalises the incoming name and identifies the match.

There is no need to involve AI.

The application can simply assign the approved manufacturer identifier to the incoming record.

An unfamiliar name

Now imagine another facility submits:

FieldValue
ManufacturerC. Finch Industrial
ProductCF-S2 Sensor
CategoryElectrical Parts

The software searches the approved manufacturer database.

It finds no exact match or approved alias.

A fuzzy matching algorithm might identify COPPER FINCH as a possible candidate, but the similarity is not sufficient to establish that the two names represent the same company.

Perhaps C. Finch Industrial is a trading name used by Copper Finch.

Perhaps it is a distributor.

Or perhaps it is an entirely different manufacturer.

This is where the deterministic system reaches the limit of what it can reliably establish.

Traditionally, the software would create an exception for someone to investigate.

Our proposed design introduces AI into that investigation.

3. Two Ways to Introduce AI

This is probably the most important architectural decision in the project.

When conventional software encounters something it cannot resolve, how much responsibility should we give AI?

There are two approaches worth comparing.

Approach A: Software decides what to search; AI interprets the results

Under this approach, conventional software remains responsible for deciding which actions to perform.

We could program the following sequence:

  1. Search the approved manufacturer database.
  2. If no reliable match exists, search an external supplier directory.
  3. Search the internet for the unfamiliar manufacturer name.
  4. Collect the results.
  5. Send the information to an AI model for interpretation.

The AI model examines the evidence and recommends whether the unfamiliar name matches an existing manufacturer.

Notice something important here.

Conventional software can search the internet without AI.

We can program it to send a search query to a search service and retrieve the results.

It doesn't need to understand what those results mean. It simply follows the programmed sequence.

The AI model is then called to interpret the information collected.

This approach has several advantages.

The process is predictable. We know which sources will be searched, in what order, and under which conditions.

We can also control costs and processing time because the investigation follows a predefined sequence.

For many problems, this may be entirely sufficient.

But there is a limitation.

The software is still responsible for deciding what information AI receives.

Consider our unfamiliar manufacturer, C. Finch Industrial.

A general internet search might return an unrelated consulting business, a retailer, or information about an individual named Finch.

The software has successfully performed the search, but the results may have little relevance to the problem.

The AI model can interpret the information it receives. However, if the investigation has omitted the most useful sources, the model may have insufficient evidence to reach a reliable conclusion.

We could keep improving the software by adding additional searches and conditional rules.

But as the number of exceptions grows, those rules can become increasingly complicated.

This leads us to the second approach.

Approach B: AI decides how to investigate

Instead of programming every search in advance, we give an AI agent responsibility for planning and conducting the investigation.

Our conventional software still performs the initial matching.

But when it encounters an unresolved case, it passes the relevant information to the agent.

The agent receives something like:

Investigation request

  • Incoming manufacturer: C. Finch Industrial
  • Product: CF-S2 Sensor
  • Possible existing match: COPPER FINCH
  • Problem: Manufacturer identity cannot be established reliably
  • Objective: Determine whether this is an existing manufacturer, an alias, or a genuinely new manufacturer

The agent now decides what information would help resolve the uncertainty.

It might first examine the product description.

The product code CF-S2 could provide a useful clue.

The agent might search for the product code rather than the company name.

If it discovers a manufacturer catalogue associating CF-S2 with Copper Finch, it can examine that evidence.

Perhaps the catalogue identifies C. Finch Industrial as a registered trading name.

Alternatively, it might discover that the product is manufactured by an entirely different company.

The agent can adapt its investigation according to what it finds.

It could also identify conflicting evidence and request human assistance rather than forcing a conclusion.

The important difference is that we are no longer programming every investigative step.

We are giving the agent an objective, a defined set of tools, and boundaries within which it can decide what to do.

That flexibility is the principal reason to consider an agent.

Comparing the two approaches

QuestionSoftware-controlled investigationAgent-led investigation
Who determines the search sequence?Conventional softwareAI agent
Who selects the next search?Predefined rulesAI, based on findings
Can the investigation adapt to unexpected evidence?Only within programmed rulesYes, within permitted tools and limits
Who interprets the evidence?AI modelAI model
Who approves the recommendation?HumanHuman
Who updates the master database?Conventional softwareConventional software

Which approach should we choose?

Neither approach is universally better.

Software-controlled investigations are appropriate when the steps are known, the sources are predictable, and the information can be obtained reliably through a fixed process.

Agent-led investigations become more attractive when the next action depends on interpreting previous findings.

For our project, I am leaning towards an agent for unresolved manufacturer identities.

The deterministic engine should resolve straightforward cases. There is little reason to pay for AI to perform work that conventional software can already handle reliably.

But when an unfamiliar name requires research across unpredictable sources, an agent may offer greater flexibility.

This remains a design hypothesis.

We will need to test whether that flexibility actually produces better results at an acceptable cost.

4. Designing the Investigation Workflow

Having decided where AI might add value, we need to define exactly how the system should operate.

The proposed workflow consists of four stages.

Stage 1: Deterministic matching

Every incoming manufacturer name first passes through the conventional matching engine.

The engine performs operations such as name normalisation, exact matching, approved-alias matching, and candidate identification.

Cases that satisfy established matching rules can be resolved automatically.

Cases that remain uncertain are passed to an exception-handling process.

This is an important design principle.

AI should not become the default solution for every problem simply because it is available.

Stage 2: AI-assisted investigation

The investigation agent receives the unresolved record and any relevant candidate matches.

It can access approved tools, such as a read-only search of the manufacturer master, permitted supplier information, or authorised external research sources.

The agent is responsible for examining the evidence and producing a recommendation.

It does not receive unrestricted access to the company's systems.

We would also define limits on the investigation, including the number of searches, maximum processing time, and conditions requiring escalation.

Most importantly, the agent must be allowed to conclude:

Insufficient evidence to determine the manufacturer.

An uncertain answer is preferable to a confident but incorrect recommendation.

Stage 3: Human review and approval

Imagine that the agent concludes C. Finch Industrial is an alternative name for COPPER FINCH.

It should return a structured recommendation containing the proposed standardised manufacturer, the supporting evidence, the reasoning behind the recommendation, and any remaining uncertainty.

A human reviewer examines the recommendation.

The reviewer may approve it, reject it, request further investigation, or correct the proposed mapping.

Human approval is particularly important when a decision creates or changes authoritative master data.

Stage 4: Deterministic write-back

Once the reviewer approves the recommendation, the conventional application takes over again.

It validates the approved change and performs the database update.

For example, it might add C. Finch Industrial as an approved alias of COPPER FINCH.

If the investigation instead established a genuinely new manufacturer, the application could create a new master record following the company's naming and approval rules.

The AI agent does not independently modify the manufacturer master.

This separation preserves control over authoritative data and provides a clear audit trail.

The complete architecture

The workflow can be summarised as follows:

  1. Incoming record — A facility submits its equipment information.
  2. Deterministic matching engine — The system applies established rules and approved mappings.
  3. Exception handling — Unresolved records are identified and prepared for investigation.
  4. AI investigation agent — The agent uses approved tools to gather and interpret evidence.
  5. Recommendation — The agent proposes a resolution or reports insufficient evidence.
  6. Human review — An authorised reviewer approves, rejects, or corrects the proposal.
  7. Deterministic write-back — Conventional software validates and records the approved decision.
  8. Future processing — The approved mapping becomes available to the deterministic engine.

The last step is especially important.

If C. Finch Industrial is approved as an alias of COPPER FINCH, the next time that name appears, the conventional software can recognise it.

There may be no need for AI to investigate it again.

Over time, the system can resolve more recurring cases deterministically as approved knowledge accumulates.

The governing principle is:

Deterministic software handles established rules. AI investigates uncertainty. Humans approve material decisions. Deterministic software records approved changes.

This gives each component a clear responsibility.

5. What Do We Actually Need to Build?

We now have an architectural concept. But how would someone translate that concept into a working application?

I would divide the implementation into several components.

The deterministic matching engine

This handles incoming records, standardised names, approved aliases, and matching rules.

It also determines when a record should be treated as unresolved.

The exception-management component

Rather than immediately invoking AI whenever something goes wrong, the application creates an exception record.

That record preserves the original information, potential matches, and reason for escalation.

It gives the investigation a clearly defined starting point.

Repeated unresolved names can also be grouped together so that the system does not investigate the same problem unnecessarily.

The AI investigation component

This contains the agent's instructions, available tools, and execution loop.

It receives the exception, conducts the permitted investigation, and returns a structured recommendation.

The instructions must specify what the agent is trying to establish, what evidence is acceptable, when it should stop, and when it must seek human assistance.

The human approval interface

A reviewer needs to see the original record, proposed resolution, evidence, and explanation.

The interface should allow approval, rejection, or correction.

The master-data update component

This conventional software component checks the approved recommendation against database constraints and business rules before applying the change.

Each action should be recorded for audit purposes.

We also need monitoring and testing across the workflow.

For example, we should measure how often the matching engine resolves cases without AI, how frequently agent recommendations are approved, how often investigations remain inconclusive, and the cost of processing each exception.

These measurements will help determine whether introducing AI actually improves the process.

Do we need an MCP server or a skill?

Not necessarily.

For an initial implementation, the agent might need only a few ordinary function tools:

  • Search approved manufacturers.
  • Retrieve candidate manufacturer records.
  • Search approved external sources.
  • Return a structured investigation result.

These tools can be integrated directly into the application.

MCP becomes useful when a standardised connection is desirable, particularly if the same tools will serve multiple AI applications.

Similarly, we can begin with instructions embedded in the investigation component.

A skill becomes worth considering when we establish a reusable investigation procedure that benefits from being maintained separately.

We should introduce additional architecture only when it serves a clear purpose.

An important operational consideration

The availability of an AI model through a company's ChatGPT or other AI subscription does not, by itself, establish that a custom application is authorised or technically configured to use that model through an API.

Before implementation, the project must confirm appropriate API access, authentication, data-handling policies, permitted tools, and organisational approval.

These are application-design requirements, not details to resolve after deployment.

6. Designing for Different AI Models

There is one more architectural decision worth making before development begins.

What happens if the organisation changes AI providers?

For example, imagine that we initially build our investigation agent using an OpenAI model.

Later, the client decides to adopt an Anthropic model.

Would we need to rebuild the entire application?

Ideally, no.

The key is to separate the business logic from the AI-provider-specific implementation.

Introducing an AI provider adapter

Instead of allowing our application to communicate directly with a particular provider throughout the codebase, we introduce a defined interface.

The application sends an investigation request through that interface.

The provider-specific implementation handles communication with the selected AI service.

It also translates provider-specific tool calls and responses into formats our application understands.

Conceptually, the architecture separates three layers:

Business application → AI investigation service → AI provider adapter → Selected model

The application should not need to know which provider is performing the investigation.

It only needs to know what information to submit and what kind of result it expects in return.

The investigation service manages the task and its boundaries. The provider adapter handles differences in how individual AI services are accessed.

What can remain unchanged?

ComponentExpected impact of changing AI provider
Deterministic matching engineShould remain unchanged
Manufacturer and category master dataRemain unchanged
Approved business rulesRemain unchanged
Human approval workflowShould remain unchanged
Deterministic database updatesShould remain unchanged
AI investigation instructionsReusable, but may need adjustment
Independently implemented tools and MCP serversOften reusable; integration may change
Agent execution frameworkDepends on whether it is provider-specific
AI provider adapterReplace or modify
Output validation and evaluationMust be tested again

The provider adapter reduces dependency on a particular model, but it does not guarantee effortless portability.

Different providers can have different API conventions, tool-calling behaviour, supported features, and model capabilities.

Even when two systems support the same general concepts, their implementations may not be identical.

The agent's investigation instructions may also need adjustment to achieve comparable performance.

Most importantly, a new model must be evaluated against representative business cases before it is approved for production.

A different model may reach different conclusions even when given the same evidence.

That is why the business rules, evidence requirements, output structure, and approval process should remain under the application's control.

What about skills and MCP?

MCP may help preserve integrations when changing AI systems because it defines a common protocol for exposing tools and information.

Similarly, skills written using a supported open format may allow some investigation procedures to be reused.

However, neither guarantees that every component will work unchanged with another provider.

Compatibility still depends on the particular application's support and implementation.

Our objective is not to eliminate all future migration work. It is to prevent the AI provider from becoming unnecessarily embedded in the business system.

7. Preparing for a More Complex Problem: Product Categories

So far, we have concentrated on identifying manufacturers.

But our fictional equipment company has a second problem.

It must also classify products into standardised categories.

Consider two products manufactured by Copper Finch.

ProductFacility's CategoryHead Office Category
CF-40 Drive BeltMechanical SparesPower Transmission
CF-S2 SensorElectrical PartsSensors & Controls

Both products belong to the same manufacturer.

But they belong to different product categories.

Knowing that the manufacturer is COPPER FINCH does not automatically determine how a product should be classified.

Different facilities may also use different category definitions.

One facility might classify a sensor as an electrical component. Another might group the same type of product under maintenance supplies.

Head office may use an entirely different classification structure.

This introduces a second dimension of investigation.

Identifying a manufacturer is primarily a question of determining identity.

Classifying a product may require examining its purpose, technical specifications, and the company's classification rules.

The relationship between manufacturer and category is not necessarily one-to-one.

A manufacturer can produce several types of equipment, and each product may require a different category assignment.

We therefore need to keep the manufacturer master and category master separate.

We also need to consider that an approved mapping may have different scopes.

An approved alternative spelling of a manufacturer can generally be reused wherever that same manufacturer appears.

But an approved category mapping might apply only to a particular product, product family, or combination of attributes.

This distinction matters when deciding what information should be stored for future deterministic reuse.

The larger principle remains the same.

We should resolve what we can through established rules, investigate genuine uncertainty using AI where appropriate, and retain human responsibility for approving changes.

However, category mapping may require more sophisticated evidence and rules than the manufacturer-identification problem explored here.

That is a natural next stage for the project.

8. What We Need to Establish During the Build

The proposed architecture gives us a starting point, but several practical questions remain unanswered.

How far can deterministic matching take us?

We need to test normalisation, aliases, and matching algorithms against realistic data before deciding which cases genuinely require AI.

How reliable is agent-led investigation?

An agent might identify relationships that conventional matching misses. But it may also be misled by incomplete evidence, unrelated search results, or incorrect information published online.

We need representative test cases to evaluate its recommendations.

How much autonomy should the agent have?

We can control which tools it may use, how many investigative steps it may take, and when it must stop.

The appropriate limits will become clearer through testing.

Do we eventually need a skill?

We may discover that certain types of exceptions follow recurring investigative patterns.

If so, documenting those patterns in a reusable skill may improve consistency and maintainability.

But we should not assume a skill is necessary before we understand the actual work.

How do we determine whether the design is successful?

A successful implementation should do more than produce plausible AI recommendations.

It should reduce repetitive manual investigation while maintaining acceptable accuracy, control, processing time, and cost.

We also need to understand how often humans correct or reject AI recommendations.

Those observations will influence the architecture as the project develops.

Conclusion: Extending What Conventional Software Can Do

The central idea behind this project is relatively simple.

We do not need to abandon conventional software to benefit from AI.

Instead, we can preserve the strengths of deterministic systems and introduce AI where interpretation and investigation are required.

Traditional software is effective when the rules are clear and the desired outcomes can be defined.

AI becomes useful when the application encounters uncertainty that cannot be resolved reliably through those rules alone.

An agent adds another capability: it can decide how to investigate an unfamiliar problem within the tools and boundaries we provide.

But the presence of AI does not eliminate the need for human judgement.

In our proposed design, the agent investigates and recommends. The human approves. The conventional application validates and records the decision.

Once an exception has been resolved and an approved mapping stored, the system can apply that knowledge deterministically the next time it encounters the same situation.

This is what makes the architecture interesting.

AI doesn't simply process the exceptions. It can help turn resolved exceptions into reusable business knowledge.

Over time, that may reduce the number of cases requiring investigation.

There is also a broader opportunity here for people who understand business processes but have never written software.

AI-assisted development makes it increasingly practical to design and build applications around problems that previously required substantial programming expertise.

Understanding the division of responsibilities between software, AI models, agents, tools, and people becomes an important part of that process.

This project is an attempt to put those ideas into practice.

The architecture described here is our starting hypothesis. The actual build will tell us which decisions work, which assumptions need revision, and where additional complexity is justified.

What comes next?

As implementation progresses, I may publish further instalments documenting what actually happens when we build and test the system.

Potential topics include the performance of deterministic matching, the effectiveness of agent-led investigations, category classification, whether reusable skills prove useful, and the practical challenges of integrating AI into a controlled business workflow.

If the implementation produces reusable components, a later instalment may also include example code or a reference architecture that readers can adapt to their own projects.

For now, the objective is to establish a sound foundation.

Start with deterministic software. Introduce AI where interpretation adds value. Keep humans responsible for approval. And design the system so that its business logic remains independent of the AI model it uses.