microsoft / graphrag

A modular graph-based Retrieval-Augmented Generation (RAG) system
https://microsoft.github.io/graphrag/
MIT License
20.17k stars 1.97k forks source link

[Bug]: Entity Graph Embedding returned as None after parsing through indexer #1087

Closed vrush0022 closed 2 months ago

vrush0022 commented 3 months ago

Do you need to file an issue?

Describe the bug

The Node(Entity) Dataframe containing the graph embeddings when passed to read_indexer_entities returns a list of entities for which the field(graph_embedding) is None.

On digging deeper into the code, I noticed that the below code is the problem. return read_entities( df=entity_df, id_col="id", title_col="name", type_col="type", short_id_col="human_readable_id", description_col="description", community_col="community", rank_col="rank", name_embedding_col=None, description_embedding_col="description_embedding", graph_embedding_col=None, text_unit_ids_col="text_unit_ids", document_ids_col=None, )

Here the value of graph_embedding_col is being passed as None to read_entities. That is the reason the field is not being read from the dataframe. Request you to please rectify this as it is required for trying out Local Search with Graph Embedding Vectors.

Steps to reproduce

No response

Expected Behavior

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

natoverse commented 2 months ago

This is the correct behavior. Graph embeddings are not used in any query method, so they are not passed to the method when used by the query library.

Graph embeddings are used for generating x/y node positions using UMAP for visualization purposes if those settings are turned on - they are off by default. See here for more info.

github-actions[bot] commented 2 months ago

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] commented 2 months ago

This issue has been closed after being marked as stale for five days. Please reopen if needed.