GraphRAG-Omics is an extension of Microsoft's GraphRAG library and TheAiSingularity/graphrag-local-ollama library that enables users to convert unstructured documents into knowledge graphs and interact with them using natural language queries.
This is just an expremental repository where the prompts were tailored for genomics and clinical documents.
- 📄 Document Indexing: Convert raw
.txtdocuments into.parquetfiles - this uses graphrag library. - 🧠 Knowledge Graph Generation: Transform indexed documents into a structured knowledge graph stored in a Neo4j server.
- 💬 Natural Language Querying: Interact with your knowledge graph through an intuitive Streamlit web interface — ask questions, get insights.
graphrag-omics/
│
├── graphrag_workflow.bat # Command-line script to index documents
├── app.py # Streamlit app for graph creation and querying
├── input/ # Directory to place raw .txt documents
└── proj_<project_name>/ # Generated output for each project
-
Command-Line Indexing Script
- Takes input
.txtdocuments - Outputs
.parquetfiles into a project-specific folder
- Takes input
-
Streamlit Web App
- Indexing Tab: Load
.parquetfiles and generate a knowledge graph in Neo4j - Query Tab: Use natural language to query your knowledge graph (GraphRAG interface)
- Indexing Tab: Load
- install all necessary required libraries
- install neo4j-desktop
- install the graphrag, by executing the following command inside the root directory of the project.
pip install -e .- Place your
.txtdocuments inside theinput/folder (located in the root of the project). - Run the following command:
bash graphrag_workflow.bat proj_<project_name>🔒 The project name must start with
proj_
✅ Example: For a project named "med", use:
bash graphrag_workflow.bat proj_medThis will create a folder proj_med/ and generate the .parquet files inside it.
- Start the Streamlit app:
streamlit run app.py- Navigate to your browser where the app opens automatically.
- Use the following tabs inside the app:
- Indexing: Select a project (e.g.,
proj_med) and generate the knowledge graph in Neo4j. - Query: Ask questions using natural language — powered by the generated knowledge graph (GraphRAG style).
- Indexing: Select a project (e.g.,
- Only
.txtdocuments are currently supported. - Ensure that the Neo4j server is running before using the Indexing or Query functionality in the app.
- Genomics research papers
- Clinical documents & patient summaries
- Biomedical literature mining
- Interactive Q&A from specialized unstructured data