AI Use Cases & Applications

Data Analytics With Generative AI: Text-to-SQL and LLM Risks

At the 2024 AI Connect K-12 Data Science Conference, T-Mobile's Ugandhar Dasi explained how generative AI can change data analytics. He showed a natural-language query prototype and listed challenges including hallucination, security, ethics and return on investment.

By The AI Enterprise Magazine Team3 min read

Key takeaways

  • Many companies leave data unused. Dasi cited research saying up to 70% of data goes unanalyzed.
  • Ask in English. A prototype turned a plain-English sales question into a database query and showed its trace.
  • Start with a pilot. Small proofs of concept test relevance and value before full projects.
  • Six challenges. Data quality, hallucination, token limits, ethics, security and ROI.
  • Right-size the model. Use smaller or domain-specific models and evaluate outputs.
Data Analytics with Gen AI. Watch on YouTube

At the 2024 AI Connect K-12 Data Science Conference, a virtual event held July 25, 2024, Ugandhar Dasi, Principal Technology Lead at T-Mobile US, explained how generative AI is changing data analytics, from the basic steps of an analytics project to the risks teams face when they add large language models (LLMs). The audience included students, so he started with the fundamentals.

Dasi said he leads data and AI projects at T-Mobile, including data analytics with generative AI. He holds master's degrees in data science and biotechnology and sits on an advisory board for a data company.

What is the data analytics problem generative AI could help solve?

Dasi defined data analytics as examining raw data to find patterns and draw conclusions, much like a detective looking for clues. Teams collect data from systems, surveys or sensors, clean it, analyze it and then communicate the results so business users can decide.

He cited several outside figures, all unverified in the session. The World Economic Forum predicted in 2019 that the world would create 463 exabytes of data a day by 2025. He attributed to Forrester the finding that companies fail to analyze up to 70% of their data, and to IDC an estimate that missed opportunities cost the economy about $3 trillion a year. Dashboards, he added, remain the main way users monitor data, much as when he started 20 years ago.

How would a team apply an LLM to analytics?

Dasi walked through a standard workflow. Define the business objective precisely, such as predicting customer churn. Collect and prepare data, which he said consumes about 80% of a data scientist's time. Choose a model from the many open-source and commercial options, then fine-tune it on company data, which requires cloud computing power. Evaluate for bias and hallucination, deploy, and monitor.

In practice, he said, teams rarely follow the full process at first. They start with a small proof of concept to see whether the output is relevant.

What does natural-language data analysis look like?

Dasi showed snapshots of a prototype with a table of bakery sales: date, store city, goods and amount sold. Normally a manager's question such as sales per month would require an analyst to write a SQL query.

In the prototype, a user typed the question in English, "what are the total sales breakdown by month in 2023," and the LLM, connected to the database with authentication already set up, generated the query and returned monthly sales. The interface also showed a trace of the action, the input to the database and the output, so users could check whether the right query was written. Dasi noted he showed snapshots, not a live demo.

What challenges does generative AI bring to analytics?

Dasi listed six:

  • Data availability and quality, the same challenge as in regular analytics
  • Hallucination, when a model guesses instead of saying it does not know
  • Token limits, which prevent feeding a 200-page document into a model at once
  • Ethics, such as whether an LLM screening resumes biases against certain groups
  • Security, including how much proprietary and customer data is exposed to a model. He cautioned against connecting an open-source LLM's API directly to company data.
  • Return on investment, since he said most data science projects end up not delivering returns, which is why teams run pilots first

How can teams manage those risks?

Dasi recommended starting with high-quality data, choosing smaller or domain-specific models, and matching the technique to the need: pre-training, fine-tuning or retrieval-augmented generation. Prompts can also set boundaries, and teams should evaluate outputs. "You don't need a big hammer for a small thing," he said.

His advice to students: be curious, build strong foundations by learning SQL and Python, and take risks.

More from AI Connect

AI Connect has 24 free live webinars on its 2027 schedule in four series: AI × Enterprise Panel Series, AI Demo Days, Agentic AI Showcases and Plug & Play Series. Registration for 2027 events is coming soon; see /webinars/.

Frequently asked questions

How can generative AI help data analytics?

Dasi showed an LLM connected to a database that turned a plain-English question about monthly sales into a query and returned results, with a trace of its actions.

What are the challenges of using LLMs for analytics?

He listed data availability, hallucination, token limits, ethics and bias, security of company data, and return on investment.

How should companies start with generative AI?

Dasi recommended small proofs of concept on limited data to check relevance and value before scaling.

This article is based on remarks by Ugandhar Dasi, Principal Technology Lead, T-Mobile US at AI Connect K-12 Data Science Conference 2024 on July 25, 2024. More coverage: More AI Connect Events.

Filed under: AI Use Cases & Applications, AI Governance & Trust, AI Strategy & ROI

More from AI Enterprise Magazine

Read the magazine