convez.ai
PluginDados & AnalyticsAvançado
aghoshpro

GraphRAG - RAG com Grafos de Conhecimento

aghoshpro/GraphRAG

RAG baseado em grafos de conhecimento com melhor contextualização e custo-efetividade

Ver no GitHub
InicialPluginScore · de 0 a 100

Sistema de Recuperação Aumentada por Geração (RAG) que constrói grafos de conhecimento a partir de texto bruto, organiza entidades em hierarquias comunitárias e gera resumos para consultas mais precisas. Combina grafos estruturados com LLMs para respostas mais contextualizadas e escaláveis que RAG vetorial tradicional.

Instalação

$npx convez-ai aghoshpro/GraphRAG

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
1
Saúde
28%
Último commit
há 3 semanas
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Extração de temas principais em grandes datasets
  • Sistemas de perguntas e respostas sobre documentos relacionados
  • Análise de relações entre entidades em corpus textuais
  • RAG empresarial com recuperação semanticamente estruturada

Veredito

Implementação robusta de GraphRAG com Neo4j e LangChain, demonstrando ganhos reais sobre RAG vetorial tradicional. Bem documentada com exemplos práticos, ideal para quem busca ir além de embeddings simples em sistemas de IA generativa.

README

A tradução para o português deste README ainda está na fila.

Knowledge Graph RAG

Knowledge Graph RAG is a special type of RAG system that combines the benefits of knowledge graphs with large language models (LLMs). In GraphRAG, the knowledge graph serves as an organised data structure of factual information, while the LLM functions as a reasoning engine, processing user questions, obtaining appropriate knowledge from the graph, and delivering logical responses.

Recent scientific research [1, 2] reveals that GraphRAG outperforms vector store-powered traditional RAG systems with more accurate responses in a cost effective and scalable way.

Consider the following scenario to demonstrate GraphRAG's effectiveness: both a traditional RAG and GraphRAG are charged with identifying the top five themes in a dataset. The baseline RAG struggled to retrieve unrelated text and represent the essential themes accurately. In contrast, GraphRAG provided a concise and meaningful response, identifying the main ideas and supporting them with source material references.

Traditional RAG vs GraphRAG

traditional RAG treats each document as an isolated unit, while graph RAG captures the relationships between entities mentioned in the documents. This structural understanding enables more sophisticated querying and better answers.

Environment Setup

1. Clone Repository

  • Create a working directory and navigate to it:

    cd GraphRAG
    
  • Open cmd or terminal to clone repository

    git clone https://github.com/aghoshpro/GraphRAG.git
    

2. Setup Local Environment

  • Create a virtual environment myvenv inside the ./GraphRAG folder and activate it:

    python -m venv myvenv
    
    # Windows
    .\myvenv\Scripts\activate    # OR source myvenv/bin/activate (in Linux or Mac)
    
  • Install dependencies:

    pip install --upgrade -r requirements.txt
    

3. Start Neo4J Docker

docker compose up

🕹️ Run

streamlit run app.py
  • Select llama3.2 as the model and start chatting.

🧪 OR Experiment with code if you want

jupyter notebook

References

  1. pip
  2. PythonNotes
  3. LangChain ChatModels
  4. LangChain Neo4J
  5. LangChain Community
  6. Langchain SQL

Knowledge Graph

  1. Neo4J KG
  2. RDFvsPropKG
  3. NLPGraph

Graph RAG

  1. Kdnuggets
  2. OntoText
  3. falkordb
  4. PG Vector

Colab

  1. Colab
Ver o original no GitHub

Bom para

Relacionados