Skip to content

Commit e5806ea

Browse files
authored
docs(config): update rerank configuration and add threshold range (#1138)
- Correct the rerank provider list (from 'volcengine' to 'vikingdb') - Update authentication fields (from 'api_key' to 'ak'/'sk' for vikingdb) - Add 'cohere', 'openai', and 'litellm' as supported rerank providers - Include numeric range (0.0 to 1.0) for the threshold parameter - Add Pydantic range validation for the threshold field in rerank_config.py
1 parent fe778d8 commit e5806ea

File tree

2 files changed

+73
-39
lines changed

2 files changed

+73
-39
lines changed

docs/en/guides/01-configuration.md

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,32 @@ Create `~/.openviking/ov.conf` in your project directory:
88

99
```json
1010
{
11+
"storage": {
12+
"workspace": "./data",
13+
"vectordb": {
14+
"name": "context",
15+
"backend": "local"
16+
},
17+
"agfs": {
18+
"port": 1833,
19+
"log_level": "warn",
20+
"backend": "local"
21+
}
22+
},
1123
"embedding": {
1224
"dense": {
13-
"provider": "volcengine",
14-
"api_key": "your-api-key",
15-
"model": "doubao-embedding-vision-250615",
16-
"dimension": 1024
25+
"api_base" : "<api-endpoint>",
26+
"api_key" : "<your-api-key>",
27+
"provider" : "<provider-type>",
28+
"dimension": 1024,
29+
"model" : "<model-name>"
1730
}
1831
},
1932
"vlm": {
20-
"provider": "volcengine",
21-
"api_key": "your-api-key",
22-
"model": "doubao-seed-2-0-pro-260215"
23-
},
24-
"rerank": {
25-
"provider": "volcengine",
26-
"api_key": "your-api-key",
27-
"model": "doubao-rerank-250615"
28-
},
29-
"storage": {
30-
"workspace": "./data",
31-
"agfs": { "backend": "local" },
32-
"vectordb": { "backend": "local" }
33+
"api_base" : "<api-endpoint>",
34+
"api_key" : "<your-api-key>",
35+
"provider" : "<provider-type>",
36+
"model" : "<model-name>"
3337
}
3438
}
3539
```
@@ -500,39 +504,54 @@ See [Code Skeleton Extraction](../concepts/06-extraction.md#code-skeleton-extrac
500504

501505
### rerank
502506

503-
Reranking model for search result refinement.
507+
Reranking model for search result refinement. Supports VikingDB (Volcengine), Cohere, OpenAI-compatible APIs, and LiteLLM.
508+
509+
**Volcengine (VikingDB):**
504510

505511
```json
506512
{
507513
"rerank": {
508-
"provider": "volcengine",
509-
"api_key": "your-api-key",
510-
"model": "doubao-rerank-250615"
514+
"provider": "vikingdb",
515+
"ak": "your-access-key",
516+
"sk": "your-secret-key",
517+
"model_name": "doubao-seed-rerank",
518+
"model_version": "251028"
511519
}
512520
}
513521
```
514522

515-
**OpenAI-compatible provider (e.g. DashScope qwen3-rerank):**
523+
**OpenAI-compatible provider (e.g. DashScope):**
516524

517525
```json
518526
{
519527
"rerank": {
520528
"provider": "openai",
521529
"api_key": "your-api-key",
522530
"api_base": "https://dashscope.aliyuncs.com/compatible-api/v1/reranks",
523-
"model": "qwen3-rerank",
531+
"model": "qwen3-vl-rerank",
524532
"threshold": 0.1
525533
}
526534
}
527535
```
528536

537+
**Parameters**
538+
529539
| Parameter | Type | Description |
530540
|-----------|------|-------------|
531-
| `provider` | str | `"volcengine"` or `"openai"` |
532-
| `api_key` | str | API key |
533-
| `model` | str | Model name |
534-
| `api_base` | str | Endpoint URL (openai provider only) |
535-
| `threshold` | float | Score threshold; results below this are filtered out. Default: `0.1` |
541+
| `provider` | str | `"vikingdb"`, `"cohere"`, `"openai"`, or `"litellm"`. Auto-detected if omitted. |
542+
| `ak` | str | VikingDB Access Key (vikingdb provider only) |
543+
| `sk` | str | VikingDB Secret Key (vikingdb provider only) |
544+
| `model_name` | str | Model name (vikingdb provider only, default: `doubao-seed-rerank`) |
545+
| `api_key` | str | API key (for `openai`, `cohere`, or `litellm` providers) |
546+
| `api_base` | str | Endpoint URL (for `openai` provider) |
547+
| `model` | str | Model name (for `openai` or `litellm` providers) |
548+
| `threshold` | float | Score threshold between `0.0` and `1.0`; results below this are filtered out. Default: `0.1` |
549+
550+
**Supported providers:**
551+
- `vikingdb`: Volcengine VikingDB Rerank API (uses AK/SK)
552+
- `cohere`: Cohere Rerank API
553+
- `openai`: OpenAI-compatible Rerank API
554+
- `litellm`: Rerank services via LiteLLM (requires `litellm` package)
536555

537556
If rerank is not configured, search uses vector similarity only.
538557

docs/zh/guides/01-configuration.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -475,39 +475,54 @@ AST 提取支持:Python、JavaScript/TypeScript、Rust、Go、Java、C/C++。
475475

476476
### rerank
477477

478-
用于搜索结果精排的 Rerank 模型。
478+
用于搜索结果精排的 Rerank 模型。支持 VikingDB (火山引擎)、Cohere、OpenAI 兼容接口和 LiteLLM。
479+
480+
**火山引擎 (VikingDB):**
479481

480482
```json
481483
{
482484
"rerank": {
483-
"provider": "volcengine",
484-
"api_key": "your-api-key",
485-
"model": "doubao-rerank-250615"
485+
"provider": "vikingdb",
486+
"ak": "your-access-key",
487+
"sk": "your-secret-key",
488+
"model_name": "doubao-seed-rerank",
489+
"model_version": "251028"
486490
}
487491
}
488492
```
489493

490-
**OpenAI 兼容提供方如 DashScope qwen3-rerank):**
494+
**OpenAI 兼容提供方 (如 DashScope):**
491495

492496
```json
493497
{
494498
"rerank": {
495499
"provider": "openai",
496500
"api_key": "your-api-key",
497501
"api_base": "https://dashscope.aliyuncs.com/compatible-api/v1/reranks",
498-
"model": "qwen3-rerank",
502+
"model": "qwen3-vl-rerank",
499503
"threshold": 0.1
500504
}
501505
}
502506
```
503507

508+
**参数**
509+
504510
| 参数 | 类型 | 说明 |
505511
|------|------|------|
506-
| `provider` | str | `"volcengine"``"openai"` |
507-
| `api_key` | str | API Key |
508-
| `model` | str | 模型名称 |
509-
| `api_base` | str | 接口地址(openai 提供方专用) |
510-
| `threshold` | float | 分数阈值,低于此值的结果会被过滤。默认:`0.1` |
512+
| `provider` | str | `"vikingdb"``"cohere"``"openai"``"litellm"`。省略时基于字段自动识别。 |
513+
| `ak` | str | VikingDB Access Key(仅 `vikingdb` 提供方使用) |
514+
| `sk` | str | VikingDB Secret Key(仅 `vikingdb` 提供方使用) |
515+
| `model_name` | str | 模型名称(仅 `vikingdb` 提供方使用,默认:`doubao-seed-rerank`|
516+
| `api_key` | str | API Key(用于 `openai``cohere``litellm` 提供方) |
517+
| `api_base` | str | 接口地址(用于 `openai` 提供方) |
518+
| `model` | str | 模型名称(用于 `openai``litellm` 提供方) |
519+
| `threshold` | float | 分数阈值,范围为 `0.0``1.0`。低于此值的结果会被过滤。默认:`0.1` |
520+
521+
**支持的提供方:**
522+
- `vikingdb`: 火山引擎 VikingDB Rerank API (使用 AK/SK)
523+
- `cohere`: Cohere Rerank API
524+
- `openai`: OpenAI 兼容的 Rerank 接口
525+
- `litellm`: 通过 LiteLLM 调用的 Rerank 服务 (需安装 `litellm`)
511526

512527
如果未配置 Rerank,搜索仅使用向量相似度。
513528

0 commit comments

Comments
 (0)