본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Support prompts

원문 보기 위키 갱신

Support prompts (지원 프롬프트)

생성형 AI 채팅에서 사용자에게 권장 입력을 제시하는 프롬프트입니다. Support prompts는 선택 시 즉시 전송되는 비편집형(non-editable) 프롬프트와, 선택 시 프롬프트 입력 필드를 채워 사용자가 보내기 전에 검토·수정·교체할 수 있는 편집형(editable) 프롬프트의 두 가지 유형으로 나뉩니다.

출처: 문서

본문

생성형 AI 채팅에서 사용자에게 권장 입력을 제시하는 프롬프트입니다.

핵심 UX 개념 (Key UX concepts)

유형 (Types)

AI 워크플로에서 support prompts는 크게 두 가지 유형으로 분류할 수 있습니다: 비편집형(non-editable) 프롬프트와 편집형(editable) 프롬프트. 구분은 사용자가 이를 선택할 때 무슨 일이 일어나는지에 기반합니다.

  • 비편집형 (Non-editable): 이 프롬프트는 선택 시 프롬프트 입력에 나타나지 않고 즉시 전송됩니다.
  • 편집형 (Editable): 편집형 프롬프트는 선택 시 프롬프트 입력 필드를 채워, 사용자가 보내기 전에 프롬프트 템플릿의 변수를 검토, 수정 또는 교체할 수 있게 합니다.

편집 가능성의 어포던스 (Affordance for editability)

편집형 프롬프트는 선택 시 실행되지 않습니다. 인터페이스는 상호작용이 발생하기 전에 편집 아이콘으로 프롬프트를 편집할 수 있음을 명확히 알려야 합니다. 지정된 시각적 어포던스는 프롬프트를 선택하면 편집 가능한 텍스트가 삽입된다는 올바른 기대를 설정합니다.

지속 상태 없음 (No persistent state)

프롬프트 선택은 프롬프트 입력에 텍스트를 삽입하는 일회성 상호작용입니다. Support prompts는 선택 시 상태를 유지하지 않습니다. 프롬프트 선택은 편집형 프롬프트에서 프롬프트 입력을 채우거나 비편집형 프롬프트에서 즉시 전송하는 일회성 상호작용입니다.

일반적인 사용 사례 (Common use cases)

사용자가 시작하도록 돕기 (Helping users get started)

편집형 프롬프트는 사용자가 AI 상호작용을 시작할 때 유용할 수 있습니다. 이들은 사용자가 시작을 위해 선택할 수 있는 출발점 또는 아이스브레이커 역할을 합니다.

Welcome to the AI assistant

Choose a prompt below or type your own in the prompt input to begin a conversation.

Explain my cost trends Visualizes spending over time Analyze my EC2 instance performance Reviews compute metrics and optimization Generate a cost optimization report Actionable recommendations to reduce spending Use of this service is subject to the AWS Responsible AI Policy

import Container from '@cloudscape-design/components/container';
import Box from '@cloudscape-design/components/box';
import SpaceBetween from '@cloudscape-design/components/space-between';
import SupportPromptGroup, { type SupportPromptGroupProps } from '@cloudscape-design/chat-components/support-prompt-group';
import CustomGenAIChatFooter from '../gen-ai-response-regeneration/custom-gen-ai-chat-footer';
import './styles.scss';
import { useState } from 'react';

export default function GenAiSupportPromptGetStarted() {
  const [message, setMessage] = useState('');
  const items: SupportPromptGroupProps.Item[] = [
    {
      text: (
        <SpaceBetween direction="vertical" size="xxxs">
          Explain my cost trends
          <Box fontSize="body-s" color="text-body-secondary">
            Visualizes spending over time
          </Box>
        </SpaceBetween>
      ),
      iconName: 'edit',
      iconPosition: 'right',
      id: 'explain-cost-trends',
    },
    {
      text: (
        <SpaceBetween direction="vertical" size="xxxs">
          Analyze my EC2 instance performance
          <Box fontSize="body-s" color="text-body-secondary">
            Reviews compute metrics and optimization
          </Box>
        </SpaceBetween>
      ),
      iconName: 'edit',
      iconPosition: 'right',
      id: 'analyze-ec2-instance-performance',
    },
    {
      text: (
        <SpaceBetween direction="vertical" size="xxxs">
          Generate a cost optimization report
          <Box fontSize="body-s" color="text-body-secondary">
            Actionable recommendations to reduce spending
          </Box>
        </SpaceBetween>
      ),
      iconName: 'edit',
      iconPosition: 'right',
      id: 'generate-cost-optimization-report',
    },
  ];
  const itemMessages: Record<string, string> = {
    'explain-cost-trends':
      'Analyze my AWS cost trends over the past <time_period>. Break down spending by <breakdown_dimension>, identify any significant increases or decreases, and highlight the top <number> cost drivers.',
    'analyze-ec2-instance-performance':
      'Analyze the performance of my EC2 instances in <region> over the past <time_period>. Review CPU utilization, memory usage, and network throughput, identify any underutilized or over-provisioned instances, and recommend <number> optimization actions.',
    'generate-cost-optimization-report':
      'Generate a cost optimization report for my AWS account covering the past <time_period>. Identify unused or underutilized resources, highlight potential savings by <savings_category>, and provide the top <number> actionable recommendations to reduce spending.',
  };
  return (
    <Container
      footer={
        <CustomGenAIChatFooter
          message={message}
          onSendMessage={setMessage}
          actionButtonIconName="send"
          actionButtonAriaLabel="Send message"
        />
      }
    >
      <div className="welcome-container">
        <img src="/robot.svg" alt="AI Assistant" width={99} height={87} />
        <SpaceBetween size="xxxs">
          <Box variant="h1" textAlign="center">
            Welcome to the AI assistant
          </Box>
          <Box variant="p" color="text-body-secondary" textAlign="center">
            Choose a prompt below or type your own in the prompt input to begin a conversation.
          </Box>
        </SpaceBetween>
        <SupportPromptGroup
          ariaLabel="Suggested prompts"
          alignment="horizontal"
          onItemClick={({ detail }) => {
            setMessage(itemMessages[detail.id] ?? '');
          }}
          items={items}
        />
      </div>
    </Container>
  );
}

대화 중 사용자 안내하기 (Guiding users during a conversation)

비편집형 프롬프트는 문맥에 맞는 다음 단계를 사전에 제안함으로써 대화 흐름을 유지하는 데 도움이 됩니다. 사용자는 자신의 프롬프트를 작성하지 않고도 이러한 제안을 빠르게 선택해 상호작용을 계속할 수 있어, 경험이 더 안내된 느낌이 들게 합니다.

How can I help? JD My AWS bill increased by 30% last month and I need to understand why I've analyzed your billing data and identified cost increases across multiple regions and services. To help you investigate further, I can generate a comprehensive cost report covering both EC2 and S3, or create a workflow one service at a time. Create comprehensive cost report Create individual cost report for my service Use of this service is subject to the AWS Responsible AI Policy

import Container from '@cloudscape-design/components/container';
import SpaceBetween from '@cloudscape-design/components/space-between';
import ChatBubble, { ChatBubbleProps } from '@cloudscape-design/chat-components/chat-bubble';
import SupportPromptGroup, { type SupportPromptGroupProps } from '@cloudscape-design/chat-components/support-prompt-group';
import { genAiAvatar, userAvatar, userName } from '../genai-common/avatars';
import CustomGenAIChatFooter from '../gen-ai-response-regeneration/custom-gen-ai-chat-footer';
import { useState } from 'react';
import '../genai-common/styles.scss';

export default function GenAiSupportPromptDuringConversation() {
  const [chatHistory, setChatHistory] = useState([
    {
      avatar: genAiAvatar,
      type: 'incoming',
      ariaLabel: 'AI Assistant chat initiation message',
      message: 'How can I help?',
    },
    {
      avatar: userAvatar,
      type: 'outgoing',
      ariaLabel: `${userName} at 05:37:30pm`,
      message: 'My AWS bill increased by 30% last month and I need to understand why',
    },
    {
      avatar: genAiAvatar,
      type: 'incoming',
      ariaLabel: 'AI Assistant response',
      message:
        "I've analyzed your billing data and identified cost increases across multiple regions and services. To help you investigate further, I can generate a comprehensive cost report covering both EC2 and S3, or create a workflow one service at a time.",
    },
  ]);
  const items: SupportPromptGroupProps.Item[] = [
    { text: 'Create comprehensive cost report', id: 'create-comprehensive-cost-report' },
    { text: 'Create individual cost report for my service', id: 'create-individual-cost-report-for-service' },
  ];
  const itemMessages: Record<string, string> = {
    'create-comprehensive-cost-report': 'Create comprehensive cost report',
    'create-individual-cost-report-for-service': 'Create individual cost report for my service',
  };

  return (
    <Container footer={<CustomGenAIChatFooter actionButtonIconName="send" actionButtonAriaLabel="Send message" />}>
      <div className="chat-container">
        <SpaceBetween size="xs">
          {chatHistory.map((message, index) => {
            return (
              <ChatBubble
                key={index}
                avatar={message.avatar}
                type={message.type as ChatBubbleProps.Type}
                ariaLabel={message.ariaLabel}
              >
                {message.message}
              </ChatBubble>
            );
          })}
          {chatHistory.length === 3 ? (
            <div className="chat-bubble-indentation">
              <SupportPromptGroup
                ariaLabel="Suggested prompts"
                onItemClick={({ detail }) => {
                  setChatHistory(prevChatHistory => [
                    ...prevChatHistory,
                    {
                      avatar: userAvatar,
                      type: 'outgoing',
                      ariaLabel: `${userName} at 05:37:30pm`,
                      message: itemMessages[detail.id] ?? '',
                    },
                  ]);
                }}
                items={items}
              />
            </div>
          ) : null}
        </SpaceBetween>
      </div>
    </Container>
  );
}

일반 지침 (General guidelines)

권장 사항 (Do)

  • 편집형 프롬프트를 prompt input에 삽입한 후 사용자가 모든 텍스트를 편집할 수 있게 하세요.
  • 편집형 프롬프트 텍스트에 변수를 사용해 예상되는 커스터마이제이션을 나타내세요. 예를 들어 사용자가 "Analyze my AWS cost trends over the past <time_period>"를 선택하면 <time_period>가 커스터마이즈할 주요 요소임을 이해합니다.

금지 사항 (Don't)

  • 프롬프트를 대화에 직접 보내야 할 때 편집형 프롬프트를 사용하지 마세요. 예를 들어 문맥 후속 질문이나, 사용자가 커스터마이제이션 없이 빠르게 선택해 보낼 수 있는 "Show me more details" 또는 "Compare with last quarter" 같은 제안에는 비편집형 프롬프트를 사용하세요.
  • 프롬프트 템플릿에서 삽입된 텍스트를 비활성화하지 마세요.

작성 지침 (Writing guidelines)

일반 작성 지침 (General writing guidelines)

  • 문장형 대소문자(sentence case)를 사용하되, 문맥에 따라 고유 명사와 브랜드 이름은 올바르게 대문자로 표기하세요.

  • 헤더와 버튼을 제외하고는 끝 구두점을 사용하세요. 느낌표는 사용하지 마세요.

  • 현재 시제 동사와 능동태를 사용하세요.

  • 글에서 please, thank you, 줄임표( ... ), 앰퍼샌드( & ), e.g., i.e., etc. 를 사용하지 마세요.

  • 방향을 나타내는 언어는 피하세요.

    • 예: 위(above) 대신 이전(previous), 아래(below) 대신 다음(following) 을 사용하세요.
  • 기기에 독립적인 언어를 사용하세요.

    • 예: 클릭(click) 대신 선택(choose) 또는 select를 사용하세요.

컴포넌트별 지침 (Component-specific guidelines)

변수 텍스트 (Variable text)

  • 변수의 작성 지침을 따르세요.

Support prompt 레이블 (Support prompt labels)

접근성 지침 (Accessibility guidelines)

일반 접근성 지침 (General accessibility guidelines)

  • 각 컴포넌트의 대체 텍스트(alternative text)와 ARIA 영역 지침을 따르세요.
  • 애플리케이션의 언어 컨텍스트에 맞춰 ARIA 레이블을 정의해야 합니다.
  • 역할(roles)과 랜드마크에 불필요한 마크업을 추가하지 마세요. 각 컴포넌트의 지침을 따르세요.
  • 논리적이고 예측 가능한 순서로 모든 사용 가능한 콘텐츠에 키보드 기능을 제공하세요. 정보 흐름은 이해하기 쉬워야 합니다.

더 알아보기 (Learn more)