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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: scrydb-eval
|
| 3 |
+
license: cc-by-4.0
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
task_categories:
|
| 7 |
+
- text-retrieval
|
| 8 |
+
tags:
|
| 9 |
+
- information-retrieval
|
| 10 |
+
- extended|beir
|
| 11 |
+
- sqlite
|
| 12 |
+
- sqlite-vec
|
| 13 |
+
- fts5
|
| 14 |
+
- bm25
|
| 15 |
+
- hybrid-search
|
| 16 |
+
- binary-quantization
|
| 17 |
+
- trec
|
| 18 |
+
- reproducibility
|
| 19 |
+
size_categories:
|
| 20 |
+
- 1M<n<10M
|
| 21 |
+
source_datasets:
|
| 22 |
+
- extended|beir
|
| 23 |
+
viewer: false
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# scrydb-eval
|
| 27 |
+
|
| 28 |
+
Prebuilt **[scrydb](https://github.com/breuert/scrydb) indices**, **TREC-formatted
|
| 29 |
+
qrels**, and the **retrieval runs** behind the evaluation of *[SQLite is Enough. Lexical,
|
| 30 |
+
Semantic, and Hybrid Search with scrydb](https://arxiv.org/abs/2608.24060)*, covering eight BEIR datasets.
|
| 31 |
+
|
| 32 |
+
Each `.db` file is a single, self-contained SQLite database holding **everything a retrieval
|
| 33 |
+
experiment needs**: the raw document and query text, an FTS5 lexical index, and every
|
| 34 |
+
embedding at three precisions — binary (1 bit/dim), int8 (1 byte/dim), and float32 — as
|
| 35 |
+
`sqlite-vec` `vec0` tables. No separate corpus dump, no vector store, no index-building step:
|
| 36 |
+
download one file and run all thirteen retrieval configurations against it.
|
| 37 |
+
|
| 38 |
+
- **arXiv preprint:** <https://arxiv.org/abs/2608.24060>
|
| 39 |
+
- **Library:** <https://github.com/breuert/scrydb> · `pip install scrydb`
|
| 40 |
+
- **Evaluation code, results, plots, and tables:** <https://github.com/breuert/scrydb-eval>
|
| 41 |
+
- **Embedding model:** <https://huggingface.co/Qwen/Qwen3-Embedding-8B>
|
| 42 |
+
|
| 43 |
+
## What's in here
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
indices/ # 8 scrydb SQLite databases (~27 GB total)
|
| 47 |
+
arguana.db fiqa.db nfcorpus.db quora.db
|
| 48 |
+
scidocs.db scifact.db trec-covid.db webis-touche2020.db
|
| 49 |
+
|
| 50 |
+
qrels/ # BEIR qrels converted to TREC format
|
| 51 |
+
arguana/test.trec
|
| 52 |
+
fiqa/{train,dev,test}.trec
|
| 53 |
+
nfcorpus/{train,dev,test}.trec
|
| 54 |
+
quora/{dev,test}.trec
|
| 55 |
+
scidocs/test.trec
|
| 56 |
+
scifact/{train,test}.trec
|
| 57 |
+
trec-covid/test.trec
|
| 58 |
+
webis-touche2020/test.trec
|
| 59 |
+
|
| 60 |
+
runs/ # 8 datasets x 13 methods = 104 TREC run files (~16 GB total)
|
| 61 |
+
<dataset>-<method>.txt
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
### Datasets
|
| 65 |
+
|
| 66 |
+
| Dataset | Index file | Documents | Queries indexed | Test queries | Test qrels | Index size |
|
| 67 |
+
| :------ | :-------------- | --------: | --------------: | -----------: | ---------: | ---------: |
|
| 68 |
+
| ArguAna | `arguana.db` | 8,674 | 1,406 | 1,406 | 1,406 | 263 MB |
|
| 69 |
+
| FiQA-2018 | `fiqa.db` | 57,600 | 6,648 | 648 | 1,706 | 1.4 GB |
|
| 70 |
+
| NFCorpus | `nfcorpus.db` | 3,633 | 3,237 | 323 | 12,334 | 183 MB |
|
| 71 |
+
| Quora | `quora.db` | 522,931 | 15,000 | 10,000 | 15,675 | 11 GB |
|
| 72 |
+
| SciDocs | `scidocs.db` | 25,657 | 1,000 | 1,000 | 29,928 | 656 MB |
|
| 73 |
+
| SciFact | `scifact.db` | 5,183 | 1,109 | 300 | 339 | 189 MB |
|
| 74 |
+
| TREC-COVID | `trec-covid.db` | 171,331 | 50 | 50 | 66,336 | 4.0 GB |
|
| 75 |
+
| Touché-2020 | `webis-touche2020.db` | 382,545 | 49 | 49 | 2,214 | 9.4 GB |
|
| 76 |
+
|
| 77 |
+
"Queries indexed" is every query stored in the database — for datasets where BEIR ships
|
| 78 |
+
multiple splits, that includes the train/dev queries too. The run files cover all of them;
|
| 79 |
+
evaluation is restricted to the query ids present in the qrels you evaluate against.
|
| 80 |
+
|
| 81 |
+
## Quick start
|
| 82 |
+
|
| 83 |
+
Fetch a single index (they are large — download only what you need):
|
| 84 |
+
|
| 85 |
+
```bash
|
| 86 |
+
pip install -U scrydb huggingface_hub
|
| 87 |
+
hf download breuert/scrydb-eval --repo-type dataset \
|
| 88 |
+
--include "indices/nfcorpus.db" "qrels/nfcorpus/*" "runs/nfcorpus-*" \
|
| 89 |
+
--local-dir scrydb-eval
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
or from Python:
|
| 93 |
+
|
| 94 |
+
```python
|
| 95 |
+
from huggingface_hub import hf_hub_download
|
| 96 |
+
|
| 97 |
+
db = hf_hub_download("breuert/scrydb-eval", "indices/nfcorpus.db", repo_type="dataset")
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
Search the index interactively with BM25:
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
import scrydb
|
| 104 |
+
|
| 105 |
+
idx = scrydb.Index.open(db)
|
| 106 |
+
|
| 107 |
+
idx.search("vitamin B12", mode="lexical") # BM25 as implemented by FTS5
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
Regenerate a full run file. Because the query embeddings are stored alongside the documents,
|
| 111 |
+
`batch_search` reuses them rather than re-encoding the query text. No embedding models or GPUs are required at this point:
|
| 112 |
+
|
| 113 |
+
```python
|
| 114 |
+
run = idx.batch_search(mode="semantic",
|
| 115 |
+
precision="binary",
|
| 116 |
+
rerank="int8",
|
| 117 |
+
rerank_depth=1000,
|
| 118 |
+
top_k=1000)
|
| 119 |
+
|
| 120 |
+
run.write_trec("nfcorpus-hamming-cosine_int8.txt")
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
Evaluate it:
|
| 124 |
+
|
| 125 |
+
```bash
|
| 126 |
+
trec_eval -m map -m recip_rank -m P.10 -m ndcg_cut.10 \
|
| 127 |
+
qrels/nfcorpus/test.trec runs/nfcorpus-hamming-cosine_int8.txt
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
## The index files
|
| 131 |
+
|
| 132 |
+
Every `.db` is an ordinary SQLite database. `scrydb` is a convenience layer over it, not a
|
| 133 |
+
custom format — any SQLite client can read it, and with the
|
| 134 |
+
[`sqlite-vec`](https://github.com/asg017/sqlite-vec) extension loaded, query it.
|
| 135 |
+
|
| 136 |
+
| Table | Contents |
|
| 137 |
+
| :---- | :------- |
|
| 138 |
+
| `documents` | `(id TEXT PRIMARY KEY, payload TEXT)` — payload is the JSON row `{"docid": ..., "text": ...}` |
|
| 139 |
+
| `queries` | same shape, payload `{"qid": ..., "text": ...}` |
|
| 140 |
+
| `documents_fts` | FTS5 virtual table over the document text, `tokenize='porter'` |
|
| 141 |
+
| `vec_documents_binary` | `vec0(embedding bit[4096])` — Hamming distance |
|
| 142 |
+
| `vec_documents_int8` | `vec0(embedding int8[4096] distance_metric=cosine)` |
|
| 143 |
+
| `vec_documents_float` | `vec0(embedding float[4096] distance_metric=cosine)` |
|
| 144 |
+
| `vec_queries_{binary,int8,float}` | the same three precisions for the query side |
|
| 145 |
+
|
| 146 |
+
### How the embeddings were produced
|
| 147 |
+
|
| 148 |
+
Document and query embeddings were computed once, ahead of time, with **Qwen3-Embedding-8B**
|
| 149 |
+
served over a remote embedding API, and stored in the index as float32. Documents are embedded
|
| 150 |
+
as `"<title>\n\n<text>"`, using BEIR's `title` and `text` fields; documents without a title use
|
| 151 |
+
the text alone. Queries are embedded from their query text. The same concatenated string is what
|
| 152 |
+
is stored in `documents.payload` and indexed by FTS5, so the lexical and semantic sides of an
|
| 153 |
+
index see identical text.
|
| 154 |
+
|
| 155 |
+
The int8 and binary representations are **derived inside SQLite** by `sqlite-vec` at index
|
| 156 |
+
time (`vec_quantize_int8(vec_normalize(...), 'unit')` and `vec_quantize_binary(...)`), never in
|
| 157 |
+
NumPy — so the stored quantization is exactly what a re-index of the same float vectors would
|
| 158 |
+
produce. A 4096-dim vector occupies 16 KB at float32, 4 KB at int8, and 512 bytes binarized.
|
| 159 |
+
|
| 160 |
+
Note that these are **independently recomputed** embeddings, not the ones behind the MTEB
|
| 161 |
+
leaderboard entry for the same model. The two are compared in the paper but do not come from
|
| 162 |
+
the same pipeline.
|
| 163 |
+
|
| 164 |
+
## The qrels
|
| 165 |
+
|
| 166 |
+
BEIR ships qrels as a TSV with a `query-id / corpus-id / score` header. Each file here is the
|
| 167 |
+
TREC-format conversion produced by
|
| 168 |
+
[`scripts/datasets/beir/convert_qrels_to_trec.py`](https://github.com/breuert/scrydb-eval/blob/main/scripts/datasets/beir/convert_qrels_to_trec.py),
|
| 169 |
+
which inserts the constant iteration column TREC tools expect:
|
| 170 |
+
|
| 171 |
+
```
|
| 172 |
+
query-id <TAB> 0 <TAB> corpus-id <TAB> relevance
|
| 173 |
+
```
|
| 174 |
+
|
| 175 |
+
Relevance grades are unchanged from BEIR (binary for most datasets; graded 0–2 for NFCorpus,
|
| 176 |
+
TREC-COVID, and Touché). Only the **test** split is used in the paper; the train/dev splits
|
| 177 |
+
that BEIR provides for FiQA, NFCorpus, SciFact, and Quora are included for convenience.
|
| 178 |
+
|
| 179 |
+
## The runs
|
| 180 |
+
|
| 181 |
+
104 TREC run files, `runs/<dataset>-<method>.txt`, six whitespace-separated columns:
|
| 182 |
+
|
| 183 |
+
```
|
| 184 |
+
qid Q0 docid rank score run
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
Each holds up to **1000 documents per query**. BM25-first runs can be shorter than 1000 for a
|
| 188 |
+
given query, since FTS5 only returns documents that actually match a query term.
|
| 189 |
+
|
| 190 |
+
### Methods
|
| 191 |
+
|
| 192 |
+
The thirteen configurations map one-to-one onto `scrydb`'s `mode=` / `precision=` / `rerank=`
|
| 193 |
+
vocabulary. All were generated with `top_k=1000`, `rerank_depth=1000`, `candidate_limit=1000`,
|
| 194 |
+
and RRF's default `rrf_k=60`.
|
| 195 |
+
|
| 196 |
+
| Run suffix | Method | `batch_search(...)` |
|
| 197 |
+
| :--------- | :----- | :------------------ |
|
| 198 |
+
| `-bm25` | BM25 | `mode="lexical"` |
|
| 199 |
+
| `-bm25-hamming` | BM25 + Hamming | `mode="lexical", rerank="binary"` |
|
| 200 |
+
| `-bm25-cosine_int8` | BM25 + cos<sub>int8</sub> | `mode="lexical", rerank="int8"` |
|
| 201 |
+
| `-bm25-cosine_float` | BM25 + cos<sub>float</sub> | `mode="lexical", rerank="float"` |
|
| 202 |
+
| `-hamming` | Hamming | `mode="semantic", precision="binary"` |
|
| 203 |
+
| `-hamming-cosine_int8` | Hamming + cos<sub>int8</sub> | `mode="semantic", precision="binary", rerank="int8"` |
|
| 204 |
+
| `-hamming-cosine_float` | Hamming + cos<sub>float</sub> | `mode="semantic", precision="binary", rerank="float"` |
|
| 205 |
+
| `-cosine_int8` | cos<sub>int8</sub> | `mode="semantic", precision="int8"` |
|
| 206 |
+
| `-cosine_int8-cosine_float` | cos<sub>int8</sub> + cos<sub>float</sub> | `mode="semantic", precision="int8", rerank="float"` |
|
| 207 |
+
| `-cosine_float` | cos<sub>float</sub> | `mode="semantic", precision="float"` |
|
| 208 |
+
| `-rrf-hamming` | RRF(Hamming) | `mode="hybrid", precision="binary"` |
|
| 209 |
+
| `-rrf-cosine_int8` | RRF(cos<sub>int8</sub>) | `mode="hybrid", precision="int8"` |
|
| 210 |
+
| `-rrf-cosine_float` | RRF(cos<sub>float</sub>) | `mode="hybrid", precision="float"` |
|
| 211 |
+
|
| 212 |
+
### The score column
|
| 213 |
+
|
| 214 |
+
Every ranker reports **higher-is-better**, but the quantity differs by method — worth knowing
|
| 215 |
+
if you compare scores across runs rather than just ranks:
|
| 216 |
+
|
| 217 |
+
| Method family | Score column holds |
|
| 218 |
+
| :------------ | :----------------- |
|
| 219 |
+
| BM25 | negated FTS5 `bm25()` |
|
| 220 |
+
| Hamming | **negative Hamming distance** (e.g. `-1005`) |
|
| 221 |
+
| cos<sub>int8</sub>, cos<sub>float</sub> | cosine similarity in `[-1, 1]` |
|
| 222 |
+
| any `+ rerank` | the **rerank stage's** score, not the first stage's |
|
| 223 |
+
| RRF | the fused reciprocal-rank score (≤ `2/(60+1)`) |
|
| 224 |
+
|
| 225 |
+
### Self-matches
|
| 226 |
+
|
| 227 |
+
> [!IMPORTANT]
|
| 228 |
+
> To reproduce the published numbers, self-matches must be removed from the runs first. It changes ArguAna substantially (0.514 → 0.724
|
| 229 |
+
> nDCG@10 for cos<sub>float</sub>) and is otherwise near-inconsequential.
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
BEIR draws some datasets' queries from the corpus itself, so a query's own document can be
|
| 234 |
+
retrieved for it. BEIR's reference implementation never scores that document, and the MTEB
|
| 235 |
+
baseline inherits that exclusion. **The run files here are unfiltered** — they contain the
|
| 236 |
+
self-match — and `effectiveness.py` strips it at evaluation time. Of the eight datasets only
|
| 237 |
+
ArguAna is materially affected (the self-match takes rank 1 for 91% of its queries; excluding
|
| 238 |
+
it raises cos<sub>float</sub> from 0.514 to 0.724 nDCG@10), with a further 9 incidental id
|
| 239 |
+
collisions on FiQA and none elsewhere. Filtering is a one-liner if you evaluate outside the
|
| 240 |
+
provided code:
|
| 241 |
+
|
| 242 |
+
```python
|
| 243 |
+
lines = (l for l in open(run) if l.split()[0] != l.split()[2])
|
| 244 |
+
```
|
| 245 |
+
|
| 246 |
+
## Reproducing the evaluation
|
| 247 |
+
|
| 248 |
+
The full protocol lives in [`scrydb-eval`](https://github.com/breuert/scrydb-eval), which also
|
| 249 |
+
carries the resulting CSVs, LaTeX/Markdown tables, and plots:
|
| 250 |
+
|
| 251 |
+
```bash
|
| 252 |
+
git clone https://github.com/breuert/scrydb-eval && cd scrydb-eval
|
| 253 |
+
|
| 254 |
+
python scripts/evaluation/effectiveness.py # AP, RR, P@10, nDCG@10 vs. the MTEB baseline
|
| 255 |
+
python scripts/evaluation/efficiency.py --n-queries 10 --n-reps 10 # query latency
|
| 256 |
+
```
|
| 257 |
+
|
| 258 |
+
Effectiveness is computed from `runs/` + `qrels/` alone, so it reproduces without downloading
|
| 259 |
+
the 27 GB of indices. Efficiency re-times queries against the indices and therefore needs them.
|
| 260 |
+
|
| 261 |
+
### Results
|
| 262 |
+
|
| 263 |
+
Retrieval effectiveness (nDCG@10). Best score per row in **bold**, second-best *italicised*;
|
| 264 |
+
tied methods share the mark, with ties determined by the unrounded scores.
|
| 265 |
+
|
| 266 |
+
| Dataset | Measure | BM25 | BM25 + Hamming | BM25 + cos<sub>int8</sub> | BM25 + cos<sub>float</sub> | Hamming | Hamming + cos<sub>int8</sub> | Hamming + cos<sub>float</sub> | cos<sub>int8</sub> | cos<sub>int8</sub> + cos<sub>float</sub> | cos<sub>float</sub> | RRF(Hamming) | RRF(cos<sub>int8</sub>) | RRF(cos<sub>float</sub>) | MTEB (Qwen3-8B) |
|
| 267 |
+
| :------- | :------ | ----: | -------------: | ------------------------: | -------------------------: | ------: | ---------------------------: | ----------------------------: | -----------------: | ---------------------------------------: | ------------------: | -----------: | ----------------------: | -----------------------: | --------------: |
|
| 268 |
+
| ArguAna | nDCG@10 | 0.486 | 0.717 | 0.723 | *0.724* | 0.717 | 0.723 | 0.724 | 0.723 | 0.724 | 0.724 | 0.627 | 0.629 | 0.630 | **0.769** |
|
| 269 |
+
| FiQA | nDCG@10 | 0.247 | 0.592 | 0.600 | 0.598 | 0.635 | **0.649** | 0.645 | **0.649** | 0.645 | 0.645 | 0.446 | 0.454 | 0.453 | *0.646* |
|
| 270 |
+
| NFCorpus | nDCG@10 | 0.323 | 0.388 | 0.384 | 0.386 | 0.406 | 0.406 | *0.410* | 0.406 | *0.410* | *0.410* | 0.389 | 0.391 | 0.389 | **0.414** |
|
| 271 |
+
| Quora | nDCG@10 | 0.801 | 0.891 | *0.892* | **0.892** | 0.889 | 0.890 | 0.890 | 0.890 | 0.890 | 0.890 | 0.878 | 0.878 | 0.878 | 0.889 |
|
| 272 |
+
| SciDocs | nDCG@10 | 0.157 | 0.300 | 0.308 | 0.308 | 0.309 | *0.320* | 0.320 | *0.320* | 0.320 | 0.320 | 0.238 | 0.241 | 0.239 | **0.327** |
|
| 273 |
+
| SciFact | nDCG@10 | 0.681 | 0.782 | 0.786 | *0.787* | 0.783 | 0.786 | **0.787** | 0.786 | **0.787** | **0.787** | 0.754 | 0.760 | 0.759 | 0.785 |
|
| 274 |
+
| Touché | nDCG@10 | 0.322 | 0.333 | 0.362 | 0.361 | 0.329 | 0.360 | 0.360 | 0.360 | 0.360 | 0.360 | 0.394 | *0.407* | **0.414** | 0.359 |
|
| 275 |
+
| TREC-COVID | nDCG@10 | 0.605 | 0.879 | 0.884 | 0.879 | 0.876 | *0.895* | 0.885 | *0.895* | 0.885 | 0.885 | 0.847 | 0.853 | 0.850 | **0.950** |
|
| 276 |
+
|
| 277 |
+
Mean query latency (ms), with corpus size and mean query length (words, over the queries timed
|
| 278 |
+
for that row). Fastest method per row in **bold**, second-fastest *italicised*.
|
| 279 |
+
|
| 280 |
+
| Dataset | Size | Query Length | BM25 | BM25 + Hamming | BM25 + cos<sub>int8</sub> | BM25 + cos<sub>float</sub> | Hamming | Hamming + cos<sub>int8</sub> | Hamming + cos<sub>float</sub> | cos<sub>int8</sub> | cos<sub>int8</sub> + cos<sub>float</sub> | cos<sub>float</sub> | RRF(Hamming) | RRF(cos<sub>int8</sub>) | RRF(cos<sub>float</sub>) |
|
| 281 |
+
| :--------- | ----: | -----------: | ------: | -------------: | ------------------------: | -------------------------: | -------: | ---------------------------: | ----------------------------: | -----------------: | ---------------------------------------: | ------------------: | -----------: | ----------------------: | -----------------------: |
|
| 282 |
+
| ArguAna | 8.67K | 181.4 | 566.8 | 573.6 | 584.5 | 612.3 | **1.9** | *10.4* | 38.7 | 40.0 | 91.3 | 71.7 | 574.7 | 626.9 | 712.7 |
|
| 283 |
+
| FiQA | 57K | 11.0 | *53.1* | 70.7 | 112.6 | 310.7 | **9.8** | 58.5 | 261.3 | 304.9 | 547.8 | 484.1 | 74.7 | 360.3 | 543.6 |
|
| 284 |
+
| NFCorpus | 3.6K | 3.9 | **1.4** | 5.2 | 10.3 | 21.4 | *2.3* | 6.9 | 20.3 | 22.2 | 39.6 | 34.3 | 4.2 | 24.0 | 37.2 |
|
| 285 |
+
| Quora | 523K | 9.9 | *228.7* | 324.7 | 670.9 | 5293.5 | **81.5** | 560.6 | 6034.1 | 2971.0 | 9073.1 | 7294.8 | 397.4 | 3160.0 | 7669.6 |
|
| 286 |
+
| SciDocs | 25K | 10.0 | 38.0 | 48.7 | 76.5 | 167.7 | **6.7** | *35.4* | 135.6 | 156.1 | 264.3 | 231.2 | 42.7 | 185.1 | 264.7 |
|
| 287 |
+
| SciFact | 5K | 12.6 | *8.2* | 12.8 | 20.1 | 40.8 | **3.0** | 9.4 | 30.0 | 31.9 | 59.1 | 51.3 | 13.1 | 42.2 | 60.8 |
|
| 288 |
+
| Touché | 382K | 6.3 | 436.5 | 538.2 | 933.9 | 3635.6 | **53.7** | 449.8 | 4532.4 | 2097.8 | 9138.4 | 6259.0 | *423.5* | 2225.4 | 5325.8 |
|
| 289 |
+
| TREC-COVID | 171K | 9.5 | 211.6 | 253.4 | 392.2 | 1020.3 | **24.4** | *184.6* | 812.7 | 955.8 | 1748.2 | 1558.4 | 273.2 | 1172.8 | 2174.9 |
|
| 290 |
+
| **Mean** | -- | -- | 193.0 | 228.4 | 350.1 | 1387.8 | **22.9** | *164.5* | 1483.1 | 822.5 | 2620.2 | 1998.1 | 225.4 | 974.6 | 2098.7 |
|
| 291 |
+
|
| 292 |
+
Latencies were measured on a single consumer machine: an Apple MacBook Air (Mac14,15), M2
|
| 293 |
+
SoC (4 performance + 4 efficiency cores, ARM64), 24 GB unified memory, macOS 26.5.2, no
|
| 294 |
+
GPU involved. Each timed call goes through a stored query id, so it reuses the precomputed
|
| 295 |
+
query embedding and measures database-side retrieval cost only, excluding model inference.
|
| 296 |
+
One untimed warm-up call precedes each query's timed repetitions; queries, not repetitions,
|
| 297 |
+
are the sampling unit for all reported statistics.
|
| 298 |
+
|
| 299 |
+
## Limitations and intended use
|
| 300 |
+
|
| 301 |
+
- **Not a corpus release.** These are derived artifacts. The BEIR corpora themselves are
|
| 302 |
+
distributed by their original authors; use [BEIR](https://github.com/beir-cellar/beir) or
|
| 303 |
+
the [`BeIR`](https://huggingface.co/BeIR) collections if you need the raw text under its own
|
| 304 |
+
terms. The artifacts in this repository are derived from the BEIR benchmark, and the underlying corpora remain under their original per-dataset licenses and terms of use, which are listed in the [BEIR repository](https://github.com/beir-cellar/beir) and in each dataset's source publication. The `scrydb` library itself is MIT-licensed.
|
| 305 |
+
- **Embeddings are model- and pipeline-specific.** Every semantic result here is conditional
|
| 306 |
+
on Qwen3-Embedding-8B and on the prompt formatting described above. Numbers are not directly
|
| 307 |
+
comparable to leaderboard entries computed with a different pipeline, even for the same model.
|
| 308 |
+
- **Exhaustive, not approximate.** `scrydb` scans the whole collection; there is no ANN index.
|
| 309 |
+
Latency scales linearly with corpus size, which is practical up to a few million documents
|
| 310 |
+
on commodity hardware and impractical well beyond that.
|
| 311 |
+
|
| 312 |
+
## Citation
|
| 313 |
+
|
| 314 |
+
```bibtex
|
| 315 |
+
@misc{scrydb2026,
|
| 316 |
+
title={SQLite is Enough. Lexical, Semantic, and Hybrid Search with scrydb},
|
| 317 |
+
author={Timo Breuer},
|
| 318 |
+
year={2026},
|
| 319 |
+
eprint={2608.24060},
|
| 320 |
+
archivePrefix={arXiv},
|
| 321 |
+
primaryClass={cs.IR},
|
| 322 |
+
url={https://arxiv.org/abs/2608.24060}
|
| 323 |
+
}
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
Please also cite BEIR, the individual test collections, and the Qwen3 Embedding article if you use any of the resources:
|
| 327 |
+
|
| 328 |
+
```bibtex
|
| 329 |
+
@inproceedings{thakur2021beir,
|
| 330 |
+
title={{BEIR}: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models},
|
| 331 |
+
author={Nandan Thakur and Nils Reimers and Andreas R{\"u}ckl{\'e} and Abhishek Srivastava and Iryna Gurevych},
|
| 332 |
+
booktitle={Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2)},
|
| 333 |
+
year={2021},
|
| 334 |
+
url={https://openreview.net/forum?id=wCu6T5xFjeJ}
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
@article{qwen3embedding,
|
| 338 |
+
title={Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models},
|
| 339 |
+
author={Zhang, Yanzhao and Li, Mingxin and Long, Dingkun and Zhang, Xin and Lin, Huan and Yang, Baosong and Xie, Pengjun and Yang, An and Liu, Dayiheng and Lin, Junyang and Huang, Fei and Zhou, Jingren},
|
| 340 |
+
journal={arXiv preprint arXiv:2506.05176},
|
| 341 |
+
year={2025}
|
| 342 |
+
}
|
| 343 |
+
```
|