--- 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. ## 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 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.