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
David Duong d39b4b61b6
Batch apply `poetry lock --no-update` for all templates (#12531)
Ran the following bash script for all templates

```bash
#!/bin/bash

set -e
current_dir="$(pwd)"
for directory in */; do
    if [ -d "$directory" ]; then
        (cd "$directory" && poetry lock --no-update)
    fi
done

cd "$current_dir"
```

Co-authored-by: Bagatur <baskaryan@gmail.com>
8 months ago
..
hyde various templates improvements (#12500) 9 months ago
tests add template for hyde (#12390) 9 months ago
LICENSE add template for hyde (#12390) 9 months ago
README.md add template for hyde (#12390) 9 months ago
poetry.lock Batch apply `poetry lock --no-update` for all templates (#12531) 8 months ago
pyproject.toml various templates improvements (#12500) 9 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.