Skip to main content

Knowledge Retrieval

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.

Capabilities

CapabilityDescription
Multi-index RetrievalSearch up to 15 Knowledge Bases in one call — no need to query each separately.
Hybrid retrievalVector search + keyword search + Rerank in a single pipeline.
Fine-grained configPer-Knowledge-Base recall counts, Rerank model, and similarity threshold.
MultimodalText, image, and table search.
Agentic multi-turnModel-driven multi-step planning with automatic query rewrites.

Retrieval pipeline

  1. Query rewriting (optional): rewrite the user input to improve recall.
  2. Vector + keyword retrieval: recall Chunks by semantic similarity and keyword matching in parallel.
  3. Rerank: a ranking model re-sorts the recalled Chunks and filters low-scoring ones.
  4. Return results: the Chunk list is ordered by relevance score, highest first.

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 New Retrieval Service in the top right. Enter a name (required, up to 15 characters) and a description.
3

Bind Knowledge Bases

Click Add to bind one or more Knowledge Bases (up to 15).
4

Configure parameters

Set the global retrieval parameters and per-Knowledge-Base parameters described below.
5

Publish

Click Publish in the top right. After publishing, the retrieval service is callable through the API.

Global retrieval config

ParameterDefaultDescription
Knowledge-Base routingSearch allEither "Search all" or "Model routing" (the model picks which Knowledge Bases to search).
Rerank modelgte-rerank-hybridThe model that re-sorts the recalled Chunks.
Rerank modeScore modeScore mode / Sort mode.
Max results5Number of Chunks returned.

Per-Knowledge-Base config

Each bound Knowledge Base can be tuned individually:
ParameterDefaultDescription
Vector recall50Initial recall from the vector retrieval stage.
Keyword recall50Initial recall from the keyword retrieval stage.
Similarity threshold0.3Chunks scoring below this are filtered out.
Field filterNoneFilter the retrieval scope by metadata tags.

Retrieval modes

ModeHow it worksLatencyBest for
Fast ModeSingle-pass retrieval.Lowest.Simple factual questions.
Multi-turn Agentic ModeModel-driven multi-step planning with automatic query rewrites.Higher.Complex questions, multi-step reasoning.

API calls

Use the knowledge search endpoint:
curl -X POST https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/knowledge/search \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "index_id": "your_index_id",
    "query": "How do I configure a chunking strategy?",
    "rerank_model_name": "gte-rerank-hybrid",
    "top_k": 5
  }'
The returned nodes array contains the matched Chunks with text, relevance score, and source metadata.
If recall isn't where you want it, follow RAG Optimization for targeted improvements.