A collection of tools and examples for working with AI models and Language Learning Models (LLMs) focused on health-related applications.
This repository contains various examples and implementations of AI-powered applications with a focus on:
- Retrieval Augmented Generation (RAG) systems
- Medical question answering
- Women's health information processing
- Integration with various LLM providers (OpenAI, etc.)
- gen-qa-openai.ipynb: Retrieval Enhanced Generative Question Answering with OpenAI to resolve hallucinations in LLMs
- rag_pubmed.ipynb: Medical Question Answering system using LangChain and Mistral 7B with PubMed data
- test_langchain.py: Demonstrates LangChain integration with PubMed for medical information retrieval
- womens_health.py: Uses AIConfig to process women's health-related information
- script.py: Main script for running AI-based operations using various LLM providers
- health.aiconfig.yaml: Configuration for AI models focused on health-related prompts and contexts
- .env: Environment configuration for API keys from different LLM providers
- Python 3.8+
- API keys for LLM providers:
- OpenAI
- Google (optional)
- Hugging Face (optional)
- Clone this repository:
git clone https://github.com/yourusername/OLML.git
cd OLML- Create and activate a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate- Install the required dependencies:
pip install -r requirements.txt # Note: You may need to create this file- Configure your API keys:
- Rename
.env.exampleto.env(if available) - Add your API keys to the
.envfile
- Rename
Open the Jupyter notebooks in your preferred environment:
jupyter notebookThen navigate to either gen-qa-openai.ipynb or rag_pubmed.ipynb.
Run the test_langchain.py script:
python test_langchain.pyRun the women's health script:
python womens_health.py[Include license information here]
- This project uses various AI and ML libraries including LangChain, OpenAI, and others
- Medical data sources include PubMed and women's health resources