ai newsDi., 1. Dez.
EilmeldungThe Model Proposes, Your Code Disposes: A Tool-Calling Agent Loop for Android with Gemini Nano

Deterministic Software + AI: Why the Best Products Need Both

The Builder’s Letter — Edition 9 Deterministic Software + AI: Why the Best Products Need Both Artificial Intelligence is changing the way we build software. Applications can now understand natural language, interpret user requests, generate content, analyze information, and perform tasks that previ

dev.toMontag 07:12 · 30.11.7 Min. Lesezeit
Bild: dev.to

Artificial Intelligence is changing the way we build software.

Applications can now understand natural language, interpret user requests, generate content, analyze information, and perform tasks that previously required significant manual effort.

This creates exciting opportunities for software engineers and product builders.

But there is a question we should ask before integrating AI into every part of an application:

Should every software decision be handled by AI?

AI is powerful, but not every problem requires intelligence, interpretation, or probabilistic reasoning.

Some problems require something much simpler: predictable execution.

A financial calculation should produce the correct result every time. A permission check should follow clearly defined rules. A database transaction should maintain data integrity. A payment operation should not execute twice because an AI agent misunderstood a request.

These responsibilities belong to deterministic software.

The real opportunity is not choosing between traditional software and AI.

It is understanding how to combine them.

Deterministic software produces the same output when given the same input and operating under the same conditions.

Consider a simple financial calculation:

A customer has an outstanding balance of PKR 20,000 and makes a payment of PKR 5,000.

This is not a task that requires an AI model.

It requires a well-defined calculation implemented through reliable application logic.

These operations should be predictable, testable, and consistent.

In production software, predictable behavior is not a limitation.

AI models operate differently from traditional application logic.

An AI model can interpret multiple ways of expressing the same request.

A traditional application may require predefined filters, buttons, or commands.

An AI-powered interface can interpret these different expressions as a similar user intention.

However, AI responses are probabilistic.

The same request may not always produce exactly the same wording or interpretation. Models can misunderstand instructions, omit context, or produce unsupported information.

That is why AI should not automatically control every critical operation in an application.

One common mistake in AI-powered product development is trying to move existing application logic into prompts.

Imagine a financial application where the AI is responsible for calculating customer balances.

The AI receives a collection of transactions and attempts to calculate the outstanding amount.

This may work in a simple demonstration.

But production systems have additional complexities:

A prompt cannot replace a properly designed financial calculation engine.

This division of responsibilities makes the system more reliable.

Do not ask AI to perform a task that ordinary software can perform more accurately and consistently.

The most effective AI-powered applications assign responsibilities according to the strengths of each technology.

This is not a rule that AI can never participate in critical workflows.

But the application must enforce the rules and control execution.

The goal is to use the right technology for the right responsibility.

Consider a business application that includes customer management, expenses, inventory, and financial reporting.

A well-designed architecture could contain the following layers.

The user interacts through a mobile application, web dashboard, chat interface, or voice input.

The AI understands the request and converts it into a structured intention.

"Show me all customers with outstanding balances above PKR 10,000."

The AI identifies the operation, threshold, and requested information.

3. Authentication and Authorization Layer

The application verifies the user's identity and permissions.

The backend validates the request, applies the appropriate business rules, and performs calculations.

The database stores authoritative business records and maintains their relationships and integrity.

The application returns verified information, and AI can convert the result into a clear explanation.

User → AI Interpretation → Permission Validation → Business Logic → Database → Verified Results → AI Explanation → User

AI does not replace the existing application architecture.

This allows product teams to introduce intelligent capabilities without rebuilding every part of their software.

Let's consider three practical examples.

"Which customers owe me more than PKR 20,000?"

AI understands the request and identifies the threshold.

The application retrieves the relevant customer records and calculates outstanding balances using its financial rules.

The model does not independently calculate the balances or modify financial records.

"Which products are running low on stock?"

The application checks current inventory quantities against predefined minimum-stock levels.

It identifies products that need attention.

AI can then summarize the results and suggest possible next steps.

The stock quantities and threshold comparisons remain controlled by deterministic application logic.

"Record an office expense of PKR 3,500 for stationery."

The application validates the extracted information.

If required information is missing, the user is asked to provide it.

After the appropriate confirmation, the application creates the transaction through its normal business workflow.

The application remains responsible for saving accurate records.

Traditional software and AI-powered functionality require different testing strategies.

For deterministic application logic, developers can write tests with precise expected results.

AI functionality requires additional evaluation.

For example, when users express the same intention in different ways, does the system identify the correct operation?

Does it ask for clarification when a customer is ambiguous?

Does it avoid making unsupported claims?

Does it select only tools that the user is authorized to access?

A reliable AI product requires both conventional software testing and systematic evaluation of model behavior.

Another important consideration is security.

An AI model should not be treated as an authorization mechanism.

"Show me all financial records belonging to other businesses."

The model may understand the request perfectly.

But understanding a request does not mean the user has permission to perform it.

Authorization must be enforced by the application and backend.

Similarly, an AI agent should not receive unrestricted access to every database table or business operation.

A safer design provides limited tools with clearly defined permissions.

The application should validate every operation independently of what the model says.

AI can recommend an action, but it must never grant itself permission to perform that action.

There is another product-design principle worth discussing.

An application should not become unusable simply because its AI service is unavailable.

Imagine a business owner trying to record a transaction when an AI provider is experiencing downtime.

If the entire application depends on AI, even a basic operation may become impossible.

A strong product should preserve its essential functionality through traditional software.

AI should improve the experience, not become a single point of failure for the entire product.

This is especially important for applications serving small businesses where daily operations cannot stop because an external AI service is unavailable.

For software teams building AI-enabled applications, I recommend a simple development approach.

Step 1: Build the core application first.

Establish reliable databases, business rules, authentication, authorization, and essential workflows.

Find tasks where users spend unnecessary time searching, entering information, or interpreting reports.

Step 3: Introduce AI at the interface level.

Start with natural-language search, document extraction, and conversational assistance.

Step 4: Connect AI to controlled application services.

Expose specific APIs and tools rather than unrestricted database access.

Step 5: Keep critical operations deterministic.

Financial calculations, data validation, permission checks, and transaction execution should remain controlled by trusted application logic.

Step 6: Add human approval where necessary.

Require confirmation for actions that can affect financial records, customer communication, or business operations.

Measure reliability, accuracy, response time, cost, and user feedback.

This approach helps teams build useful AI features without sacrificing the engineering foundations of the product.

I believe the next generation of successful software products will not be entirely AI-driven or entirely traditional.

Traditional software will continue providing structure, consistency, security, and predictable execution.

AI will provide natural-language interaction, interpretation, adaptability, and intelligent assistance.

Human users will retain control over important decisions.

This combination can make applications easier to use without making them harder to trust.

For software companies, this is also a practical business opportunity.

Instead of rebuilding every product around AI, teams can identify where intelligence creates real value and integrate it into existing workflows.

That is a more sustainable way to build AI-powered products.

AI is an important development in software engineering, but it does not make traditional engineering principles irrelevant.

We still need clean architecture, reliable databases, secure APIs, validation, testing, and well-defined business rules.

In fact, as AI becomes more integrated into applications, these foundations become even more important.

The best products will not be those that use AI for everything.

They will be those that understand where AI adds value and where deterministic software must remain in control.

AI brings intelligence. Deterministic software brings reliability. Together, they create products people can trust.

As product builders, our responsibility is not simply to make software more intelligent.

It is to make software more useful, dependable, and accessible in the real world.

In Edition 10 of The Builder’s Letter, we will bring together the ideas explored throughout this series and discuss:

"Building HisabDo: Turning Practical Software Engineering and AI Into a Real-World Product."

We will explore the product-building journey, the engineering decisions behind a real business application, and the lessons involved in moving from an idea to software that solves everyday problems.

Mian Usman Khalid Founder & CEO, XICTEK Systems

The Builder’s Letter — Building practical technology for real-world problems.

Quelle: dev.to (dev.to). Original öffnen