Council Post: How To Apply Probabilistic LLMs To Deterministic Questions

Francois Lopitaux, SVP Product Management at ThoughtSpot, leads strategy & execution for AI analytics products for intelligent experiences.

getty

Today, the greatest barrier to the ubiquitous adoption of AI is trust. Unlike enterprise technologies of the past, AI is already in the hands of consumers at scale. The average person has expectations and reservations about AI based on personal experience, what they read online and what they see on the news. When AI goes wrong, people hear about it. ​

Perhaps the most prominent of these issues that have breached the public domain is hallucinations. Hallucinations are the pinnacle of untrustworthy behavior, a semi-sentient machine that provides incorrect or inconsistent answers when it’s short on context. The consequences can range from embarrassing to downright dangerous. It’s an issue that, rightfully, sows distrust among would-be users. ​

From a business intelligence (BI) perspective, this issue goes beyond the average understanding and is split into two aspects. The first is true hallucinations, and what most people think of when they hear the term—the model goes sideways and starts to invent answers. ​

The second and more nuanced aspect is a model that provides multiple answers to the same question. These answers may all be technically correct, but with slight variations from one to the next. ​

Take, for example, a LinkedIn post. If I use their embedded AI tool to create five drafts of a LinkedIn post based on the content of an article I’m sharing, it’s perfectly fine when each draft presents the information in slightly different ways. In this scenario, I may actually want those five drafts to be different so that I can choose which I like best.​

That’s not a hallucination, per se. But in BI environments, inconsistency can become just as problematic as hallucination. Even when outputs are individually plausible, variation between runs can erode trust because analytics depends on repeatability.

BI requires deterministic analytics—what are your sales numbers for the quarter? How many opportunities have you closed this month? How is your revenue broken down by region? Those answers need to be the same each and every time to be trustworthy and actionable. But large language models (LLMs) are inherently probabilistic. So how do we bridge the gap?​

How do you make analytics a deterministic practice? ​

In order to make analytics deterministic, there are multiple aspects to consider. The first is all about ensuring you’ve provided the right context using the right data. This, in turn, will allow for the system to be simultaneously more creative and grounded in reality. ​

The second and most critical aspect is about merging the capabilities of large language models with human knowledge and thought processes. Rather than using LLMs end-to-end, we merge the best of LLMs with a deterministic approach to translating the user’s wants and needs to provide an accurate, consistent answer. ​

When we attempt to achieve this using LLMs alone, hallucinations and inconsistencies come into play. In BI environments, even a small error rate can undermine trust. By pairing LLMs with deterministic query generation and governed data access, organizations can dramatically reduce hallucinations and create conditions for repeatable, auditable answers to the same question.​

Should businesses avoid text to SQL?

Businesses should be cautious about relying on unconstrained text-to-SQL approaches for deterministic use cases where consistency and auditability are required.​

For the uninitiated, text to SQL is relatively simple in concept: A user asks a question in natural language, and the LLM interprets that request and generates the SQL query used to retrieve the answer. In effect, the model determines how the data is queried. The user provides the intent, but the model decides how to translate that intent into database logic.​​

In other words, there’s an intermediary step during which the model translates on your behalf, with no insight or transparency into its thought process. You have limited control. Code is generating code, which may be interpreted in different ways and yield different answers to questions that can only have one. If those answers shift and change, users lose trust. Or worse, they trust bad information and make incorrect decisions. ​

Can hallucinations be avoided?

​The simple answer is yes, but success depends on how the underlying system is designed. One effective approach is combining deterministic logic with an LLM rather than relying on the model alone. In this architecture, the LLM helps interpret the user’s request, while deterministic rules govern how data is accessed and how answers are generated. The model is constrained to a defined set of validated, contextual data, reducing ambiguity and limiting opportunities for hallucination. Rather than generating answers independently, the system retrieves information from trusted data sources and returns results through controlled logic designed to maximize consistency and accuracy.​

You are in control of the context, which also means you can play a critical role in ensuring your AI solutions are trusted. And in today’s environment, there aren’t many more positions that are more important.​​


Forbes Technology Council is an invitation-only community for world-class CIOs, CTOs and technology executives. Do I qualify?