CTO, AtScale, empowering customers to democratize data, implement self-service BI & build more agile analytics for better decision making.
ChatGPT has changed the world, making generative AI the talk of the town.
We already know how useful generative AI can be for writing articles (not this one) and answering a broad range of questions using a chatbot. Leveraging generative AI to answer complex business questions, on the other hand, is much more difficult.
In this article, I will explore some of the ways that generative AI can be applied to business intelligence (BI) and discuss what’s needed to connect the dots between raw data and actionable business insights.
What is generative AI and natural language query?
Let’s begin by defining “generative AI” and “natural language query.”
• Generative AI, as defined by TechTarget, is “a type of artificial intelligence technology that can produce various types of content, including text, imagery, audio and synthetic data.” It produces this content in response to prompts submitted by users.
• Natural language query (NLQ) is a subset of natural language processing (NLP) that focuses on translating human language questions into database queries.
NLP and NLQ have been around for decades, allowing users to ask data questions using natural language (voice or text), such as: “What were my sales for last quarter in the east region?”
Historically, NLP-backed natural language query systems suffered from NLP’s limitations, where the slightest misinterpretation could result in either a useless response or incorrect results.
The success of ChatGPT, however, has renewed interest in applying NLQ to make business intelligence more accessible to more people. Generative AI’s large language models (LLMs) solve many of the accuracy problems associated with simple NLP algorithms, making NLQ a viable option for answering complex business questions.
Generative AI Needs Business Context
Translating the user’s voice or text into an understandable query is just the first step. To provide accurate, reliable and consistent results, generative AI needs business context. While it is excellent at translating human language into data, it cannot accurately translate business-specific terms into database queries without a conceptual understanding of an organization’s business.
In his Substack, data analyst Benn Stancil explains it best: “For bots to be successful query writers—and even harder, for them to be proper analysts that can answer questions about a business—LLMs will likely only be a small part of the solution. There will also have to be semantic models, methods for mapping vague requests onto those semantic models, frameworks for governing access control, ways to test if it said the same answer today as it said yesterday and more. ”
Augmenting Generative AI With Business Context
To make generative AI effectively support BI, there are three primary approaches.
Map business terms to raw data.
Technology vendors such as Thoughtspot have developed BI platforms dedicated to using natural language queries. Other BI technology vendors, like Tableau and Qlik, have incorporated natural language query prompts into their existing BI platforms.
These systems tend to require customers to define “synonyms” and sample questions to map business terms to raw data. This approach requires humans to map business concepts to their data and anticipate end users’ questions. While reliance on NLP can generate useless or even misleading results, NLP is mature, easily understood and simple to implement.
Build machine learning models with contextual data.
ChatGPT has inspired several vendors to apply a generative AI-powered chatbot to help analysts and data engineers create charts or write SQL queries. Examples include Microsoft Copilot for Power BI and Databricks LakehouseIQ. These assistants expose an NLQ prompt to automate the creation of a chart or dashboard or to write SQL.
These tools rely on machine learning (ML) models to work effectively and must be fed by extensive documentation and usage data to provide a business context. While they typically leverage LLMs to improve query understanding, an underpowered ML model or a model without enough contextual training data can result in ineffective or incorrect results. While training LLMs can be expensive and time-consuming, making it difficult to keep up with business changes, ML models can fully automate knowledge collection with minimal human intervention.
Leverage a semantic layer.
A new range of BI tools aims to make data discovery and analytics “conversational.” Tools from Zenlytic and Delphi use generative AI-powered chatbot interfaces that allow users to converse with their data by asking natural language questions in an interactive fashion. The tools rely on a semantic layer to provide business context to improve accuracy and eliminate the need for manual training.
A semantic layer provides the following advantages to generative AI-backed queries.
1. Business Context: A semantic layer defines business rules, terms, calculations and relationships definitively by mapping business definitions to raw data to generate a knowledge graph for the business.
2. Deterministic Responses: Generative AI is essentially non-deterministic: It may answer a question differently from prompt to prompt. However, a semantic layer ensures consistent responses for the same business questions (“net sales” will always be “net sales”) and protects against generative AI “hallucinations.” By combining deterministic models with a semantic layer, developers can enhance the transparency of LLMs, making them more trustworthy and accountable.
3. Explainability: A semantic layer provides visibility into data lineage, metric calculations and data transformations, all the way back to the raw data sources. It effectively “explains” the results to build users’ confidence in the system’s answers.
While a semantic layer requires a human (data steward) to map business concepts to physical data, an LLM powered by a semantic layer can deliver business context for more consistent and accurate results.
A Brave New World for AI And BI
The transformative impact of ChatGPT and generative AI introduces exciting new possibilities for improving business intelligence. While generative AI has proven its utility in a number of domains, leveraging it to answer complex business questions requires careful consideration and the incorporation of business context.
Forbes Technology Council is an invitation-only community for world-class CIOs, CTOs and technology executives. Do I qualify?
Read the full article here