본문으로 건너뛰기
최종 수정: 에

AI_GENERATE

설명​

입력 프롬프트 텍스트를 바탕으로 응답을 생성합니다.

구문​

AI_GENERATE([<resource_name>], <prompt>)

매개변수​

매개변수설명
<resource_name>사용할 리소스 이름으로, 생략할 수 있습니다
<prompt>AI의 생성을 유도하는 데 사용할 프롬프트 텍스트

반환 값​

프롬프트를 바탕으로 생성된 텍스트 내용을 반환합니다.

입력값 중 하나라도 NULL이면 NULL을 반환합니다.

결과는 대규모 언어 모델이 생성하므로 출력이 달라질 수 있습니다.

예제​

SET default_ai_resource = 'resource_name';
SELECT AI_GENERATE('Describe Apache Doris in a few words') AS Result;
+---------------------------------------------------------+
| Result |
+---------------------------------------------------------+
| "Apache Doris is a fast, real-time analytics database." |
+---------------------------------------------------------+
SELECT AI_GENERATE('resource_name', 'What is the founding time of Apache Doris? Return only the date.') AS Result;
+--------+
| Result |
+--------+
| 2017 |
+--------+