Modify vector_search to be able to run multiple queries on one call
Repo: · Issue: #292 Status: Open · Priority: P2 Assignee: Martin
Description
Request
Caused by need to run multi-collection RAG queries
In order to optimize total query run time we want to be able to combine 2 or more calls to the vector DB into a single one:
vector_search(collection="a", query="foo", k=3, filters={}) # returns list with 3 results
vector_search(collection="b", query="bar", k=4, filters={"field": "genre", "$neq": "Drama"}) # returns list with 4 resultswould transform into:
queries = [
{collection="a", "query":"foo", "k": 3, "filters":{} },
{collection="b", "query":"bar", "k": 4, "filters":{"field": "genre", "$neq": "Drama"} }
]
vector_search(queries) # returns list of 2 lists, first has 3 results, second 4.Acceptance criteria
-
vector_searchfunction has been modified to receive multiple queries about different collections and executes them all on the same query. - Tests have been modified to address the new use cases
Implementation Notes
Dash adds notes here while working
Related
Link to people, meetings, dependent tickets