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

I'm getting "No relevant documents to query." one every prompt #447

Closed
slavag opened this issue Jul 14, 2023 · 5 comments
Closed

I'm getting "No relevant documents to query." one every prompt #447

slavag opened this issue Jul 14, 2023 · 5 comments

Comments

@slavag
Copy link

slavag commented Jul 14, 2023

Hi,
Using --langchain_mode='UserData' generated from CSV file by make_db.py and recently (after I pulled all the changes) I started to get "No relevant documents to query." on every prompt. Yesterday everything was working fine.
When switching to "ChatLLM" or "LLM" it's working fine.
Please advise.
Thanks

@pseudotensor
Copy link
Collaborator

Hi, if I run:

python generate.py --base_model=h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3 --langchain_mode=UserData

and have an existing database for UserData, I don't see the same problem:

image

However, there is a change in behavior, so that before if it didn't find relevant documents the LLM would still be allowed to respond. But others, and I agree, suggested it's better to not let the LLM respond if have chosen a DB. If really want the LLM to say something, should switch to ChatLLM or LLM in the UI instead of choosing UserData or MyData.

So either your documents really are irrelevant, or something else is wrong. To test, you can change in gen.py:

cut_distanct=1.1 if langchain_mode in ['wiki_full'] else 1.64,  # FIXME, too arbitrary

to

cut_distanct=100

So there is no relevance cut, everything will be considered relevant.

@slavag
Copy link
Author

slavag commented Jul 14, 2023

@pseudotensor Thanks, indeed there was not related to DB question, but I expected to behave the same , like in the past. IMHO, the previous behaviour was more correct :)
Thanks

@pseudotensor
Copy link
Collaborator

I can certainly make it an option.

@slavag
Copy link
Author

slavag commented Jul 14, 2023

Thanks, that would be great.

@pseudotensor
Copy link
Collaborator

Added option --use_llm_if_no_docs=True

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

2 participants