[Request] : Question about Limiting Document to Search #6330
Replies: 3 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
To address the issue of limiting the search to the top 5 documents, you can modify the semantic search function to expand the number of documents it retrieves. The current implementation limits the results to 5 entries for chat-specific searches. You can adjust this limit by changing the Here's how you can modify the code to search through more documents:
For example, change: .limit(5); to: .limit(30); // or any other number you prefer This change will allow the system to consider more documents during the search process, rather than restricting it to the top 5 based on similarity [1]. Additionally, if you want to query specific documents by name or ID, you can use the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
currently we limit the topN number to 5. So the rag quality is not so good. We will make a more flexable ui to make you control the topN of the search result. |
Beta Was this translation helpful? Give feedback.
-
🥰 需求描述
I'm building a RAG (Retriever-Augmented Generation) knowledge base, and I've encountered an issue where, no matter what prompt I use, the system always searches for the top 5 most related documents, rather than searching through all documents in the knowledge base.
Even when I specify a document's name, the system still associates it with the top 5 documents based on keyword relevance, rather than directly querying the specified document.
My question is : How to use prompts to ask questions directly about specific documents, or to require the system to search through all documents for relevant information, instead of limiting the search to the top 5 related ones?
🧐 解决方案
Use prompt to ask questions directly about specific documents, or to require the system to search through all documents for relevant information, instead of limiting the search to the top 5 related ones
📝 补充信息
No response
Beta Was this translation helpful? Give feedback.
All reactions