DEV Community

Cover image for Introducing DataLang - Ask questions to your Database in Natural Language
Alexandro Martinez
Alexandro Martinez

Posted on

Introducing DataLang - Ask questions to your Database in Natural Language

DataLang is yet another AI (prompt engineering) tool that is set to change the way you interact with databases. I'm excited to introduce you to our platform that allows you to communicate with your database using natural language!

Try the live demo or watch the demo.

Why DataLang?

Working with databases can be a daunting task, especially for non-technical team members. Even for those adept at writing SQL queries, it can sometimes be a time-consuming process. What if there was a tool that could understand your natural language questions and convert them into SQL queries? That's where DataLang comes in.

What Can DataLang Do?

DataLang is designed to make database interaction intuitive and user-friendly. Here's how it works:

  1. You set up your data source connection string.
  2. DataLang fetches all the schema tables and columns from your data source.
  3. You ask a question in natural language, such as "How many users signed up this month?"
  4. DataLang sends your question to GPT (OpenAI).
  5. GPT processes your question and generates an SQL query.
  6. The SQL query executes in your database.
  7. A natural language response is returned.

Security Measures

Credential Encryption

I understand the importance of data security. That's why your data source credentials are encrypted before being stored in the DataLang database, and only decrypted before executing SQL. I use this method to encrypt/decrypt credentials.

Dangerous SQL Statements Prevention

My prompt engineering method uses 4 prompts:

  1. Understanding the end-user question
  2. Interpreting the DB schema + making sense of the question
  3. Crafting SQL statements (SELECT only)
  4. Final SQL safety check

In the 4 steps, the prompts make sure to throw an "Unsafe question" error if it identifies dangerous operations, such as INSERT, UPDATE, DELETE, ALTER, DROP...

API

Use your account API Keys to send questions in the following format:

Send a POST request to the Questions API

Pricing That Suits Your Needs

We offer different pricing plans to fit your needs and usage:

  • Hobby: 2,000 questions/month, 1 data source, and 1 user.
  • Growth: 5,000 questions/month, 3 data sources, 3 users and API access.
  • Enterprise: 10,000 questions/month, 10 data sources, 10 users, API access, and priority support.

You can also ask for a quote to have it in a custom server, have more questions per month, or have a custom feature developed, contact us!

Try DataLang today!

--

I built this MVP with my SaaS framework SaasRock, so I'll wait for user feedback before adding more features. I'm not doing the same mistake of over-engineering a product before actually having users 😅.

Subscribe to the newsletter for more!

Top comments (0)