Find answers from the community

s
F
Y
a
P
Updated 2 years ago

List index over vector indexes

i have multiple GPTSimpleVectorIndex and can find relevant documents when running index.query on each. But somehow if I query a combined list index, like GPTListIndex([index1, index2, index3]), it can't find relevant documents. I see an example of setting the summary for each index with set_text. Is this required for GPTListIndex to work? My indexes each contain a large number of documents so it does not seem reasonable to summarize all first.
https://gpt-index.readthedocs.io/en/latest/guides/use_cases.html#use-case-combining-information-across-multiple-indices
L
A
3 comments
Hmm, a list index doesn't need the summaries because by default the queries should be checking every vector index inside the list index.

You should be able to follow this notebook, but replace the keyword index with a list index https://github.com/jerryjliu/gpt_index/blob/main/examples/composable_indices/ComposableIndices.ipynb
Then in the query kwargs, replace keyword_table with list.

You may or may not need to set the text of the vector indexes to a blank string too
@davidds2020 i had your same problem. Let us know if you solve
Add a reply
Sign up and join the conversation on Discord