Databases & AI - Running SQL Commands directly from Chat GPT

Databases & AI - Running SQL Commands directly from Chat GPT

TLDR:

A new Chrome Extension allows running SQL commands or your DB directly from chatGPT, so you won't need to paste it manually.

The Extension:

ChatGPT can generate SQL commands from instructions (prompts) in simple English. But ChatGPT only shows the code, it doesn't run it. A new chrome extension called gpt2pg lets you run the SQL directly from the ChatGPT UI.

The configuration of the extension is pretty straightforward - just enter the connection string to the Postgres DB

Limitations:

  • Neontech wrote the extension, so only Postgres is supported.

  • It only sends the SQL commands but doesn't show a result set.

  • It doesn't show errors. ChatGPT is notorious for hallucinating SQL commands, so errors are quite common.

Final words

The next logical step is a ChatGPT plugin for SQL. The ChatGPT plugin is a powerful tool that can enhance the functionality of various applications by providing an intelligent conversational interface. With the plugin, users can interact with applications through natural language conversations, making it easier and more intuitive to use. The plugin is based on the GPT architecture, which is a state-of-the-art natural language processing model developed by OpenAI. This means that the plugin is capable of understanding and responding to a wide variety of user inputs, making it a highly versatile and useful tool for any application that requires user interaction.