Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ SEARCH docs SIMILAR TO 'hello' LIMIT 5
### Cross-encoder reranking (RERANK default)

```
cross-encoder/ms-marco-MiniLM-L-6-v2
Xenova/ms-marco-MiniLM-L-6-v2
```

| Model | Notes |
|---|---|
| `cross-encoder/ms-marco-MiniLM-L-6-v2` | Default. Fast passage reranker |
| `cross-encoder/ms-marco-MiniLM-L-12-v2` | Larger, higher quality |
| `Xenova/ms-marco-MiniLM-L-6-v2` | Default. Fast passage reranker |
| `Xenova/ms-marco-MiniLM-L-12-v2` | Larger, higher quality |
| `BAAI/bge-reranker-base` | Strong general-purpose reranker |
| `BAAI/bge-reranker-large` | Highest quality, slower |

Expand Down
8 changes: 4 additions & 4 deletions docs/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,15 @@ SEARCH articles SIMILAR TO 'attention mechanism in transformers' LIMIT 10 USING
Custom cross-encoder model:
```sql
SEARCH articles SIMILAR TO 'semantic search' LIMIT 5
RERANK MODEL 'cross-encoder/ms-marco-MiniLM-L-6-v2'
RERANK MODEL 'Xenova/ms-marco-MiniLM-L-6-v2'
```

**Default cross-encoder model:** `cross-encoder/ms-marco-MiniLM-L-6-v2`
**Default cross-encoder model:** `Xenova/ms-marco-MiniLM-L-6-v2`

| Model | Notes |
|---|---|
| `cross-encoder/ms-marco-MiniLM-L-6-v2` | Default. Fast and accurate for passage reranking |
| `cross-encoder/ms-marco-MiniLM-L-12-v2` | Larger, higher quality, slower |
| `Xenova/ms-marco-MiniLM-L-6-v2` | Default. Fast and accurate for passage reranking |
| `Xenova/ms-marco-MiniLM-L-12-v2` | Larger, higher quality, slower |
| `BAAI/bge-reranker-base` | BGE reranker, strong general-purpose performance |
| `BAAI/bge-reranker-large` | Highest quality BGE reranker, slower |

Expand Down
2 changes: 1 addition & 1 deletion resources/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ SEARCH medical_records SIMILAR TO 'neuromuscular junction antibody acetylcholine
AND sub_specialty IN ('neuromuscular', 'neuroimmunology')
AND severity IN ('high', 'critical')
AND year >= 2022
RERANK MODEL 'cross-encoder/ms-marco-MiniLM-L-6-v2'
RERANK MODEL 'Xenova/ms-marco-MiniLM-L-6-v2'
```

---
Expand Down
8 changes: 4 additions & 4 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,10 @@ def test_rerank_flag_set(self):

def test_rerank_with_model(self):
node = parse(
"SEARCH col SIMILAR TO 'q' LIMIT 5 RERANK MODEL 'cross-encoder/ms-marco-MiniLM-L-6-v2'"
"SEARCH col SIMILAR TO 'q' LIMIT 5 RERANK MODEL 'Xenova/ms-marco-MiniLM-L-6-v2'"
)
assert node.rerank is True
assert node.rerank_model == "cross-encoder/ms-marco-MiniLM-L-6-v2"
assert node.rerank_model == "Xenova/ms-marco-MiniLM-L-6-v2"

def test_rerank_default_false(self):
node = parse("SEARCH col SIMILAR TO 'q' LIMIT 5")
Expand All @@ -1032,12 +1032,12 @@ def test_rerank_with_where(self):
def test_rerank_with_hybrid_where_and_model(self):
node = parse(
"SEARCH col SIMILAR TO 'q' LIMIT 5 USING HYBRID WHERE year > 2020 "
"RERANK MODEL 'cross-encoder/ms-marco-MiniLM-L-6-v2'"
"RERANK MODEL 'Xenova/ms-marco-MiniLM-L-6-v2'"
)
assert node.hybrid is True
assert node.query_filter is not None
assert node.rerank is True
assert node.rerank_model == "cross-encoder/ms-marco-MiniLM-L-6-v2"
assert node.rerank_model == "Xenova/ms-marco-MiniLM-L-6-v2"

def test_rerank_lowercase(self):
node = parse("SEARCH col SIMILAR TO 'q' LIMIT 5 rerank")
Expand Down
Loading