rag_index_text
Index plain text into a specified knowledge base by chunking, embedding, and persisting it; SHA-256 content checks skip unchanged documents and atomically replace changed chunks.
Instructions
对单段纯文本内容进行切片、计算高维向量嵌入并持久化索引到指定知识库中。
支持基于 SHA-256 内容指纹校验的幂等更新:
- 若相同 title 的文档内容未变动,秒级跳过;
- 若内容发生修改,原子删除旧切片并插入新切片。
Args:
kb_name: 目标知识库名称
text: 待索引的正文纯文本内容
title: 文档标题或唯一标识(在知识库中作为 doc_id)
metadata: 可选的附加结构化元数据(标签、分类、作者等)
Returns:
dict[str, Any]: 索引执行结果状态字典
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kb_name": "<kb_name>",
"text": "<text>",
"title": "<title>"
},
"name": "rag_index_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| title | Yes | ||
| kb_name | Yes | ||
| metadata | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||