v50

latestSwagger 2.0raw.githubusercontent.com2026-08-07307239824.1 KB
知识库

混合搜索

在知识库中执行向量和关键词混合搜索。推荐使用 POST;GET 携带 JSON 请求体仍受支持(兼容旧客户端)。

post/knowledge-bases/{id}/hybrid-search

Path parameters

idstring required

知识库ID

Request body

disable_keywords_matchboolean
disable_vector_matchboolean
keyword_thresholdnumber
knowledge_base_idsstring[]

KnowledgeBaseIDs overrides the single KB ID passed to HybridSearch, allowing a single retrieval call to span multiple KBs that share the same embedding model. When empty, HybridSearch uses its own id parameter.

knowledge_idsstring[]
match_countinteger
only_recommendedboolean
query_embeddingnumber[]
query_textstring

QueryText is required unless query_embedding is provided, keyword matching is disabled, and vector matching remains enabled.

scope_tag_idsstring[]
skip_context_enrichmentboolean

SkipContextEnrichment skips fetching parent, nearby, and relation chunks in processSearchResults. Used by the chat pipeline where context assembly is handled separately in the merge stage.

tag_idsstring[]

Tag IDs for filtering (used for FAQ priority filtering)

vector_thresholdnumber

Response

搜索结果

object required