Categorygithub.com/gentcod/nlp-to-sql
modulepackage
0.0.0-20241226012124-11c37684d0f4
Repository: https://github.com/gentcod/nlp-to-sql.git
Documentation: pkg.go.dev

# 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.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author