メインコンテンツまでスキップ

AI_CLASSIFY

説明

テキストを指定されたラベルのセットに分類するために使用されます。

構文

AI_CLASSIFY([<resource_name>], <text>, <labels>)

パラメータ

パラメータ説明
<resource_name>指定されたリソース名、オプション
<text>分類対象のテキスト
<labels>分類ラベルの配列

戻り値

テキストに最も適合する単一のラベルを返します。

いずれかの入力がNULLの場合、NULLを返します。

結果は大規模言語モデルによって生成されるため、出力は変動する可能性があります。

SET default_ai_resource = 'resource_name';
SELECT AI_CLASSIFY('Apache Doris is a databases system.', ['useage', 'introduce']) AS Result;
+-----------+
| Result |
+-----------+
| introduce |
+-----------+
SELECT AI_CLASSIFY('resource_name', 'Apache Doris is developing rapidly.', ['science', 'sport']) AS Result;
+---------+
| Result |
+---------+
| science |
+---------+