Population Health Modelling Consensus Reporting Network (POPCORN)
A powerful question-answering interface powered by Neo4j, OpenAI, and Streamlit, built using the neo4j-graphrag framework. This app enables natural language queries over a Neo4j knowledge graph, providing contextual answers along with interactive graph visualizations.
Live System: POPCORN_GraphRAG App
- 🔍 Natural Language Querying over Neo4j graphs using OpenAI's GPT-4o
- 🧠 GraphRAG retrieval combining full-text and vector search (
HybridCypherRetriever) - 📎 Contextual Answers generated via customizable RAG templates
- 🌐 Interactive Graph Visualization with PyVis and NetworkX
- 🎛 Advanced Filter Controls for refining visualizations by node and edge type
- 🔐 Google OAuth Authentication for secure user access
- 📚 Expandable Context and detailed JSON Debugging information for transparency
git clone https://github.com/your-username/graphrag-streamlit-app.git
cd graphrag-streamlit-apppython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory containing:
NEO4J_URI=bolt://<your-neo4j-host>:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your_password
OPENAI_API_KEY=sk-...
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
REDIRECT_URI=http://localhost:8501Note: Never commit your
.envfile to version control.
streamlit run app.py- Access locally:
http://localhost:8501 - Access remotely:
http://<your-ec2-ip>:8501(ensure port 8501 is open in your security group)
You can also disable CORS if needed:
streamlit run app.py --server.port 8501 --server.enableCORS false- Summarize and explore research topics like COVID-19, Brain-Heart Axis, or Cancer
- Dynamically explore paper-author-abstract relationships
- Visualize specific graph neighborhoods and relationships
- Facilitate knowledge-driven Q&A over complex health and scientific domains
📦 graphrag-streamlit-app
├── app.py # Main Streamlit app
├── utils # Helper modules
│ ├── auth.py # OAuth authentication logic
│ ├── neo4j_setup.py # Neo4j and LLM configuration
│ └── graph_viz.py # Graph visualization utilities
├── .env # API and DB credentials (ignored by Git)
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Protect your
.envfile from public exposure - Restrict Neo4j database access appropriately
- Deploy with HTTPS and authentication mechanisms for production environments
Pouria Mortezaagha
Data Analyst • AI Researcher • Full-Stack Developer
LinkedIn
✉️ [email protected]
This project is licensed under the MIT License - see the LICENSE file for details.
If you use the GraphRAG POPCORN Q&A Interface in your research or projects, please cite:
Software
Mortezaagha, P. (2025). GraphRAG POPCORN Q&A Interface (v1.0.0). GitHub. https://github.com/pouriamrt/POPCORN
@software{mortezaagha_graphrag_popcorn_2025,
author = {Mortezaagha, Pouria},
title = {GraphRAG POPCORN Q\&A Interface},
version = {1.0.0},
year = {2025},
url = {https://github.com/pouriamrt/POPCORN},
license = {MIT},
note = {Streamlit + Neo4j GraphRAG app for population health modelling and knowledge graph Q\&A}
}