Hybrid search runs multiple queries and a fusion step, so it takes longer than a single search. Benchmarking helps you understand the latency tradeoff and find the right balance between retrieval quality and speed for your use case. This example assumes aDocumentation Index
Fetch the complete documentation index at: https://docs.vectoraidb.actian.com/llms.txt
Use this file to discover all available pages before exploring further.
documents collection already exists with indexed points. For collection setup, see Reciprocal Rank Fusion.
The code below runs a single vector search and a hybrid search side by side, measures the execution time of each, and outputs the latency difference and slowdown ratio so you can evaluate the performance tradeoff.
- Single search time: Baseline latency for one vector search
- Hybrid search time: Total latency for multiple searches plus fusion
- Slowdown ratio: How many times slower hybrid search is compared to single search
- Result counts: Number of results from each approach
- Latency increases roughly linearly with the number of searches
- The fusion step adds minimal overhead compared to the search operations
- Use smaller
limitvalues on individual searches to reduce candidate processing - For latency-sensitive applications, balance the number of queries against acceptable response time