Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josnin/llama-medical
Local RAG System for Medical Query Exploration (Ollama + LangChain)
https://github.com/josnin/llama-medical
Last synced: about 1 month ago
JSON representation
Local RAG System for Medical Query Exploration (Ollama + LangChain)
- Host: GitHub
- URL: https://github.com/josnin/llama-medical
- Owner: josnin
- License: mit
- Created: 2024-05-04T05:50:23.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-05T00:49:44.000Z (9 months ago)
- Last Synced: 2024-11-05T18:26:48.002Z (3 months ago)
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llama-medical
Local RAG System for Medical Query Exploration (Ollama + LangChain)
This repository explores the potential of a local Retrieval-Augmented Generation (RAG) system for answering medical queries. It uses Ollama for model interaction, ChromaDB as a local vector store, and LangChain specifically for handling data chunking, focusing on the nomic-embed-text embedding model and the Gemma:2b LLM.
## Getting Started:
[Download & Install Ollama](https://ollama.com/)
### Download Pretrained model
```bash
ollama pull nomic-embed-text
ollama pull gemma:2b
```
### Start Ollama Server
```bash
ollama serve
```### Install Python Dependencies
```bash
pip install -r requirements.txt
```### Setup ChromaDB
[Try ChromaDB](https://docs.trychroma.com/getting-started)
```bash
chroma run --host localhost --port 8000
```### Import and Vectorized Medical Reference
Run the retrieval script to import and vectorize medical reference data
```python
python retrieval.py
```### Start Querying
You're all set to start querying the medical reference data with Ollama. Try asking a medical query to get started!
```bash
(.venv) josnin@MacBook-Pro llama-medical % python generate.py "what are the causes of kidney stones?"
Sure, here are the causes of kidney stones based on the provided medical text references:* Diet, excess body weight, some medical conditions, and certain supplements and medications.
* Dehydration.
* Obesity.
* Digestive diseases and surgery.
* Renal tubular acidosis.
* Cystinuria.
* Hyperparathyroidism.
* Repeated urinary tract infections.
```# Disclaimer
This is an educational project and is not intended for medical diagnosis or treatment. Consult a healthcare professional for any medical concerns.