Find answers from the community

Updated 2 months ago

Query configs

how are the index_struct_type picked in that example? why do some configs have query_kwargs?
L
n
12 comments
Index struct type is used to specify the config type. The type should line up with one of the types of indexes in your graph (list is GPTListIndex, simple_dict is GPTSimpleVectorIndex, etc).

query_kwargs are the extra options for the config. Like sometimes you might do query(..., similarity_top_k=3), so similarity_top_k is a kwarg
thank you @Logan M , it seems like in that example there are query_configs than indices. does it map 1:1 to the number of indices?
Not 1:1, just one per type

If you want to specify a config for a specific vector index when you have a ton of vector indexes, you can use the ids (like wiki title there)
ok thank you, that makes much more sense. so number of query configs <= number of indices
actually, that doesn't follow from your statement, my mistake.
Yea you got it, per type

Just need to keep track of what you put in the graph πŸ’ͺ
Hi Logan, thanks for your patience.
it looks like in the screenshot i shared above, there's no need to specify a config for each vector index, correct? you could simply have one entry in query_config for index_struct_type simple_dict
since the config for each vector index is the same
ah ok, great. thanks! I think I'm finally understanding the nitty gritty parts of the unified interface πŸ˜…
Add a reply
Sign up and join the conversation on Discord