nlp-to-sql

command module
v0.0.0-...-3fd17bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

README

nlp-to-sql

A backend application that enables conversational database interactions, leveraging Retrieval-Augmented Generation (RAG) to generate context-aware, tailored responses. It converts NLP to SQL queries. It takes a textual request and returns a textual response based on the queried data.

PROJECT OVERVIEW
Example Question/Request:
  • How many accounts have been opened till date?

Generated Query:
   SELECT COUNT(*) FROM accounts;
Example Respose:
  • We've got a total of 114 accounts opened so far.

SECURITY CONSIDERATIONS
  • Prompts are engineered to ensure that conversations can only lead to READ operations:

    • Conditions in place to ensure that queries generated by the AI model are only SELECT statements.
    • Programmatically, generated queries from the AI model are also checked to ensure that only SELECT statements are used to query the database.
    • Sensitive data are exempted from the query generated and subsequently from the response provided.
  • Database connection strings are not persisted or stored but please ensure that temporary connection strings are created before supplying them during usage. Good to note that they are only used programmatically for establishing database connection and further getting requested data.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL