GraphRAG icon indicating copy to clipboard operation
GraphRAG copied to clipboard

The bug for GraphRAG

Open Bombastic11 opened this issue 9 months ago • 11 comments

I use the newes code . The RAG can retrieve the data, but it cant provide the data for LLM

Image

Bombastic11 avatar Mar 26 '25 15:03 Bombastic11

Hi, i want to know the context size of your llm

JayLZhou avatar Mar 27 '25 02:03 JayLZhou

limited content length of your llm

JayLZhou avatar Mar 27 '25 02:03 JayLZhou

llm_model_max_token_size: 32768,the context is none when is provided for LLM

Bombastic11 avatar Mar 27 '25 02:03 Bombastic11

Hi, please see: https://github.com/JayLZhou/GraphRAG/blob/master/Config/QueryConfig.py#L35 And change this config as True is okay for global search of GraphRAG

JayLZhou avatar Mar 27 '25 06:03 JayLZhou

File "/home/tianjm/graph/GraphRAG/Core/Retriever/CommunityRetriever.py", line 82, in find_relevant_community_by_level
    : self.config.global_max_consider_community
  File "/home/tianjm/miniconda3/envs/graph/lib/python3.10/site-packages/pydantic/main.py", line 891, in __getattr__
    raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'RetrieverConfig' object has no attribute 'global_max_consider_community'

TheRetrieverConfig :

from Core.Utils.YamlModel import YamlModel


class RetrieverConfig(YamlModel):
    # Retrieval Config
    query_type: str = "ppr"
    enable_local: bool = False
    use_entity_similarity_for_ppr: bool = True
    top_k_entity_for_ppr: int = 8
    node_specificity: bool = True
    damping: float = 0.1
    top_k: int = 5
    k_nei: int = 3
    node_specificity: bool = True
    damping: float = 0.1
    max_token_for_local_context: int = 4800  # maximum token  * 0.4
    max_token_for_global_context: int = 4000 # maximum token  * 0.3
    local_max_token_for_text_unit: int = 4000  # 12000 * 0.33
    use_relations_vdb: bool = False
    use_subgraphs_vdb: bool = False

What value should I set for this parameter? level global_max_consider_community global_min_community_rating

Bombastic11 avatar Mar 27 '25 08:03 Bombastic11

sry, this is my mistake. Please see our newtest pr.

JayLZhou avatar Mar 27 '25 14:03 JayLZhou

I want to know if methods GGraphRAG and LGraphRAG retriver can use knowledge graphs. I constructed the graph using method GGraphRAG , and if method LGraphRAG is available

Bombastic11 avatar Mar 28 '25 08:03 Bombastic11

Can you provide method GraphRAG

Bombastic11 avatar Mar 28 '25 08:03 Bombastic11

Actually, GraphRAG = LGraphRAG + GGraphRAG. Both of them rely on the same graph, the key difference lies in the retrieval strategy. To be more specific, LGraphRAG = Local Search in GraphRAG, while GGraphRAG = Global Search in GraphRAG

JayLZhou avatar Mar 28 '25 11:03 JayLZhou

How can I use different retrieval method in the rag such as HippoRAG

Bombastic11 avatar Apr 04 '25 16:04 Bombastic11

emm. What do you mean. You can directly config the different parameters to use HippoRAG

JayLZhou avatar Apr 06 '25 07:04 JayLZhou