Implement GraphRAG on Bio-Medical Text Corpus
- OpenAI API Key ( Or Groq API Key )
- LM Studio ( For Embedding Model to run locally )
python -m pip install graphrag mkdir input
python -m pip install pymupdf python parse_pdf.py
python -m graphrag.index --init --root . [ Setup settings.yaml file according to API Specifications & Input Data ]
python -m graphrag.index --root . [ Indexer is cached, as a result Rate Limit API Errors can be handled ]
python -m graphrag.query --root . --method global "What is the main focus of the paper?" python -m graphrag.query --root . --method local "Explain the methods explored in this paper about breast cancer ?"
Example Query : python -m graphrag.query --root . --method global "Explain the role of this paper in the context of breast cancer diagnosis"