Find answers from the community

Updated 3 months ago

Hyde playground

I'm interested in trying HyDE technique to query my graph (LlamaDocs: https://tinyurl.com/4dcwm7fm). The example is on 1 index, not a graph. What adaptations are needed to:
1) query_configs when using Hyde
2) How can I compare with HyDE VS without HyDE in Playground??
Thanks!
L
L
5 comments
For Hyde, in your query configs, I think you would just need to add the query_transform arg to the query_kwargs of each config you want to apply Hyde to 🤔

Not sure the playground can support this yet though, at least at a first glance
thanks Logan!
Hey Logan, I have this that works (not great), how would I change this to work with HyDE instead?


decompose_transform = DecomposeQueryTransform(llm_predictor, verbose=True)

query_configs = [
{
"index_struct_type": "simple_dict",
"query_mode": "default",
"query_kwargs": {
"similarity_top_k": 3
},
# NOTE: set query transform for subindices
"query_transform": decompose_transform
},
{
"index_struct_type": "list",
"query_mode": "default", #or embedding
"query_kwargs": {
"response_mode": "tree_summarize",
"use_async": True,
"verbose": True
},
},
]
So following the code from here
https://gpt-index.readthedocs.io/en/latest/how_to/query/query_transformations.html#hyde-hypothetical-document-embeddings

You'll want to replace the decompose_transform with the Hyde transform

(You might also want to add the query transform argument to the list kwargs, I'm not sure though lol)
thanks logan, playing around but not getting what i want hehe
Add a reply
Sign up and join the conversation on Discord