Skip to main content

Create a Knowledge Base

Pick a Knowledge Base type and configure parsing and chunking.

A Knowledge Base is the core entity in the RAG platform. It groups documents, Chunks, embeddings, and index configuration together and exposes retrieval and Q&A capabilities through the API.

Knowledge Base types

When you create a Knowledge Base, choose a type. Each type uses a different retrieval method:
TypeDataRetrieval methodNotes
Unstructured DocumentsPDF, Word, Markdown, HTMLHybrid vector + keywordFor text-heavy documents.
Structured dataCSV, Excel, RDS tablesNatural-language-to-SQLFor precise numerical queries.
Image libraryProduct photos, design filesImage-to-image search, visual Q&AFor image search.
Audio / video libraryScreen recordings, training videosTranscription + segment locatingAuto-transcribes and indexes by segment.

Create from the console

1

Open Index Management

Sign in to the console, click Index Management in the left navigation, then click New Knowledge Base in the top right.
2

Fill in basic info

FieldRequiredNotes
NameYes1–50 characters, unique within the workspace.
DescriptionNoUp to 200 characters, used in filtering.
TypeYesUnstructured / Structured / Image / Audio-video.
3

Pick a parsing method

Parsing methodDescriptionBest for
Native document parsingStandard text extraction.Clean electronic documents.
Document Intelligence ParsingLayout-aware OCR + structure recovery.Scans and complex layouts.
LLM-based parsingAn LLM interprets the document structure.Non-standard formats.
Qwen-VL parsingVisual language model.Documents that mix text and images.
Audio / video parsingSpeech-to-text with timestamp locating.Audio and video files.
4

Configure the Chunking Strategy

ParameterDefaultRangeNotes
Chunking methodSmart ChunkingSmart / Fixed-length / Heading-basedSmart Chunking splits along the document layout.
Chunk size1024256–4096Maximum length of a single Chunk.
Chunk overlap10%0%–50%Overlap between adjacent Chunks.
See Chunking and Embedding for details.
5

Create

Click Confirm. The Knowledge Base enters the Ready state and you can start uploading documents.

Create through the API

Use the Create Knowledge Base and Import endpoint to create a Knowledge Base and submit an import job in one call:
curl -X POST https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/create_v2 \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "index_name": "Product Manual",
    "sink_type": "DEFAULT",
    "structure_type": "unstructured",
    "embedding_type": "embedding_v3",
    "source_type": "DATA_CENTER_FILE",
    "document_ids": ["file-xxx-001", "file-xxx-002"]
  }'

Limits

ItemLimitNotes
Knowledge Bases per workspace50Submit a ticket to request a higher limit.
Documents per Knowledge Base100,000Split larger collections.
Per-document size100 MBSplit larger files.
You can change the Chunking Strategy after creation, but changing the embedding model triggers a full index rebuild.
Once the Knowledge Base is created, move on to Upload Documents.