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.
- 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.
- 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.
To set up the project on your local machine, follow these steps:
-
Clone the Repository:
git clone https://github.com/Isco81/Patient-Demographic-Text-To-SQL.git cd Patient-Demographic-Text-To-SQL
-
Install Dependencies: Use pip to install the required packages.
pip install -r requirements.txt
-
Set Up Environment Variables: Create a
.env
file in the root directory and add the necessary API keys and configuration settings. -
Download Releases: You can find the latest releases here. Download the necessary files and execute them to start the application.
After setting up the project, you can start the Chat-Bot by running:
python main.py
- Open a Terminal: Use your command line interface.
- Input Queries: Type your question about patient demographics.
- Receive SQL Output: The bot will respond with the generated SQL query.
- "Show me all patients from New York."
- "How many patients are over 65 years old?"
- "List all patients who have diabetes."
The bot will generate SQL queries like:
SELECT * FROM patients WHERE city = 'New York';
We welcome contributions to improve the Chat-Bot. If you have ideas or suggestions, please follow these steps:
- Fork the Repository: Click the "Fork" button at the top right corner of the page.
- Create a Branch:
git checkout -b feature/YourFeature
- Make Your Changes: Implement your feature or fix.
- Commit Your Changes:
git commit -m "Add your message here"
- Push to Your Branch:
git push origin feature/YourFeature
- Create a Pull Request: Submit your changes for review.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or feedback, please reach out to:
- Name: Your Name
- Email: your.email@example.com
- GitHub: Your GitHub Profile
Feel free to visit the Releases section for updates and new features.
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.
This project showcases the potential of combining advanced technologies to create practical solutions in healthcare data management.