LLM 호출
| 항목 | 값 |
|---|---|
| 화면 이름 | Use LLM |
| 식별자 | useLlmV3 |
| 지원 실행 방식 | Batch |
| 범주 | 문자열 (String) |
| 반환 자료형 | Array<AnyType> | Boolean | Date | Decimal | Double | Float | Integer | Long | Short | String | Struct | Struct<ok:Array<AnyType> | Boolean | Date | Decimal | Double | Float | Integer | Long | Short | String | Struct | Timestamp, error:String> | Timestamp |
설정 가능한 프롬프트로 LLM을 호출합니다.
입력 인자
| 이름 | 지정 여부 | 자료형 | 의미와 조건 |
|---|---|---|---|
Model | 필수 | Model | 사용할 LLM 모델입니다. |
Prompt | 필수 | List<Expression<AnyType>> | LLM의 사용자 프롬프트입니다. 이미지와 PDF 미디어도 사용할 수 있으며 PDF는 이미지 목록으로 바꿔 모델에 전달합니다. 프롬프트 전체가 비어 있거나 null이면 결과는 null입니다. 프롬프트 안의 개별 열이 null이면 <null>로 취급합니다. |
System prompt | 필수 | List<Expression<AnyType>> | LLM에 전달할 시스템 프롬프트입니다. 시스템 프롬프트에는 미디어 참조를 사용할 수 없습니다. |
Output mode | 선택 | Enum<Simple, With errors> | simple 모드는 설정한 출력 자료형의 결과를 반환하고 오류는 null로 처리합니다. 구조체 모드는 해당 자료형의 출력과 오류를 필드로 반환합니다. |
Output type | 선택 | Type<Array<AnyType> | Boolean | Date | Decimal | Double | Float | Integer | Long | Short | String | Struct | Timestamp> | LLM 응답이 따라야 할 출력 자료형입니다. |
입출력 예시
예시 1: 기본 동작
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt:promptSystem prompt: [In the context of a food delivery app, your job is to rate reviews given in the following user promp...]Output mode: nullOutput type: null
| prompt | 출력 |
|---|---|
| The food was great! | 5 |
예시 2: 기본 동작
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt: [prompt,mediaRef]System prompt: [You are a highly advanced AI designed to assist healthcare professionals by interpreting medical ima...]Output mode: nullOutput type: null
| prompt | mediaRef | 출력 |
|---|---|---|
| Patient: John Doe, Age: 45, Symptoms: Persistent cough, shortness of breath, and chest pain. Please analyze the attached chest X-ray for any signs of pneumonia or other abnormalities. | {"mimeType":"image/jpeg","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"r... | Diagnostic Report: Patient: John Doe Age: 45 Symptoms: Persistent cough, shortness of b... |
예시 3: null 처리
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt:promptSystem prompt: nullOutput mode: nullOutput type: null
| prompt | 출력 |
|---|---|
| null | null |
예시 4: null 처리
텍스트 지시 없이 mediaRef만 Prompt에 전달한 이 예시의 결과는 null입니다.
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt:mediaRefSystem prompt: nullOutput mode: nullOutput type: null
| mediaRef | 출력 |
|---|---|
| {"mimeType":"image/jpeg","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"r... | null |
예시 5: 경계 조건
빈 입력 문자열은 null을 반환합니다.
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt:promptSystem prompt: nullOutput mode: nullOutput type: null
| prompt | 출력 |
|---|---|
| empty string | null |
예시 6: 경계 조건
모델 한도를 넘는 프롬프트는 null을 반환합니다.
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt:promptSystem prompt: nullOutput mode: nullOutput type:WITH_ERRORS
| prompt | 출력 |
|---|---|
| What is the capital of France? | { error: null, ok: Paris, } |
| a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ... | { error: Context limit exceeded., ok: null, } |
예시 7: 경계 조건
모델 한도를 넘는 프롬프트는 null을 반환합니다.
인자 값:
Model:
gpt4ChatModel(
temperature: 0.0,
)Prompt:promptSystem prompt: nullOutput mode: nullOutput type: null
| prompt | 출력 |
|---|---|
| a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ... | null |
긴 구조값 안의 줄임표는 생략한 내용을 나타냅니다.