---
title: "检索知识库"
method: POST
path: "/api/v1/knowledge/bases/{kb_uuid}/retrieve"
tags: ["Knowledge Bases"]
---

# 检索知识库

`POST /api/v1/knowledge/bases/{kb_uuid}/retrieve`

对知识库进行语义检索，返回相关文档片段。

## Path parameters

- `kb_uuid` string, uuid, required

## Request body

- object
  - `query` string, required — 检索查询文本
  - `retrieval_settings` object — 检索参数（如 top_k 等）
    - `top_k` integer

## Response `200`

成功

- object
  - `code` integer
  - `data` object
    - `results` object[]

---

[API](https://skmtc.dev/langbot/apis/langbot-service-api.md) · [All operations](https://skmtc.dev/langbot/apis/langbot-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/langbot/langbot-service-api/revisions/2384dee8c36a/schema)
