Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rubenszimbres/graph_rag
A Flask app running GraphRAG for healthcare, made with Vertex AI and Neo4j, to be deployed in a container (Cloud Run or ECS).
https://github.com/rubenszimbres/graph_rag
agents cloudrun cloudrun-service containers docker gpt-4 graphrag langchain langchain-python python python3 rag retrieval-augmented-generation vertexai
Last synced: 2 days ago
JSON representation
A Flask app running GraphRAG for healthcare, made with Vertex AI and Neo4j, to be deployed in a container (Cloud Run or ECS).
- Host: GitHub
- URL: https://github.com/rubenszimbres/graph_rag
- Owner: RubensZimbres
- License: apache-2.0
- Created: 2024-08-05T13:55:29.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-10T20:39:26.000Z (3 months ago)
- Last Synced: 2024-08-11T15:40:31.080Z (3 months ago)
- Topics: agents, cloudrun, cloudrun-service, containers, docker, gpt-4, graphrag, langchain, langchain-python, python, python3, rag, retrieval-augmented-generation, vertexai
- Language: Python
- Homepage:
- Size: 1.66 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graph_RAG
Description
This project is a Flask app running GraphRAG for healthcare, made with Vertex AI and Neo4j, to be deployed in a container (Cloud Run or ECS). Initially, a PDF with diseases descriptions is used to enrich the LLM response via RAG. Then, another LLM automatically parses a CSV file with diseases data, generates the Knowledge Graph. After that, an LLM generates a cypher to query the Neo4j KG database and retrieve the possibles diseases, given the patient medical report.
Deployment in Google Cloud Run
Remove user input from `app.py` and get JSON via Flask.
Add your secrets to Secret Manager
Adapt configurations in` config.json`
```
export GCP_PROJECT='your-project'
export GCP_REGION='us-central1'
export AR_REPO='repo-graphrag'
export SERVICE_NAME='flask-app-graphrag'
gcloud artifacts repositories create "$AR_REPO" --location="$GCP_REGION" --repository-format=Docker
gcloud auth configure-docker "$GCP_REGION-docker.pkg.dev"
gcloud builds submit --tag "$GCP_REGION-docker.pkg.dev/$GCP_PROJECT/$AR_REPO/$SERVICE_NAME"gcloud run deploy "$SERVICE_NAME" \
--port=8080 \
--image="$GCP_REGION-docker.pkg.dev/$GCP_PROJECT/$AR_REPO/$SERVICE_NAME" \
--allow-unauthenticated \
--platform=managed \
--region=$GCP_REGION \
--project=$GCP_PROJECT \
--set-env-vars=GCP_PROJECT=$GCP_PROJECT,GCP_REGION=$GCP_REGION \
--min-instances 1 --max-instances 5 --cpu 1 --memory 2048Mi --concurrency 10
```