mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 19:02:58 +00:00
docs: add multi-vector reranking, answerdotai and studies section (#1579)
This commit is contained in:
@@ -45,6 +45,23 @@ tbl.create_fts_index("text")
|
||||
result = tbl.query("hello", query_type="hybrid").rerank(reranker).to_list()
|
||||
```
|
||||
|
||||
### Multi-vector reranking
|
||||
Most rerankers support reranking based on multiple vectors. To rerank based on multiple vectors, you can pass a list of vectors to the `rerank` method. Here's an example of how to rerank based on multiple vector columns using the `CrossEncoderReranker`:
|
||||
|
||||
```python
|
||||
from lancedb.rerankers import CrossEncoderReranker
|
||||
|
||||
reranker = CrossEncoderReranker()
|
||||
|
||||
query = "hello"
|
||||
|
||||
res1 = table.search(query, vector_column_name="vector").limit(3)
|
||||
res2 = table.search(query, vector_column_name="text_vector").limit(3)
|
||||
res3 = table.search(query, vector_column_name="meta_vector").limit(3)
|
||||
|
||||
reranked = reranker.rerank_multivector([res1, res2, res3], deduplicate=True)
|
||||
```
|
||||
|
||||
## Available Rerankers
|
||||
LanceDB comes with some built-in rerankers. Here are some of the rerankers that are available in LanceDB:
|
||||
|
||||
|
||||
4
docs/src/studies/overview.md
Normal file
4
docs/src/studies/overview.md
Normal file
@@ -0,0 +1,4 @@
|
||||
This is a list of benchmarks and reports we've worked on at LanceDB. Some of these are continuously updated, while others are one-off reports.
|
||||
|
||||
- [Improve retrievers with hybrid search and reranking](https://blog.lancedb.com/hybrid-search-and-reranking-report/)
|
||||
|
||||
Reference in New Issue
Block a user