Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: <title> Why I can not use drift search? #1363

Open
1 of 3 tasks
MinzhiHuang opened this issue Nov 6, 2024 · 7 comments
Open
1 of 3 tasks

[Issue]: <title> Why I can not use drift search? #1363

MinzhiHuang opened this issue Nov 6, 2024 · 7 comments

Comments

@MinzhiHuang
Copy link

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
  • I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.

Describe the issue

When I use --method global drift "xxxx", I got error says there is no drift search while I saw it updated in the repo..

Steps to reproduce

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:
@MinzhiHuang MinzhiHuang added the triage Default label assignment, indicates new issue needs reviewed by a maintainer label Nov 6, 2024
@AlonsoGuevara
Copy link
Contributor

HI @MinzhiHuang
Could you please add the full command you're running?

@AlonsoGuevara AlonsoGuevara added awaiting_response Maintainers or community have suggested solutions or requested info, awaiting filer response and removed triage Default label assignment, indicates new issue needs reviewed by a maintainer labels Nov 6, 2024
@MinzhiHuang
Copy link
Author

I used python3 -m graphrag.query --root ./The_Block --method drift

@MinzhiHuang
Copy link
Author

Also, I just want to ask another question that is when I use the global search, many of the times I get errors of

"creating llm client with {'api_key': 'REDACTED,len=95', 'type': "openai_chat", 'model': 'gpt-4o-mini', 'max_tokens': 4000, 'temperature': 0.0, 'top_p': 1.0, 'n': 1, 'request_timeout': 180.0, 'api_base': None, 'api_version': None, 'organization': None, 'proxy': None, 'cognitive_services_endpoint': None, 'deployment_name': None, 'model_supports_json': True, 'tokens_per_minute': 150000, 'requests_per_minute': 10000, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 20}
not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.12/site-packages/graphrag/llm/openai/utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
not expected dict type. type=<class 'str'>:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.12/site-packages/graphrag/llm/openai/utils.py", line 130, in try_parse_json_object
result = json.loads(input)
^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Warning: All map responses have score 0 (i.e., no relevant information found from the dataset), returning a canned 'I do not know' answer. You can try enabling allow_general_knowledge to encourage the LLM to incorporate relevant general knowledge, at the risk of increasing hallucinations.
"

Only with the global search but not local search, may I please know why? Is that an issue with my query?

@MEDict
Copy link

MEDict commented Nov 6, 2024

I'm encountering the same issue with error JSONDecodeError: Expecting value: line 1 column 1 (char 0).

@Dormiveglia-elf
Copy link

I'm encountering the same issue with error JSONDecodeError: Expecting value: line 1 column 1 (char 0).

I think the reason for this error is that your model is not strong enough to generate valid json format.

@MinzhiHuang
Copy link
Author

how about raise ValueError(
ValueError: Length of values (65) does not match length of index (66)

@natoverse natoverse removed the awaiting_response Maintainers or community have suggested solutions or requested info, awaiting filer response label Nov 12, 2024
@natoverse
Copy link
Collaborator

I used python3 -m graphrag.query --root ./The_Block --method drift

The version of GraphRAG that includes drift search uses graphrag as a standalone command instead of a module: graphrag query --root ./The_Block --method drift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants