Graph-RAG clinical decision-support prototype integrating ADA guidelines and FDA labels for traceable diabetes reasoning.
Conventional RAG pipelines often return plausible text without transparent evidence paths. This project emphasizes:
- graph-structured evidence retrieval over flat text lookup
- visible node and edge context for answer traceability
- reviewer-friendly separation of runtime code, examples, docs, and assets
- React frontend collects a user question and renders answer plus graph context.
- Lambda chat handler extracts entities/intents and retrieves relevant subgraph context.
- Graph evidence is passed into the LLM prompt for evidence-grounded response generation.
- Graph processor Lambda supports ingestion paths into Neptune-backed storage.
.
├── datasets/
├── docs/
│ ├── architecture.md
│ ├── setup.md
│ ├── team178poster.pdf
│ └── team178report.pdf
├── packages/
│ ├── frontend/
│ │ ├── src/components/
│ │ │ ├── Chat.js
│ │ │ ├── GraphDisplay.js
│ │ │ ├── Home.js
│ │ │ ├── Navigation.js
│ │ │ ├── SampleGraphDisplay.js
│ │ │ └── Upload.js
│ ├── infrastructure/
│ │ └── src/stacks/
│ │ ├── chat-api-stack.ts
│ │ ├── frontend-stack.ts
│ │ └── graph-processing-stack.ts
│ └── lambda/
│ ├── assets/
│ ├── docs/
│ ├── examples/
│ ├── notebooks/
│ └── src/
│ ├── chat_handler.py
│ ├── graph_processor_handler.py
│ ├── local_http_server.py
│ └── unified_graph_builder.py
├── package.json
└── tsconfig.json
cp .env.example .env
cp packages/infrastructure/.env.example packages/infrastructure/.env
cp packages/lambda/.env.example packages/lambda/.env
cp packages/frontend/.env.example packages/frontend/.envRequired values:
.env:AWS_ACCOUNT_IDpackages/lambda/.env:GEMINI_API_KEY
npm install
cd packages/lambda/src && pip install -r requirements.txtnpm run lambda:testThis starts the local server with:
- graph source:
packages/lambda/examples/unified_diabetes_graph.json - health endpoint:
http://localhost:3001/health
npm run frontend:startnpm run frontend:buildnpm run deploy- Install workspace dependencies with
npm install. - Install Lambda Python dependencies from
packages/lambda/src/requirements.txt. - Configure
.envfiles includingGEMINI_API_KEY. - Start local Lambda server using
npm run lambda:test. - Start frontend using
npm run frontend:start. - Verify backend health at
/health.
The React frontend includes:
- markdown-rendered answer output via
react-markdown - routing-based UI via
react-router-dom - graph visualization via Cytoscape (
cytoscape,cytoscape-panzoom,cytoscape-cose-bilkent) - key components for upload, chat, navigation, and graph display
CDK stack responsibilities:
frontend-stack.ts: S3 and CloudFront hosting for frontend deliverygraph-processing-stack.ts: graph upload/processing path (S3 + Lambda + Neptune)chat-api-stack.ts: API Gateway + Lambda chat endpoint
This repository is a research and portfolio prototype focused on evidence tracing and explainable reasoning. It is not intended for direct clinical deployment or autonomous medical diagnosis.
- setup guide:
docs/setup.md - architecture summary:
docs/architecture.md - lambda local testing:
packages/lambda/docs/local-testing.md
Apache-2.0