최종 수정: 에
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.', ['usage', 'introduce']) AS Result;
+-----------+
| Result |
+-----------+
| introduce |
+-----------+
SELECT AI_CLASSIFY('resource_name', 'Apache Doris is developing rapidly.', ['science', 'sport']) AS Result;
+---------+
| Result |
+---------+
| science |
+---------+