This topic explains how to use the DashScopeEmbedding service to build a vector index in LlamaIndex.
Prerequisites
- You have activated Model Studio and obtained an API key. For more information, see Get an API key.
- You have imported your API key. For more information, see Set your API key as an environment variable (deprecated; use Configure your API key instead).
- Install the LlamaIndex core package, DashScopeEmbedding, and related dependencies.
Supported models
MTEB and CMTEB are standard benchmarks for embedding models. Higher scores indicate better model performance.
Update global settings (optional)
Model usage example
Build a vector index for documents
Sample file used in this example: Alibaba Cloud Model Studio Product Overview (fictional).zip
During vector index creation, each source file is split into multiple segments. Each segment is then converted into a vector.