onyx icon indicating copy to clipboard operation
onyx copied to clipboard

error `GPT hurt itself in its confusion :(` - AI search doesn't work

Open developerisnow opened this issue 1 year ago • 6 comments

I've installed on localhost Added

  • github repo https://github.com/danswer-ai/danswer,
  • 2 websites https://docs.danswer.dev/introduction + https://glarity.app/

and try to search "what is danswer" with AI search

Expected output: it use vector search of github repo readme.md and answer but unfortunately no(

error is GPT hurt itself in its confusion :(

of course I've added workable openai api key.

screenshot

logs:

INFO:     100.43.95.255:57824 - "POST /stream-direct-qa HTTP/1.1" 200 OK
07/14/2023 04:55:05 AM    search_backend.py 107 : Received QA query: What is danswer ?
07/14/2023 04:55:05 AM            timing.py  29 : query_intent took 0.09182906150817871 seconds
07/14/2023 04:55:05 AM            timing.py  29 : semantic_retrieval took 0.03994250297546387 seconds
07/14/2023 04:55:06 AM            timing.py  29 : semantic_reranking took 0.40392088890075684 seconds
07/14/2023 04:55:06 AM   semantic_search.py  86 : Top links from semantic search: https://docs.danswer.dev/introduction, https://docs.danswer.dev/introduction, https://glarity.app/, https://glarity.app/
07/14/2023 04:55:06 AM            timing.py  29 : retrieve_ranked_documents took 0.4441695213317871 seconds
INFO:     100.43.95.255:58934 - "GET /users/me HTTP/1.1" 401 Unauthorized
INFO:     100.43.95.255:58940 - "GET /manage/connector HTTP/1.1" 401 Unauthorized
INFO:     100.43.95.255:58940 - "GET /auth/google/authorize HTTP/1.1" 200 OK
INFO:     100.43.95.255:58934 - "GET /users/me HTTP/1.1" 401 Unauthorized
INFO:     100.43.95.255:51906 - "POST /stream-direct-qa HTTP/1.1" 200 OK
07/14/2023 04:55:43 AM    search_backend.py 107 : Received QA query: danswer
07/14/2023 04:55:43 AM            timing.py  29 : query_intent took 0.12076759338378906 seconds
07/14/2023 04:55:44 AM            timing.py  29 : retrieve_keyword_documents took 1.2382943630218506 seconds
INFO:     100.43.95.255:35708 - "GET /health HTTP/1.1" 200 OK
INFO:     100.43.95.255:35720 - "POST /stream-direct-qa HTTP/1.1" 200 OK
07/14/2023 04:57:04 AM    search_backend.py 107 : Received QA query: What is danswer?
07/14/2023 04:57:04 AM            timing.py  29 : query_intent took 0.11964130401611328 seconds
07/14/2023 04:57:04 AM            timing.py  29 : semantic_retrieval took 0.04374074935913086 seconds
07/14/2023 04:57:04 AM            timing.py  29 : semantic_reranking took 0.1724071502685547 seconds
07/14/2023 04:57:04 AM   semantic_search.py  86 : Top links from semantic search: https://docs.danswer.dev/introduction, https://docs.danswer.dev/introduction, https://glarity.app/
07/14/2023 04:57:04 AM            timing.py  29 : retrieve_ranked_documents took 0.21661090850830078 seconds
INFO:     100.43.95.255:56106 - "GET /health HTTP/1.1" 200 OK
INFO:     100.43.95.255:56122 - "GET /manage/admin/connector/indexing-status HTTP/1.1" 200 OK
INFO:     100.43.95.255:56144 - "GET /health HTTP/1.1" 200 OK
INFO:     100.43.95.255:56138 - "GET /manage/credential HTTP/1.1" 200 OK
INFO:     100.43.95.255:58996 - "GET /health HTTP/1.1" 200 OK
INFO:     100.43.95.255:59006 - "GET /health HTTP/1.1" 200 OK
INFO:     100.43.95.255:59032 - "GET /manage/credential HTTP/1.1" 200 OK
INFO:     100.43.95.255:59020 - "GET /manage/admin/connector/indexing-status HTTP/1.1" 200 OK
INFO:     100.43.95.255:33780 - "GET /health HTTP/1.1" 200 OK
INFO:     100.43.95.255:35170 - "GET /health HTTP/1.1" 200 OK

developerisnow avatar Jul 14 '23 04:07 developerisnow

error in frontend also:

docker logs -f docker_compose-web_server-1

Listening on port 3000 url: http://3f1b1f4397f0:3000
Error fetching user: TypeError: fetch failed
Some fetch failed for the main search page - TypeError: fetch failed
Error fetching user: TypeError: fetch failed
Some fetch failed for the login page - TypeError: fetch failed
Error fetching user: TypeError: fetch failed
Some fetch failed for the main search page - TypeError: fetch failed
Error fetching user: TypeError: fetch failed
Some fetch failed for the login page - TypeError: fetch failed
Error fetching user: TypeError: fetch failed
Some fetch failed for the login page - TypeError: fetch failed

developerisnow avatar Jul 14 '23 06:07 developerisnow

Can you provide a .har file with the frontend network requests from your browser?

pkabra avatar Jul 14 '23 16:07 pkabra

Hello, I am seeing the same error message in the web UI, but I do not see the same errors in the web-server docker container. All I have is the "Listening on port 3000..." message. No other errors are showing in the logs for any other container as well.

Screenshot 2023-07-14 at 10 29 21 AM localhost.har.zip

Dan-Kouba avatar Jul 14 '23 17:07 Dan-Kouba

Hmm, not sure exactly what's going wrong. I'm going to add some more logging to this part of the flow, which will hopefully shine some light on exactly what's going wrong. Will update here when that's ready.

Weves avatar Jul 14 '23 18:07 Weves

Thank you!

Dan-Kouba avatar Jul 14 '23 19:07 Dan-Kouba

Hello, I am seeing the same error message in the web UI, but I do not see the same errors in the web-server docker container. All I have is the "Listening on port 3000..." message. No other errors are showing in the logs for any other container as well.

Screenshot 2023-07-14 at 10 29 21 AM localhost.har.zip

Thank you Dan, here is the logs above @pkabra , I hope we'll fix it soon @Weves

developerisnow avatar Jul 14 '23 19:07 developerisnow

More detailed logs are now included, please set the env variable LOG_LEVEL=debug for the api server (if you're using docker compose, set it in the .env).

It will show the prompt to OpenAI and the model response if it comes.

yuhongsun96 avatar Jul 17 '23 22:07 yuhongsun96

The code relating to this has changed significantly since this ticket, closing since this is no longer relevant

Additionally if a model failure occurs on the backend, the user is shown the exact model error which should make it much easier to pinpoint

yuhongsun96 avatar Aug 13 '23 23:08 yuhongsun96