Share

How to use GPT as a natural language to SQL query engine

Thanks to the technology behind ChatGPT, it’s become surprisingly simple to query a data set in plain English.

As with most generative AI, results from OpenAI’s API are still imperfect, which means you can’t just trust them. Fortunately, you can now write code to ask GPT how it would calculate a response—and then you can run the code yourself if you agree with the approach. This means you’ll be able to ask natural language questions like, “What were total sales by region last year?” and be confident in accuracy of the response.

Here’s a quick-and-dirty technique for setting up a natural language query of your own database with GPT:

To read this article in full, please click here

Author: . [Source Link (*), InfoWorld]

Shop with us!

You may also like...

Leave a Reply