microsoft / graphrag

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

[Issue]: Configuration Issue with `local_search.max_tokens` Parameter in `settings.yaml` #570

Open zjjzyl opened 1 month ago

zjjzyl commented 1 month ago

Describe the issue

I have encountered an issue with the configuration of the local_search.max_tokens parameter in the settings.yaml file. Currently, this parameter does not seem to influence the local search functionality as expected. The local_search.max_tokens parameter is not being utilized when executing a local search task. Upon investigation, I found that the actual parameter being used to build the llm_params for an instance of LocalSearch is llm_max_tokens, as defined in the source code here. To ensure that the settings.yaml configuration is respected, I recommend adding the llm_max_tokens parameter to the init_content.py file. This would allow the settings.yaml to include the llm_max_tokens parameter, enabling customization of the local search as intended.

Steps to reproduce

  1. Configure local_search.max_tokens in settings.yaml.
  2. Execute a local search task.
  3. Observe that the configured value does not affect the search behavior.

GraphRAG Config Used

No response

Logs and screenshots

No response

Additional Information

zjjzyl commented 1 month ago

I will propose a PR to resolve this.

github-actions[bot] commented 1 month 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.