응답 재생성
응답 재생성 (Response regeneration)
이 문서는 생성형 AI 채팅에서 사용자가 대체 응답을 생성할 수 있게 해 주는 패턴을 설명해요. 재생성(regeneration)과 모델 재처리, 재프롬프트와의 구분, 그리고 재생성이 대화 맥락에 미치는 영향을 다뤄요. 사용자 프롬프트, 생성된 응답, 재생성 버튼, 중지 동작이라는 네 가지 구성 요소(building blocks)와 일반적인 사용 사례를 설명해요.
출처: 문서
본문
Response regeneration
Enables users to generate an alternative response in generative AI chat.
생성형 AI 채팅에서 사용자가 대체 응답을 생성할 수 있게 해 줘요.
Key UX concepts
Regeneration
사용자는 모델 응답의 새 버전을 요청할 수 있으며, 이는 원래 응답을 대체할 대체 응답을 생성해요. 이 방식은 대화의 이전 맥락을 유지하면서 사용자가 자신의 질문에 대한 대체 응답을 탐색할 수 있게 해 줘요. 원래 응답이 완료됐든 사용자가 중지 동작으로 중단했든 동일한 프로세스가 적용돼요.
Model reprocessing
재생성 동안 모델은 대체 응답을 생성하기 위해 새로운 샘플링 프로세스를 수행해요. 동일한 프롬프트와 대화 맥락을 사용하면서도, 언어 모델 생성의 확률적 특성 때문에 모델은 다양한 출력을 만들어낼 수 있어요. 이는 카드 덱을 섞을 때마다 다른 배열을 얻는 것과 유사해요.
Distinguishing regeneration from re-prompting
재생성은 사용자가 명시적인 재생성 아이콘 버튼을 선택할 때 발생해요. 그러면 모델은 정확히 동일한 입력을 재생해 새 응답을 생성해요. 반대로 "try again"이나 "regenerate that" 같은 구문을 입력하는 것은 새로운 자연어 프롬프트이며, 시스템이 맥락에 따라 새 요청으로 해석해요.
How regeneration affects context
맥락은 대화 내내 사용자와 시스템 사이의 공유된 이해를 구축해요. 사용자가 응답을 재생성하면, 그 시점부터 대화의 경로가 바뀌는데, 이는 시간을 거슬러 가서 앞으로 다른 방향을 취하는 것과 같아요. 일관된 맥락을 유지하기 위해 시스템은 재생성된 응답 뒤에 온 모든 메시지를 제거해요. 이렇게 하면 이전 방향의 메시지와 충돌하지 않고 대화가 새 경로를 따라 자연스럽게 계속될 수 있어요.
Building blocks
A. User prompt
chat bubble 발신(outgoing) 메시지와 avatar를 사용해서 보낸 메시지임을 나타내는 사용자의 원래 질문이에요.
B. Generated response
시스템 응답은 chat bubble 수신(incoming) 메시지와 생성형 AI avatar로 표시되어 받은 메시지임을 나타내요.
C. Regenerate button
button group 안에 reshuffle 아이콘이 있는 icon button으로, 사용자가 같은 프롬프트에 대한 대체 응답을 요청할 수 있게 해 줘요. 각 대상 시스템 응답 아래에 일관되게 표시돼요.
D. Stop action - optional
사용자가 프롬프트를 보낸 후, 보내기 버튼이 중지 버튼으로 바뀌어 사용자가 응답의 생성이나 처리를 중단할 수 있게 해 줘요.
Common use cases
Regenerate a completed response
사용자는 완료된 응답을 재생성해서 같은 응답의 대체 버전을 볼 수 있어요. 이 동작은 원래 사용자 프롬프트와 맥락을 재사용해서 새 출력을 탐색하는 동안 대화가 일관되게 유지되도록 해요.
JD How do I plan a software release schedule? Release planning necessitates implementing cascading milestone dependencies, configuring automated workflow orchestration patterns, and establishing synchronized deployment windows with cross-team change management protocols. Each release cycle must incorporate parallel development streams with granular feature flagging mechanisms. Version control branching strategies should align with continuous integration pipelines while maintaining separate staging environments for quality assurance validation procedures. 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 from '@cloudscape-design/chat-components/chat-bubble';
import { genAiAvatar, userAvatar, userName } from '../genai-common/avatars';
import chatBubbleActions from './chat-action';
import CustomGenAIChatFooter from './custom-gen-ai-chat-footer';
export default function GenAiCompletedResponse() {
return (
<Container footer={<CustomGenAIChatFooter actionButtonIconName={'send'} actionButtonAriaLabel={'Send message'} />}>
<SpaceBetween size="xs">
<ChatBubble avatar={userAvatar} type="outgoing" ariaLabel={`${userName} at 05:37:30pm`}>
How do I plan a software release schedule?
</ChatBubble>
<ChatBubble avatar={genAiAvatar} type="incoming" ariaLabel="AI Assistant response" actions={chatBubbleActions}>
Release planning necessitates implementing cascading milestone dependencies, configuring automated workflow
orchestration patterns, and establishing synchronized deployment windows with cross-team change management
protocols. Each release cycle must incorporate parallel development streams with granular feature flagging
mechanisms. Version control branching strategies should align with continuous integration pipelines while
maintaining separate staging environments for quality assurance validation procedures.
</ChatBubble>
</SpaceBetween>
</Container>
);
}
Regenerate a stopped response
사용자는 원치 않는 응답 방향을 알아차리는 즉시 생성을 중지할 수 있어요. 이렇게 하면 모델이 원치 않는 응답을 생성하면서 추가 토큰을 소비하는 것을 방지할 수 있어요. 재생성 옵션은 즉시 사용 가능해져서, 사용자가 더 나은 대안으로 빠르게 방향을 바꿀 수 있게 해 줘요. 예를 들어 사용자가 응답이 과도하게 기술적인 접근 방식을 취하고 있다는 것을 보면, 생성을 중지하고 아무것도 바꾸지 않고 원래 프롬프트에 대한 다른 응답을 얻기 위해 재생성을 사용할 수 있어요.
JD What are the benefits of automation? Automation is a complex technological process that involves sophisticated algorithmic implementations across multiple system architectures. The fundamental computational principles underlying automation include... 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 from '@cloudscape-design/chat-components/chat-bubble';
import { genAiLoadingAvatar, userAvatar, userName } from '../genai-common/avatars';
import CustomGenAIChatFooter from './custom-gen-ai-chat-footer';
export default function GenAiInterruptedResponse() {
return (
<Container
footer={<CustomGenAIChatFooter actionButtonIconName={'stop-circle'} actionButtonAriaLabel={'Stop generation'} />}
>
<SpaceBetween size="xs">
<ChatBubble avatar={userAvatar} type="outgoing" ariaLabel={`${userName} at 05:37:30pm`}>
What are the benefits of automation?
</ChatBubble>
<ChatBubble
avatar={genAiLoadingAvatar}
type="incoming"
ariaLabel="AI Assistant response in progress"
showLoadingBar
>
Automation is a complex technological process that involves sophisticated algorithmic implementations across
multiple system architectures. The fundamental computational principles underlying automation include...
</ChatBubble>
</SpaceBetween>
</Container>
);
}
General guidelines
Do
- 재생성은 일반적으로 사용자가 프롬프트 입력에서 응답을 보낸 후 선택되므로, 더 접근 가능한 탭 순서를 만들기 위해 재생성 동작을 button group에 배치하세요.
- 맥락을 깨지 않고 재생성할 수 있는 사용자 시작 응답에만 재생성 버튼을 추가하세요.
- 프롬프트 중지 후와 시스템이 응답을 완료한 후에도 재생성할 수 있게 하세요.
- 실패한 재생성 시도를 처리하려면 Generative AI 채팅 오류 상태를 따르세요.
Don't
- 응답 생성 중지에 추가적인 마찰을 만들지 마세요. 사용자는 즉시 생성을 중지할 수 있어야 해요.
Writing guidelines
General writing guidelines
-
문장형 대문자(sentence case)를 사용하되, 고유명사와 브랜드 이름은 문맥에 맞게 대문자를 계속 사용하세요.
-
현재형 동사와 능동태를 사용하세요.
-
글이나 설명에서 please , thank you , 줄임표( ... ), 앰퍼샌드( & ), e.g. , i.e. , etc. 는 사용하지 마세요.
-
방향을 지칭하는 표현은 피하세요.
- 예를 들어 above 대신 previous 를, below 대신 following 을 사용하세요.
-
기기에 의존하지 않는 언어를 사용하세요.
- 예를 들어 click 대신 choose 또는 select 를 사용하세요.
Accessibility guidelines
General accessibility guidelines
- 각 컴포넌트의 대체 텍스트와 ARIA(Accessible Rich Internet Applications) 영역에 대한 가이드라인을 따르세요.
- 애플리케이션의 언어 맥락에 맞게 ARIA 라벨을 정의하세요.
- 역할(roles)과 랜드마크(landmarks)에 불필요한 마크업을 추가하지 마세요. 각 컴포넌트의 가이드라인을 따르세요.
- 모든 콘텐츠에 논리적이고 예측 가능한 순서로 키보드 기능을 제공하세요. 정보의 흐름이 자연스러워야 해요.