microsoft / graphrag

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

[Issue]: Incorrect answer by local query. Referenced wrong entinties #862

Open KylinMountain opened 2 months ago

KylinMountain commented 2 months ago

Is there an existing issue for this?

Describe the issue

I have a query like Person A is actively compensated the other party?

But it matched to another person B and compensates.

In the data, there’s no accident occurred in person A case. Only person B has actively compensates the other party.

ps there’s entity type like person and compensated.

So how do we optimize such query? The entity person should have more priority, it should look up person an and then get its compensates.

Steps to reproduce

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

natoverse commented 2 months ago

This sounds like it may be a hallucination issue? It sounds like the nature of your domain requires some prioritization that isn't present in the default prompts.

I put some comments here about tuning query prompts: https://github.com/microsoft/graphrag/issues/917. It's a little bit of work at the moment, but hopefully can be config driven soon.