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

bug(api) RAG uses first message in list instead of last #938

Closed
alekst23 opened this issue Aug 21, 2024 · 0 comments · Fixed by #939
Closed

bug(api) RAG uses first message in list instead of last #938

alekst23 opened this issue Aug 21, 2024 · 0 comments · Fixed by #939
Assignees
Labels
possible-bug 🐛 Something may not be working

Comments

@alekst23
Copy link
Contributor

Description

Our current implementation of RAG performs a search using the first message in the thread, which will always be the same. The search should instead be performed with one or more of the last messages from the thread.

Steps to reproduce

To reproduce the problem you will need 5 "hay" files and 1 "needle". You will also need a thread with two messages: first message about hay, second message about needle.

A RAG query will return 5 documents. Therefore, if the search is performed using the first message about hay, the latest user query about the needle will not be answerable because no matching documents will be returned.

Solution

We should be searching RAG using the last message in the thread

@alekst23 alekst23 added the possible-bug 🐛 Something may not be working label Aug 21, 2024
@alekst23 alekst23 self-assigned this Aug 21, 2024
@alekst23 alekst23 linked a pull request Aug 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible-bug 🐛 Something may not be working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant