You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/templates/hyde
Harrison Chase 56ee56736b
add template for hyde (#12390)
11 months ago
..
hyde add template for hyde (#12390) 11 months ago
tests add template for hyde (#12390) 11 months ago
LICENSE add template for hyde (#12390) 11 months ago
README.md add template for hyde (#12390) 11 months ago
pyproject.toml add template for hyde (#12390) 11 months ago

README.md

HyDE

Hypothetical Document Embeddings (HyDE) are a method to improve retrieval. To do this, a hypothetical document is generated for an incoming query. That document is then embedded, and that embedding is used to look up real documents similar to that hypothetical document. The idea behind this is that the hypothetical document may be closer in the embedding space than the query. For a more detailed description, read the full paper here.

For this example, we use a simple RAG architecture, although you can easily use this technique in other more complicated architectures.