跳到主要内容

AI Functions

This section provides reference information for Databend's built-in AI functions, which enable natural language processing, vector embeddings, and text generation capabilities directly through SQL.

信息

Databend's AI functions leverage OpenAI models and also support Azure OpenAI service for improved data privacy. These functions require an OpenAI API key configured in Databend and are available by default on Databend Cloud.

Available AI Functions

FunctionDescriptionExample
AI_TO_SQLConverts natural language instructions into SQL queriesSELECT * FROM ai_to_sql('Get all products with price less than 100')
AI_EMBEDDING_VECTORGenerates vector embeddings for text dataSELECT ai_embedding_vector('How to use Databend')
AI_TEXT_COMPLETIONGenerates text completions based on a given promptSELECT ai_text_completion('What is a data warehouse?')
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册