Follow-up questions
follow-up questions 패턴은 더 정확하고 관련성 높은 응답을 생성하기 위해 사용자에게 추가 정보를 요청하는 방법을 소개해요. 올바른 시기에 컨텍스트를 수집하고, 사용자 선택을 간소화하며, 필요한 정보로 사용자를 안내하는 원칙을 담고 있습니다.
출처: 문서
본문
주요 UX 개념
올바른 시기에 컨텍스트 수집
출력을 보여주기 전에 정보를 수집할지 상호작용 중에 수집할지 결정하세요. 영향이 큰 결정이나 신뢰도가 낮을 때는 먼저 세부 사항을 수집하세요. 여러 질문이 필요할 때는 순차적으로 수집하면 인지 부하가 줄어들고 각 결정에 집중할 수 있어요. 다른 시나리오에서는 초기 응답으로 시작하고 후속 질문으로 결과를 다듬으세요.
사용자 선택 간소화
상호작용의 각 단계에서 사용자가 진행, 건너뛰기 또는 종료할 수 있는 명확한 옵션을 제공하세요. 이렇게 하면 사용자가 경험을 통제하고 있다는 느낌을 받아 마찰이 줄어듭니다. 구조화된 옵션이 사용자 요구를 충족하지 못할 때는 사용자가 자신의 말로 개방형 컨텍스트를 제공할 수 있도록 항상 prompt input에 접근할 수 있게 하세요.
사용자를 필요한 정보로 안내
사용자가 쉽게 접근할 수 없는 정보에 접근하도록 도우세요. 적절할 때 필요한 데이터를 찾을 수 있는 곳에 대한 링크나 지침을 제공하세요. 이렇게 하면 사용자가 정보가 바로 손에 없어도 정확한 정보를 제공할 수 있어요.
기준 테이블
| 정보 유형 | 입력 방법 | 예 |
|---|---|---|
| 사용자 의도 명확화 | prompt input 위에 도킹된 닫을 수 있는(dismissible) 대화상자에서 순차적인 사전 정의 선택을 제시. | 정확한 응답을 생성하려면 컨텍스트가 사전에 필요함. 그렇지 않으면 여러 번의 왕복 교환이 필요할 수 있음. |
| 대화 안내 | support prompt group 으로 권장 입력 제시. | 초기 응답이 여러 상황에 광범위하게 적용됨. 후속 선택이 이를 사용자의 특정 사례로 좁힘. 유효한 선택은 최대 5개. |
일반적인 사용 사례
사용자 의도 명확화
사용자가 모호하거나 불완전한 정보를 제공하거나, 정확한 응답을 생성하기 위해 추가 정보가 필요한 요청을 할 때, 닫을 수 있는 대화상자가 구조화된 입력을 사전에 수집해 스레드의 왕복 교환을 줄여줍니다.
Controls: true
대화 안내
초기 응답이 광범위하게 적용되지만 후속 선택이 이를 사용자의 특정 상황에 맞게 조정할 수 있을 때, support prompt group 이 응답 후 제한된 옵션 집합을 제시합니다.
생성형 AI 어시스턴트
JD I need to choose between AWS Fargate and ECS on EC2 for my containerized application. Both are great options for running containers. Here are the key differences:
AWS Fargate:
[1]
- Serverless - no need to manage infrastructure
- Pay only for resources used by containers
- Easier to get started and maintain
ECS on EC2:
[2]
- More control over underlying infrastructure
- Better cost optimization for consistent workloads
- Access to instance-level customization
Sources [1] Simplify compute management with AWS Fargate [2] What is Amazon EC2? To provide a more tailored recommendation, what's your primary concern when choosing a container orchestration solution?
Minimize management overhead Maximize control over infrastructure Optimize cost
import React from 'react';
import Box from '@cloudscape-design/components/box';
import ChatBubble from '@cloudscape-design/chat-components/chat-bubble';
import Container from '@cloudscape-design/components/container';
import Header from '@cloudscape-design/components/header';
import SupportPromptGroup from '@cloudscape-design/chat-components/support-prompt-group';
import SpaceBetween from '@cloudscape-design/components/space-between';
import TextContent from '@cloudscape-design/components/text-content';
import ExpandableSources, { Sources } from '../genai-common/sources';
import { genAiAvatar, userAvatar, userName } from '../genai-common/avatars';
import chatBubbleActions from '../genai-common/chat-bubble-actions';
import CitationPopover from '../genai-common/citation-popover';
import '../genai-common/styles.scss';
const sources: Sources = [
{
href: 'https://docs.aws.amazon.com/eks/latest/userguide/fargate.html',
description: 'Simplify compute management with AWS Fargate',
},
{
href: 'https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html',
description: 'What is Amazon EC2?',
},
];
export default function GenAiFollowUpClarifyIntent() {
return (
<Container header={<Header variant="h3">Generative AI assistant</Header>}>
<SpaceBetween size="xs">
<ChatBubble avatar={userAvatar} type="outgoing" ariaLabel={`${userName} at 05:37:30pm`}>
I need to choose between AWS Fargate and ECS on EC2 for my containerized application.
</ChatBubble>
<ChatBubble
avatar={genAiAvatar}
type="incoming"
ariaLabel="Generative AI assistant at 05:37:40pm"
actions={chatBubbleActions}
>
<TextContent>
<p>Both are great options for running containers. Here are the key differences:</p>
<p>
AWS Fargate: <CitationPopover count={1} href={sources[0].href} />
</p>
<ol>
<li>Serverless - no need to manage infrastructure</li>
<li>Pay only for resources used by containers</li>
<li>Easier to get started and maintain</li>
</ol>
<p>
ECS on EC2: <CitationPopover count={2} href={sources[1].href} />
</p>
<ol>
<li>More control over underlying infrastructure</li>
<li>Better cost optimization for consistent workloads</li>
<li>Access to instance-level customization</li>
</ol>
</TextContent>
<Box padding={{ top: 'xs' }}>
<ExpandableSources sources={sources} />
</Box>
</ChatBubble>
<ChatBubble avatar={genAiAvatar} type="incoming" ariaLabel="Generative AI assistant at 05:37:50pm">
<Box variant="p">
To provide a more tailored recommendation, what's your primary concern when choosing a container
orchestration solution?
</Box>
</ChatBubble>
<div className="chat-bubble-indentation">
<SupportPromptGroup
ariaLabel="Proposed prompts"
onItemClick={() => null}
items={[
{ id: 'minmize-management-overhead', text: 'Minimize management overhead' },
{ id: 'maxmimize-control-over-infrastructure', text: 'Maximize control over infrastructure' },
{ id: 'optimize-cost', text: 'Optimize cost' },
]}
/>
</div>
</SpaceBetween>
</Container>
);
}
일반 지침
권장 사항 (Do)
- 개방형 텍스트 프롬프트 대신 구조화된 입력 방법을 사용해 후속 정보를 수집하세요.
- 사용자를 압도하지 않도록 워크플로우당 후속 질문을 5개 이하로 제한하세요.
권장하지 않는 사항 (Don't)
- 사전 정의된 선택이나 구조화된 입력으로 같은 정보를 더 효율적으로 포착할 수 있을 때 사용자가 자유 텍스트 응답을 만들도록 요구하지 마세요.
- 이미 제공된 정보나 API를 통해 자동으로 검색할 수 있는 데이터를 묻지 마세요.
작성 지침
일반 작성 지침
-
문장 케이스(sentence case)를 사용하되, 문맥에 맞게 고유명사와 브랜드명은 올바르게 대문자로 유지하세요.
-
현재 시제 동사와 능동태를 사용하세요.
-
글에서 please, thank you, 줄임표 ( ... ), 앰퍼샌드 ( & ), e.g., i.e., etc. 는 사용하지 마세요.
-
방향을 가리키는 표현은 피하세요.
- 예: above 대신 previous를, below 대신 following을 사용하세요.
-
기기에 독립적인 언어를 사용하세요.
- 예: click 대신 choose 또는 select를 사용하세요.
컴포넌트별 지침
대화상자 제목 (Dialog title)
-
구체적이고 행동 지향적으로 작성하세요. 대화상자 제목은 수행되는 작업이나 대화상자의 목적을 명확히 나타내야 하며, 종종 작업 동사와 관련 리소스나 개념을 결합합니다.
- 예: Any specific constraints I should know about?
Placeholder 텍스트
- placeholder 텍스트를 사용해 예상 입력 형식에 대한 간단한 예나 힌트를 제공하되, 레이블의 대체품으로 사용하지 마세요.
- placeholder 텍스트를 간결하고 충분히 설명적으로 유지해 입력 필드를 어지럽히지 않고 사용자를 안내하세요.
버튼 텍스트
- 버튼이 대화상자 제목에 표시된 주요 작업을 수행한다면 버튼 레이블의 동사는 제목의 동사와 일치해야 합니다.
- button 에 대한 작성 지침을 따르세요.
지원 프롬프트 (Support prompts)
-
지원 프롬프트 레이블을 72자 미만으로 제한하세요.
- support prompt group 에 대한 작성 지침을 따르세요.
접근성 지침
일반 접근성 지침
- 각 컴포넌트에 대해 대체 텍스트와 ARIA(접근 가능한 리치 인터넷 애플리케이션) 영역에 대한 지침을 따르세요.
- 애플리케이션의 언어 맥락에 맞게 ARIA 레이블을 정의하세요.
- 역할(role)과 랜드마크에 불필요한 마크업을 추가하지 마세요. 각 컴포넌트의 지침을 따르세요.
- 모든 콘텐츠에 논리적이고 예측 가능한 순서로 키보드 기능을 제공하세요. 정보의 흐름이 자연스러워야 해요.