Text-to-SQL: Building Natural Language Interface for Analytics and BI Dashboards Using LLMs and RAG
scgupta |
8
Description:
Analytics dashboards can be overcrowded and intimidating, and not all analysts and business leaders are experts in SQL. This talk will walk you through how to create a Natural Language Interface for Analytics and BI dashboards using Large Language Models (LLMs) and Retrieval Augmented Generation (RAG).
There are 4 major steps:
- Create embeddings for table and column metadata along with table DDL statements and store in a Vector DB
- Translate natural language text to an SQL query by
- First retrieving relevant tables and columns from a Vector DB
- Then using the metadata for retrieved tables and columns to construct an LLM prompt for generating SQL.
- Execute this SQL and get the resulting data (rows and columns).
- Use LLM to summarize these results into an answer in natural language.
Takeaways:
- What is LLM, RAG, Embeddings, and VectorDBs
- How to build applications using LLMs and RAG
Prerequisites:
Basic knowledge of Python and SQL
Speaker Info:
Satish Chandra Gupta is a seasoned Data/ML Practitioner and Advisor/Consultant with over 25 years of industry experience. He was co-founder and Chief Data Officer at Slang Labs, where he helped create a Conversational AI platform for building multilingual, multimodal voice assistants in mobile and web apps. Before that, he was building real-time streaming data pipelines and ML applications at Ola processing a billion events a day. Prior to that, he worked at top-tier organizations such as Amazon, Microsoft Research, and IBM Software Lab.
His expertise lies in helping startups and small to medium-sized companies craft a data/ML strategy and build an economical low-maintenance data infrastructure, actionable data analytics, machine learning, and LLM applications. He shares his learnings in a popular newsletter Machine Learning for Developers (ML4Devs) with over 8,000 subscribers, and on LinkedIn with over 26,000 followers.
Before his foray into data and ML, he built compilers, profilers, IDEs, program analysis, and developer tools. He earned a BTech in Chemical Engineering from IIT Kanpur in 1996 and an MS in Computer Science from the University of Wisconsin - Milwaukee in 2001.
Speaker Links:
- Blog/Newsletter: ML4Devs - Machine Learning for Developers
- LinkedIn: scgupta
- I regularly speak in Meetups and Developer events in Bangalore. Here are links to selected previous talks:
- PyCon India 2019 Workshop: Building, testing, and profiling efficient micro-services using Tornado
- TFUG BLR, Feb 2020: Everything Speech! - Machine learning applications in Voice Technologies
- MLOps Community Podcast, Oct 2020: Data Engineering + ML + Software Engineering
- Google DevFest BLR 2022: Tradeoffs in building Big Data Pipeline on Google Cloud (Day 2, Track 1, Video)
- TFUG BLR, Oct 2022: BigQuery ML: Data Processing and Machine Learning at Cloud Scale
- TFUG BLR, Dec 2022: Vertex AI for Beginners
- TFUG BLR, Sep 2023: Keras Community Day: Emerging Architecture and Design Patterns for LLM Applications