File size: 4,993 Bytes
5844842
 
 
 
 
 
 
 
 
 
 
e638fca
5844842
 
 
 
1f91539
 
 
 
5844842
 
 
 
 
 
 
 
 
 
 
 
 
 
1f91539
5874581
5844842
 
e638fca
 
 
 
 
 
5844842
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e638fca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5844842
 
 
 
 
 
 
 
 
 
e638fca
5844842
5874581
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
pretty_name: SAR retrieval indexes and queries
tags:
- retrieval
- faiss
- rag
- qwen3-embedding
---

# SAR retrieval indexes and queries

Prebuilt Qwen3-Embedding-8B FAISS indexes and query files for four search-agent benchmarks,
laid out exactly as the `sar` (search agent research) code expects under `scratchspace/data/`.
Every index was built without a query/document instruction prefix; embeddings are last-token
pooled and L2-normalized, and the metric is inner product.

The exception is `browsecompplus/indexes/bge-large-en-v1.5/`, a `BAAI/bge-large-en-v1.5` baseline:
raw doc text (no prefix) right-truncated at 512 tokens, [CLS] pooled and L2-normalized, inner product.
Queries should use bge's query recipe ("Represent this sentence for searching relevant passages: " prefix).

## Download

From the root of the `sar` repo:

```bash
hf download ozelMetalUp/sar-data --repo-type dataset --local-dir scratchspace/data
# or just one dataset:
hf download ozelMetalUp/sar-data --repo-type dataset --local-dir scratchspace/data --include "openresearcher/*"
```

## Layout

```
browsecompplus/indexes/qwen3-8b-embedding/   flat (IndexFlatIP), 100,195 docs          ~5 GB
browsecompplus/indexes/bge-large-en-v1.5/    flat (IndexFlatIP), 100,195 docs          ~3.7 GB  (BAAI/bge-large-en-v1.5)
flashrag/indexes/qwen3-8b-embedding/         IVF32768,SQ8 (nprobe 64), 21,015,324 passages ~101 GB
flashrag/{nq,hotpotqa,2wikimultihopqa,musique,bamboogle,popqa}/{train,dev,test}.jsonl
openresearcher/indexes/qwen3-8b-embedding/   IVF32768,SQ8 (nprobe 64), 14,878,084 docs ~110 GB
openresearcher/queries/{train,dev,sft_train_queries}.jsonl
trqa/indexes/ecommerce/qwen3-8b-embedding/   flat (SQfp16), 3,282,927 docs              ~29 GB
trqa/indexes/wiki/qwen3-8b-embedding/        flat (SQfp16), 5,910,177 docs              ~52 GB
trqa/indexes/{ecommerce,wiki}/bm25/          Pyserini/Lucene BM25 over the same docs
trqa/queries/*.encrypted.jsonl               encrypted, see Sources
trqa/qrels/*.encrypted.jsonl                 encrypted, see Sources
```

Each index directory holds:
- `index.faiss`: the FAISS index; faiss id `i` is row `i` of `docids.jsonl`.
- `docids.jsonl`: one `{"docid", "text"}` row per indexed document (this is the corpus text, so
  no separate corpus download is needed to serve an index).
- `config.json`: the model and index settings the searcher reads (`index_type`, nprobe/efSearch, ...).
  `corpus_path` is informational only.

Query files are JSONL rows with `query_id`, `question`, and `golden_answers`.

## Sources

- **FlashRAG**: QA splits from `RUC-NLPIR/FlashRAG_datasets`; the index covers the FlashRAG
  Wikipedia (2018, 100-word passage) retrieval corpus.
- **OpenResearcher**: queries from `OpenResearcher/OpenResearcher-Dataset` (`seed_42`). The index
  is built from the authors' released Qwen3-Embedding-8B document encodings
  (`OpenResearcher/OpenResearcher-Indexes`, `qwen3-embedding-8b/corpus.pkl`), requantized to IVF+SQ8.
- **BrowseComp-Plus**: index over the `Tevatron/browsecomp-plus-corpus` corpus. **Queries and qrels
  are intentionally not included**: the authors distribute them encrypted to keep them out of
  training crawls. Recreate them with the `sar` scripts:

  ```bash
  BCP=scratchspace/data/browsecompplus
  uv run scripts/download_browsecompplus_dataset.py --output-dir $BCP/queries \
      --hf-cache-dir scratchspace/hf_cache_$USER
  uv run scripts/decrypt_browsecompplus_dataset.py --input $BCP/queries/test.jsonl \
      --output $BCP/queries/test.decrypted.jsonl
  mv $BCP/queries/test.decrypted.jsonl $BCP/queries/test.jsonl
  uv run scripts/split_browsecompplus_qrels.py --queries-file $BCP/queries/test.jsonl \
      --qrels-file $BCP/qrels/test.tsv
  ```

- **TRQA**: indexes over the TRQA rewritten e-commerce corpus and the rewritten Wikipedia
  (2025-10-01) partial corpus. **Queries and qrels are encrypted** (every field except `query_id`
  and `canary` is XOR'd with SHA256 of the TRQA canary string, as BrowseComp-Plus does), since the
  authors distribute them encrypted too. Decrypt them in place after downloading:

  ```bash
  for d in queries qrels; do
    uv run scripts/crypt_trqa_dataset.py decrypt \
        --input-dir scratchspace/data/trqa/$d --output-dir scratchspace/data/trqa/$d
  done
  ```

  Decrypted query rows carry `query_id`, `question`, `golden_answers` plus TRQA's original fields
  (`query`, `answer`, `gold_docs`, `negative_docs`, `evidence_docs`).

Please follow the licenses of the original datasets.

## Serving

```bash
uv run python -m sar.searcher.faiss_searcher \
    --index-dir scratchspace/data/openresearcher/indexes/qwen3-8b-embedding \
    --model Qwen/Qwen3-Embedding-8B
```

The flat BrowseComp-Plus index is moved to a GPU (as are the flat TRQA indexes, if one fits). The IVF indexes are searched on CPU and
need roughly `index.faiss + 1.9 x docids.jsonl` of host RAM (about 180 GB for OpenResearcher and
115 GB for FlashRAG); the GPU only runs the query encoder.