4th Feburary, 2023
5 min read

Our Natural Language To SQL Secrets: Pioneering the Future of Data Interaction

At Morningside AI, one of our core focus points is pioneering a transformation in how businesses interact with data through our advancements in Natural Language to SQL (NL to SQL). This technology is more than a mere tool; it's a revolution in data accessibility. By enabling intuitive, natural language interactions with databases, we make data retrieval and understanding accessible to all, not just those with technical expertise in database query languages. This democratization of data is crucial for empowering decision-makers and streamlining business operations.

Shattering Benchmarks in Accuracy

Historically, achieving high accuracy in NL to SQL conversions, especially for expert-level queries, has been a significant challenge, with success rates typically around 50-60%. At Morningside, we've shattered these benchmarks, propelling our accuracy rates to an astounding 80-90%.

Mastering the Complexity of Queries

The journey to these heights has not been without its challenges. The complexity inherent in NL to SQL queries, often laden with intricate joins and nested queries, presents a formidable task. For those interested in the data, please refer to the following graph:

Revolutionizing with Query Decomposition

The industry's prevalent approach, Query Decomposition, is like solving a complex puzzle piece by piece. This method involves breaking down a complex query into more manageable sub-queries. This process includes several critical stages:

  1. Decomposing the Query: Simplifying the complex query into more manageable sub-queries.
  2. Retrieving Tables: Utilizing dense vector search to identify the correct interconnected tables.
  3. Generating Decomposed Queries: Tackling each sub-query individually before combining them into the main query.
  4. Error Handling: Learning from any failures in sub-queries to refine future approaches.

For a more in-depth understanding, we recommend exploring this academic paper on the topic.

Morningside's Groundbreaking Innovations

Our team at Morningside AI didn't stop at merely adopting existing methods; we've developed groundbreaking innovations to enhance NL to SQL performance and exceed SOTA performance. Here is a brief look into the adjustments we’ve made that have made this possible:

  • Hybrid Vector Search: Our hybrid approach merges dense vector search with keyword matching, significantly improving table and column retrieval efficiency.
  • Intelligent Filtering with GPT-4: By employing GPT-4 for query filtering, we eliminate irrelevant data, ensuring higher quality inputs and reducing confusion.
  • Advanced Decomposition Techniques: We have transcended traditional sub-query decomposition by implementing a recursive decomposition approach, which allows for continuous simplification of queries, leading to more effective results.

Inviting You to Join Our Journey

As we forge ahead in the NL to SQL domain, we extend an invitation for you to join us on this exhilarating journey. Together, let's explore and push the boundaries of what's possible in AI-driven data handling and translation. Stay connected for more breakthroughs as we continue to redefine the standards of AI technology in the industry.