NLP to SQL

NLP to SQL - Ask questions from Data - Interrogate data

Converting NLP to SQL effectively enable business agility as business can query data in effective manner.

NLP-SQL

Translate Natural language Question to SQL Query

Understand Natural language

  1. Derive entities - table, column, where condition,

  2. Derive values. - date range

  3. Generate a SQL Statement

One can use Translation model architecture

One can use set of classification models and rules

Ask questions (based on Google Paper)

NLP to SQL

  • Parse statement and convert into tokens

  • Get intent from overall statements

  • Based on intent determine which table and where condition user want to apply

  • Determine which columns user is trying to get

  • Get additional aggregation, group by clause that need to be applyed.