Find answers from the community

Updated last year

Single-Step Query Decomposition

At a glance
Hi guys i m trying to use the LLama index Single-Step Query Decomposition,i read the documentation but it still a lil bit blurry , when the question is decomposed using gpt , is there a communication to the retreiver ? or is the decomposition is just using the GPT ? ( i m following this notebook example you guys posted https://github.com/run-llama/llama_index/blob/main/docs/examples/composable_indices/city_analysis/City_Analysis-Decompose.ipynb)
W
T
5 comments
Hey!

Yes when decomposing, it queries your document and based on the retrieved document it forms queries.

For more info: https://docs.llamaindex.ai/en/stable/core_modules/query_modules/query_engine/advanced/query_transformations.html#single-step-query-decomposition
@WhiteFang_Jr thank u for answering , i m trying to query on a faiss document store , using an embedded retreiver that was finetuned on my data , if i m to integrate the Single-Step Query Decomposition, into my pipeline , can you highlight when is the retreival call is being done ? within the code ? would really appreciate it
When i dived in within the code , DecomposeQueryTransform takes " index_summary" variable , is that the returned result of the retreival ? its a bit blurry for me
in other words what i want to know is :
if the decomposition doesn't directly perform retrieval. Instead, it transforms the query based on the context (index_summary). The transformed query is then used by the vector index's retriever to get documents.
I checked the code and the query part starts from this place
Plain Text
query_engine_decompose = graph.as_query_engine(
    custom_query_engines=custom_query_engines,
)


I could be wrong here but IMO, All the work happens in ComposableGraphQueryEngine,
Iterates over the user query against the set of query engines and then produce the results.

So for you to explore/debug further this would be where you should look: https://github.com/run-llama/llama_index/blob/31d132c56b1836603d48e02786cd29a74a28f527/llama_index/query_engine/graph_query_engine.py#L50
Add a reply
Sign up and join the conversation on Discord