microsoft / graphrag

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

[Bug]: DRIFT not configurable #1432

Open MBRSL opened 13 hours ago

MBRSL commented 13 hours ago

Do you need to file an issue?

Describe the bug

Though a various parameters can be set through setting.yml, it's not working for DRIFT. For example, I wish to set lower follow ups by using:

...
drift_search:
  drift_k_followups: 1

This isn't working since DRIFTSeach doesn't read config (see below). https://github.com/microsoft/graphrag/blob/v0.5.0/graphrag/query/factories.py#L193

DRIFTSearchContextBuilder reads from config but DRIFTSeach doesn't.

Steps to reproduce

Step 1: Init graphrag with arbitary documents Step 2: Modify setting.yml. Add drift_k_followups like the followings

drift_search:
  drift_k_followups: 1

Step 3: Index Step 4: Ask random questions with drift search

Expected Behavior

Expected: In the console output, it should output 5/5 in the first phase and 1/1 in the second phase

Actual: In the console output, it output 5/5 in the first phase and 20/20 in the second phase

GraphRAG Config Used

No response

Logs and screenshots

No response

Additional Information