Skip to content

Where AI belongs in business software — and where deterministic code should win

Use AI for ambiguity and language. Use ordinary code for anything that must be exact.

Written by Tarun Mookhey · CTO / Principal Engineer ·

AI is useful when it makes a workflow faster, a search better, a decision clearer or a product easier to use. It is not a reason to replace reliable, deterministic software with uncertainty. The practical question for any feature is not “can AI do this?” but “should the answer be exact, or is a useful approximation acceptable?”

Keep deterministic code for what must be exact

Use ordinary code where correctness is binary or auditable:

  • calculations and totals;
  • permissions and access control;
  • money movement;
  • hard business rules;
  • compliance logic where exactness is required.

These have right and wrong answers, and the system needs to give the same answer every time. Probabilistic behaviour here is a defect, not a feature.

Consider AI where meaning is ambiguous

AI earns its place where the input is language or the output is a judgement call:

  • understanding free-text requests;
  • semantic ranking and search;
  • summarising long material;
  • classifying messages or documents;
  • recommending from many options;
  • drafting text for a person to review.

Put a human in the loop where it matters

Assistance that a user can review is far safer than automation that acts unseen. Draft, suggest and rank; let a person approve anything with consequences. Design the review step as part of the feature rather than an afterthought, and decide in advance how you will check the output is good enough.

Search is often the practical starting point

Many business problems that sound like “we need AI” are really search problems. Combining conventional text matching with semantic (vector) search can help people find the right record quickly while the underlying data and rules remain deterministic. TickMessage, for example, uses trigram, full-text and vector search in PostgreSQL to find the right contact quickly — a search improvement, with the messaging logic itself remaining ordinary, testable code.

A decision test

For each workflow, ask:

  1. Is there a single correct answer? If yes, use deterministic code.
  2. Is the input ambiguous or linguistic? If yes, AI may help.
  3. Can a person review the result before it matters? If not, be cautious.
  4. How will we know it is working? If there is no answer, there is no feature yet.

Related: AI integration · Custom software development · Technical consulting

Have software that needs building, connecting or untangling?

Describe the problem as it exists today. A finished specification is not required.

You will speak directly with the senior engineer responsible for assessing the work.

Discuss a project