Thanks to visit codestin.com
Credit goes to github.com

Skip to content

IMTorgOpenDataTools/graphrag-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

#prepare server
docker pull ollama/ollama

docker volume create ollama_data

docker run -d \
  --name ollama \
  -v ollama_data:/root/.ollama \
  -p 11434:11434 \
  ollama/ollama

#install model
docker exec -it ollama ollama pull mistral

#power cycle
docker stop ollama

docker start ollama

#within container
curl http://172.17.0.1:11434/api/tags

#outside container
curl http://localhost:11434/api/generate -d '{
  "model": "mistral",
  "prompt": "Why is the sky blue?",
  "stream": false
}'
curl http://localhost:11434/api/chat -d '{
  "model": "mistral",
  "messages": [
    { "role": "user", "content": "Why is the sky blue?" }
  ],
  "stream": false
}'

Models

  • mistral
    • nomic-embed-text
  • phi4-mini
    • all-minilm:l6-v2

Notes

Fast Mode (Spacy NLP)

While it is possible to use spaCy for the primary task of Entity Extraction in Microsoft GraphRAG, you cannot run the library entirely without a Language Model (LLM/SLM). The GraphRAG pipeline is fundamentally designed to use an LLM for several high-level analytical tasks that traditional NLP libraries like spaCy are not equipped to handle. Why is an LLM is Still Required? Even when using "Fast Mode" with spaCy, the pipeline relies on an LLM for the following critical steps:

  • Relationship Descriptions: While spaCy can find entities (e.g., "Apple" and "Steve Jobs"), it cannot describe the nature of their relationship (e.g., "was founded by") without an LLM.
  • Community Summarization: The core "GraphRAG" feature—creating high-level reports for clusters of data—requires a generative model to synthesize information into a coherent summary.
  • Querying: To answer questions based on the graph, GraphRAG uses an LLM to reason over the retrieved entities and community reports.

About

Utility functions for working with microsoft/graphrag

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages