Usage Notes

Updated at:

PolarDB for AI integrates several commonly used models from Alibaba Cloud Model Studio. PolarDB for AI simplifies the technical complexities involved in calling the models to allow you to easily use the models to perform tasks, such as text embedding, text understanding, intelligent dialogue, and content generation, without the need to move data outside databases.

You can run the following SQL statement to view the built-in models:

SELECT model_seq,model_id,model_name,model_url FROM polar_ai._ai_models;           

Sample result:

-----------+---------------------------------------------
1 | _dashscope/text_embedding/text_embedding_v2 | text-embedding-v2 | https://dashscope.aliyuncs.com/api/v1/services/embeddings/text-embedding/text-embedding 
2 | _dashscope/text_embedding/text_embedding_v3 | text-embedding-v3 | https://dashscope.aliyuncs.com/api/v1/services/embeddings/text-embedding/text-embedding 
3 | _dashscope/text-classfication/opennlu-v1    | opennlu-v1        | https://dashscope.aliyuncs.com/api/v1/services/nlp/nlu/understanding                    
(3 rows)

PolarDB for AI integrates the following natural language processing (NLP) models from Alibaba Cloud Model Studio:

  • _dashscope/text_embedding/text_embedding_v2: a general-purpose text embedding model. The model can convert text in Chinese, English, Spanish, French, Portuguese, Indonesian, Japanese, Korean, German, and Russian into vectors. The output vectors are 1536-dimensional.

  • _dashscope/text_embedding/text_embedding_v3: a general-purpose text embedding model. The model supports over 50 additional languages beyond those supported by _text_embedding_v2. By default, the output vectors are 1024-dimensional.

  • _dashscope/text-classfication/opennlu-v1: an Text understanding, which is suitable for text comprehension tasks such as information extraction and text classification for Chinese and English inputs with zero-shot learning.