Document index corpus binding and pinned encoder
Browse files- README.md +13 -1
- index/index-metadata.json +33 -0
README.md
CHANGED
|
@@ -20,7 +20,7 @@ configs:
|
|
| 20 |
本仓库用于服务 ToolElite 的 search 工具,为多轮数学推理提供外部知识检索。
|
| 21 |
内容为数学百科知识、概念、背景与相关常识。
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
## Corpus 格式
|
| 26 |
|
|
@@ -52,3 +52,15 @@ python -m toolelite.retrieval.general.build_index \
|
|
| 52 |
|
| 53 |
来自本地数学 Wikipedia 抓取快照;25 个原始 JSON 的 `link` 保留文章 URL,页面历史可用于作者归属。原始下载地址和抓取时间未记录。处理后文本遵循 Wikipedia 的 CC BY-SA 4.0 归属与相同方式共享要求;本文与原始链接一并保留归属。[Wikimedia 条款](https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use)。
|
| 54 |
清洗、移除标记及按片段切分会改变原文本;详见仓库处理脚本。此数据库不保证所有陈述无误,检索结果需结合推理核实。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
本仓库用于服务 ToolElite 的 search 工具,为多轮数学推理提供外部知识检索。
|
| 21 |
内容为数学百科知识、概念、背景与相关常识。
|
| 22 |
|
| 23 |
+
本仓库包含 **corpus、原始数据、构建脚本和预构建 FAISS 索引**;检索编码器使用固定版本的 intfloat/e5-base-v2。
|
| 24 |
|
| 25 |
## Corpus 格式
|
| 26 |
|
|
|
|
| 52 |
|
| 53 |
来自本地数学 Wikipedia 抓取快照;25 个原始 JSON 的 `link` 保留文章 URL,页面历史可用于作者归属。原始下载地址和抓取时间未记录。处理后文本遵循 Wikipedia 的 CC BY-SA 4.0 归属与相同方式共享要求;本文与原始链接一并保留归属。[Wikimedia 条款](https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use)。
|
| 54 |
清洗、移除标记及按片段切分会改变原文本;详见仓库处理脚本。此数据库不保证所有陈述无误,检索结果需结合推理核实。
|
| 55 |
+
|
| 56 |
+
## 预构建 General Search 索引
|
| 57 |
+
|
| 58 |
+
`index/e5_Flat.index` 为 ToolElite 原有完整索引,共 **573,011** 个 **768** 维向量,类型 `IndexFlatIP`,使用 inner-product 检索。
|
| 59 |
+
|
| 60 |
+
索引与本仓库 `search_r1_corpus.jsonl` 的行顺序绑定,编码器固定为 `intfloat/e5-base-v2` 的 `f52bf8ec8c7124536f0efb74aca902b2995e5bcd`。文件 SHA256、大小、核验边界见 `index/index-metadata.json`。不要替换或重排 corpus 后继续使用该索引。
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
hf download BitZone910/wiki_math index/e5_Flat.index index/index-metadata.json search_r1_corpus.jsonl --repo-type dataset --local-dir wiki_math
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
恢复到 ToolElite 的外部资产目录时,将索引放到 `assets/retrieval/general_search/index/e5_Flat.index`,corpus 放到 `assets/retrieval/general_search/corpus/search_r1_corpus.jsonl`。索引以原样上传,不重复上传编码器权重。
|
index/index-metadata.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "toolelite.general-search.index-publication.v1",
|
| 3 |
+
"index": {
|
| 4 |
+
"path": "index/e5_Flat.index",
|
| 5 |
+
"sha256": "09bf053b50922ad283620b4fdf84b4ab37e824a7cfd7cfb61e310c8452d7afb0",
|
| 6 |
+
"bytes": 1760289837,
|
| 7 |
+
"type": "IndexFlatIP",
|
| 8 |
+
"dimension": 768,
|
| 9 |
+
"vectors": 573011,
|
| 10 |
+
"metric": "inner_product"
|
| 11 |
+
},
|
| 12 |
+
"corpus": {
|
| 13 |
+
"path": "search_r1_corpus.jsonl",
|
| 14 |
+
"sha256": "741affc0363d4bad7e8871559dd6f849d5b19fd73a99e0124c100974c64255a7",
|
| 15 |
+
"bytes": 443937190,
|
| 16 |
+
"rows": 573011,
|
| 17 |
+
"verified_revision": "bf033451c01191bf056c80a7592621423a65628c",
|
| 18 |
+
"id_order": "zero_based_sequential_string"
|
| 19 |
+
},
|
| 20 |
+
"encoder": {
|
| 21 |
+
"repo_id": "intfloat/e5-base-v2",
|
| 22 |
+
"revision": "f52bf8ec8c7124536f0efb74aca902b2995e5bcd"
|
| 23 |
+
},
|
| 24 |
+
"project_encoder_contract": {
|
| 25 |
+
"query_prefix": "query: ",
|
| 26 |
+
"passage_prefix": "passage: ",
|
| 27 |
+
"pooling": "attention_mask_mean",
|
| 28 |
+
"l2_normalized": true,
|
| 29 |
+
"default_max_length": 256
|
| 30 |
+
},
|
| 31 |
+
"verification": "Existing binary uploaded unchanged; SHA256, index shape/metric and corpus row count/order checked. Embeddings were not regenerated; historical build max_length/device are not independently recorded.",
|
| 32 |
+
"published_at": "2026-10-09T10:12:17.233790+00:00"
|
| 33 |
+
}
|