HyDE - Advanced RAG — Improving retrieval using Hypothetical Document Embeddings(HyDE) #4074

Closed
opened 2025-11-11 15:45:37 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @machiidev on GitHub (Feb 23, 2025).

Feature Request

OpenWebUI has powerful RAG functionality. This function uses the vectorized user questions to query documents in embedding index and generates prompts including the best matching documents.

Unfortunately often a query with the questions does not find the best fitting documents in the index. So the HyDE approach suggests to generate a hypothetical answer at first. This answer is then used for querying the document index for better results. Then the results together with the original question and the hypothetical answer is combind to the prompt to get the answer.

Further Readings:

https://medium.aiplanet.com/advanced-rag-improving-retrieval-using-hypothetical-document-embeddings-hyde-1421a8ec075a

https://medium.com/towards-data-science/how-to-use-hyde-for-better-llm-rag-retrieval-a0aa5d0e23e8

** Solution

Add HyDE functionality beside standard RAG functions. Option to generate hypothetical answers (maybe with own prompt, length parameter, temperature, different model, ...) and then use this answer in prompt for final answer generation.

Originally created by @machiidev on GitHub (Feb 23, 2025). # Feature Request OpenWebUI has powerful RAG functionality. This function uses the vectorized user questions to query documents in embedding index and generates prompts including the best matching documents. Unfortunately often a query with the questions does not find the best fitting documents in the index. So the HyDE approach suggests to generate a hypothetical answer at first. This answer is then used for querying the document index for better results. Then the results together with the original question and the hypothetical answer is combind to the prompt to get the answer. Further Readings: https://medium.aiplanet.com/advanced-rag-improving-retrieval-using-hypothetical-document-embeddings-hyde-1421a8ec075a https://medium.com/towards-data-science/how-to-use-hyde-for-better-llm-rag-retrieval-a0aa5d0e23e8 ** Solution Add HyDE functionality beside standard RAG functions. Option to generate hypothetical answers (maybe with own prompt, length parameter, temperature, different model, ...) and then use this answer in prompt for final answer generation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4074