Multi-index Retrieval across Knowledge Bases with Agentic multi-turn search.
The Knowledge Retrieval service searches one or more Knowledge Bases for relevant content from your private corpus. Create and configure retrieval services in the console, or call them through the API.
The following parameters apply to all bound Knowledge Bases:
Expand a bound Knowledge Base's configuration panel to tune its retrieval parameters independently:
Use the knowledge search endpoint:
The returned
After Wiki is enabled in a Flagship Knowledge Base, the system automatically provides two retrieval services: Chunk retrieval (created with the Knowledge Base) and Wiki retrieval (created when Wiki is enabled). Both are published on creation. Wiki retrieval returns topic-oriented Wiki Pages with source information. See Wiki and Ontology Knowledge Graph.
Capabilities
| Capability | Description |
|---|---|
| Multi-index Retrieval | Search up to 15 Knowledge Bases in one call — no need to query each separately. |
| Hybrid retrieval | Vector search + keyword search + Rerank in a single pipeline. |
| Fine-grained config | Per-Knowledge-Base recall counts, Rerank model, and similarity threshold. |
| Multimodal | Text, image, and table search. |
| Agentic multi-turn | Model-driven multi-step planning with automatic query rewrites. |
Retrieval pipeline
- Query rewriting (optional): rewrite the user input to improve recall.
- Vector + keyword retrieval: recall Chunks by semantic similarity and keyword matching in parallel.
- Rerank: a ranking model re-sorts the recalled Chunks and filters low-scoring ones.
- Return results: after reranking, the original semantic scores are weighted, and Chunks are returned in descending order of weighted score.
Create a retrieval service
1
Open Knowledge Retrieval
Sign in to the console and click Knowledge Retrieval in the left navigation.
2
Create a service
Click Create Retrieval Service in the top right. Enter a Service Name (required, up to 40 characters) and a Description (optional, up to 200 characters), then click Confirm.
3
Bind Knowledge Bases
On the configuration page, click + Add to bind one or more Knowledge Bases (up to 15). Set a weight for each Knowledge Base: a higher weight prioritizes its results in the final ranking.
4
Configure parameters
Set the global retrieval parameters described below. To configure independent parameters for a Knowledge Base, click its Settings icon to expand the configuration panel.
5
Test retrieval
Enter a query in the chat window on the right to view the returned Chunks, including similarity scores, source documents, and retrieval latency.
6
Publish
Click Publish in the top right. After publishing, the retrieval service is callable through the API.
- At least one Knowledge Base must exist and contain successfully parsed documents.
- For multi-Knowledge-Base retrieval, all Knowledge Bases must reside in the same workspace.
Global retrieval config
The following parameters apply to all bound Knowledge Bases:
| Parameter | Valid range | Description |
|---|---|---|
| Knowledge-Base routing | On / Off | Automatically determines which Knowledge Bases to query based on retrieval intent. Routing uses an LLM and incurs model invocation fees. |
| Rerank model | qwen3-rerank / qwen3-rerank-hybrid / qwen3-vl-rerank / No model | Uses a model to rank results across Knowledge Bases. Without a model, each Knowledge Base ranks its results independently. Select the qwen3-rerank series for text-only Knowledge Bases or qwen3-vl-rerank for multimodal Knowledge Bases. |
| Rerank mode | Q&A Mode / Similarity Mode / Custom Advanced Mode | Q&A Mode prioritizes Chunks likely to answer the query. Similarity Mode ranks by semantic similarity. Custom Advanced Mode allows custom intervention in the reranking model. |
| Max results | 1–20 | Total number of Chunks returned after reranking. |
Per-Knowledge-Base config
Expand a bound Knowledge Base's configuration panel to tune its retrieval parameters independently:
| Parameter | Valid range | Description |
|---|---|---|
| Query rewriting | On / Off | Rewrites and optimizes the input query to improve retrieval. |
| Initial vector retrieval TopK | 1–100 | Number of Chunks initially recalled by vector retrieval. |
| Initial keyword retrieval TopK | 1–100 | Number of Chunks initially recalled by keyword retrieval. |
| Rerank model | qwen3-rerank, etc. / No model | Independently ranks this Knowledge Base's recalled results. |
| Rerank mode | Q&A Mode / Similarity Mode | Ranks by Q&A matching score or semantic similarity. Available only when a reranking model is selected. |
| Similarity threshold | 0.01–1.0 | Filters out Chunks scoring below the threshold after reranking. Higher values improve precision but may exclude relevant content. |
| Max results | 1–20 | Number of Chunks returned from this Knowledge Base after reranking. |
| Tag filtering | — | Filters retrieval by document tags. Enter a tag and press Enter, or select an existing tag from the dropdown. |
Retrieval modes
| Mode | How it works | Latency | Best for |
|---|---|---|---|
| Fast Mode | Single-pass retrieval. | Lowest. | Simple factual questions. |
| Multi-turn Agentic Mode | Model-driven multi-step planning with automatic query rewrites. | Higher. | Complex questions, multi-step reasoning. |
API calls
Use the knowledge search endpoint:
nodes array contains the matched Chunks with text, relevance score, and source metadata.
agent_id is the ID of a published retrieval service (for example, aid-xxxxxxxxxxxxxxxx), not a Knowledge Base ID. Configure and publish result counts, routing, and reranking in the service; this example does not require index_id, top_k, or a reranking model in the request. Calling an unpublished service returns an Agent not published error.