Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

Querying SQL Database Using LLMs — Is It a Good Idea?
Artificial Intelligence   Data Science   Latest   Machine Learning

Querying SQL Database Using LLMs — Is It a Good Idea?

Last Updated on January 3, 2025 by Editorial Team

Author(s): Sachin Khandewal

Originally published on Towards AI.

Exploring advanced prompting tools to query SQL databases in natural language using LLMs and also highlighting the limitations of these techniques.

This member-only story is on us. Upgrade to access all of Medium.

Image from Author’s phone gallery

TLDR;

In this blog I will explore different ways to query SQL Databases using Large Language Models; I will use Groq to access the LLMs.I will leverage LLM Agents to build a SQL Agent using an advanced framework — DSPy.While working through the problem, I will also highlight the limitations that are currently faced in this area.

These last 2 years have been absolutely WILD in terms of the advancements in the Language Models space, these advancements have enabled us to pursue some fantastic solutions like Retrieval Augmented Generation and now Agentic solutions as well. But one thing that always remains constant:

Context is King

Without proper context, any LLM cannot solve a domain-specific task, so the problem of building these advanced LLM apps boils down to how good you are at providing context for a particular query.

Nearly all the customer-facing companies are now in a demand to build helpful agents on top of their existing data, or they are in the process of realizing that they need an interactive system on top of their old data. This data can be huge and stored in PostgreSQL, Oracle, MongoDB etc…. Read the full blog for free on Medium.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI

Feedback ↓