Skip to content

Transform patient demographic queries into SQL effortlessly with our Text-to-SQL Chatbot. Leverage RAG and LangChain for accurate, user-friendly interactions. πŸš€πŸ’»

Notifications You must be signed in to change notification settings

Isco81/Patient-Demographic-Text-To-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 

Repository files navigation

Patient Demographic Text to SQL Chat-Bot with RAG Technology

Patient Demographic Text to SQL

Download Releases

Table of Contents

Overview

This repository hosts a Chat-Bot designed to convert patient demographic inquiries into SQL queries. The bot utilizes Retrieval-Augmented Generation (RAG) technology and the Langchain framework. This approach allows for efficient handling of user requests while ensuring accurate SQL query generation based on natural language input.

The project aims to simplify data retrieval for healthcare professionals, enabling them to access patient demographic information quickly and effectively. By leveraging advanced technologies, this Chat-Bot provides a seamless experience for users.

Technologies Used

  • FAISS: A library for efficient similarity search and clustering of dense vectors.
  • Langchain: A framework for building applications with LLMs (Large Language Models).
  • Melvius: A tool for enhancing conversational capabilities.
  • RAG (Retrieval-Augmented Generation): A method that combines retrieval of information with generative models.
  • Vertex AI: Google Cloud's AI platform for building and deploying machine learning models.
  • Vector Database: A database designed to store and query high-dimensional vectors.

Features

  • Natural Language Processing: Users can ask questions in plain English, and the bot will interpret and respond accordingly.
  • SQL Query Generation: Automatically converts user inquiries into SQL queries, streamlining data retrieval.
  • Scalability: Built to handle a large volume of queries efficiently.
  • User-Friendly Interface: Easy to interact with, making it suitable for users with varying technical skills.
  • Customizable: Developers can adapt the Chat-Bot for specific use cases or data sources.

Installation

To set up the project on your local machine, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/Isco81/Patient-Demographic-Text-To-SQL.git
    cd Patient-Demographic-Text-To-SQL
  2. Install Dependencies: Use pip to install the required packages.

    pip install -r requirements.txt
  3. Set Up Environment Variables: Create a .env file in the root directory and add the necessary API keys and configuration settings.

  4. Download Releases: You can find the latest releases here. Download the necessary files and execute them to start the application.

Usage

After setting up the project, you can start the Chat-Bot by running:

python main.py

Interacting with the Chat-Bot

  1. Open a Terminal: Use your command line interface.
  2. Input Queries: Type your question about patient demographics.
  3. Receive SQL Output: The bot will respond with the generated SQL query.

Example Queries

  • "Show me all patients from New York."
  • "How many patients are over 65 years old?"
  • "List all patients who have diabetes."

Output

The bot will generate SQL queries like:

SELECT * FROM patients WHERE city = 'New York';

Contributing

We welcome contributions to improve the Chat-Bot. If you have ideas or suggestions, please follow these steps:

  1. Fork the Repository: Click the "Fork" button at the top right corner of the page.
  2. Create a Branch:
    git checkout -b feature/YourFeature
  3. Make Your Changes: Implement your feature or fix.
  4. Commit Your Changes:
    git commit -m "Add your message here"
  5. Push to Your Branch:
    git push origin feature/YourFeature
  6. Create a Pull Request: Submit your changes for review.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any inquiries or feedback, please reach out to:

Feel free to visit the Releases section for updates and new features.

Chat-Bot Interface

Acknowledgments

We acknowledge the contributions of the open-source community and the tools that made this project possible. Special thanks to the developers of FAISS, Langchain, and the RAG framework.

Additional Resources

This project showcases the potential of combining advanced technologies to create practical solutions in healthcare data management.

About

Transform patient demographic queries into SQL effortlessly with our Text-to-SQL Chatbot. Leverage RAG and LangChain for accurate, user-friendly interactions. πŸš€πŸ’»

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •