graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

[Bug]: Auto Prompt Tuning - Graphrag mode error: could not resolve response

Open Silence-Well opened this issue 7 months ago • 9 comments

Do you need to file an issue?

  • [x] I have searched the existing issues and this bug is not already filed.
  • [x] 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.
  • [x] I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.

Describe the bug

When I directly run "graphrag" or "python -m graphrag prompt-tune" in the terminal, an error occurs.

graphrag prompt-tune --config settings.yaml  --selection-method all --no-discover-entity-types

I can be certain that there is nothing wrong with my configuration. The reason is that I was able to run successfully by using the command poetry run poe prompt_tune.

Image
AssertionError: could not resolve response (should never happen)

I attempted to replace the api_base with the local address for monitoring, but found that no requests were sent.

The program has been running normally using the poetry method. Image

Steps to reproduce

No response

Expected Behavior

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

  • GraphRAG Version: 2.2.1
  • Operating System: Mac OS M
  • Python Version: python3.12
  • Related Issues:

Silence-Well avatar May 08 '25 15:05 Silence-Well

I'm running into the same bug with prompt-tune. Even with the example text and running graphrag prompt-tune --root ./ragtest --config ./ragtest/settings.yaml ends in the same error.

This is the full traceback from the error: output_prompt-tune.txt

carlosecalvo avatar May 09 '25 04:05 carlosecalvo

I'm trying with below command but same error with prompt-tune: python -m graphrag prompt-tune --root ./ragtest --logger rich --selection-method random

RK-GOML avatar May 13 '25 04:05 RK-GOML

same problem

AlexanderOnly avatar May 13 '25 09:05 AlexanderOnly

I got the same error

AmineM24 avatar May 15 '25 02:05 AmineM24

experiencing same issue

zannLeft avatar May 15 '25 10:05 zannLeft

I think it's the problem with openai version.

I had the same issue when using openai==1.78.1, I downgraded it to 1.73.0 and it works for me. Hope it helps.

hienpham15 avatar May 16 '25 15:05 hienpham15

same problem but hienpham15's method has solved this error thank you

wcx2333 avatar May 20 '25 07:05 wcx2333

same problem but hienpham15's method has solved this error thank you @hienpham15

zakelawen avatar May 22 '25 11:05 zakelawen

Same issue for me on openai=1.78.1. Downgrading to 1.73 fixed it.

Adrian-Tamas avatar Jun 02 '25 12:06 Adrian-Tamas