Skip to main content
QUICK REVIEW

[논문 리뷰] ChatHaruhi: Reviving Anime Character in Reality via Large Language Model

Cheng Li, Ziang Leng|arXiv (Cornell University)|2023. 08. 18.
Topic ModelingComputer Science인용 수 11
한 줄 요약

이 논문은 메모리 증강 프롬프트와 캐릭터 대화 말뭉치를 사용하여 LLM이 특정 캐릭터를 역활극으로 연기하도록 하는 시스템 ChatHaruhi를 제시하고, 32 characters를 위한 54K-dialogue dataset을 공개합니다.

ABSTRACT

Role-playing chatbots built on large language models have drawn interest, but better techniques are needed to enable mimicking specific fictional characters. We propose an algorithm that controls language models via an improved prompt and memories of the character extracted from scripts. We construct ChatHaruhi, a dataset covering 32 Chinese / English TV / anime characters with over 54k simulated dialogues. Both automatic and human evaluations show our approach improves role-playing ability over baselines. Code and data are available at https://github.com/LC1332/Chat-Haruhi-Suzumiya .

연구 동기 및 목표

  • 가상 캐릭터의 역할 연기를 개선하기 위해 LLM의 기억력, 일관성, 그리고 환각 문제를 다룬다.
  • 시스템 프롬프트, 캐릭터 메모리, 대화 메모리를 활용하여 캐릭터 내 응답을 안내하는 알고리즘을 제안한다.
  • ChatHaruhi-54K를 포함하는 데이터셋을 구성하여 32 characters를 대상으로 페르소나 기반 챗봇을 학습 및 평가한다.
  • 대형(ChatGPT/Claude) 및 소형(7B) 모델이 파인튜닝 및 데이터 생성을 통해 in-character 대화를 수행하도록 한다.

제안 방법

  • 세 가지 구성 요소로 된 캐릭터 표현을 정의한다: 지식/배경, 성격, 언어 습관.
  • 각 캐릭터에 대해 스크립트의 원본 대화를 메모리 뱅크 D에 추출·저장한다.
  • 문장 임베딩으로 메모리 뱅크 U를 검색하여 주어진 사용자 질의 q에 가장 관련된 대화 메모리를 가져온다.
  • 출력 지도를 위한 시스템 프롬프트 sR를 사용하여 코스프레, 원문 대사의 재사용, 캐릭터 특유의 언어를 강조한다.
  • 일관된 응답을 보장하기 위해 대화 히스토리 H를 약 1200토큰 수준으로 유지한다.
  • Alpaca와 유사한 프롬프트를 사용하여 D를 생성하고 파인튜닝 데이터의 보강을 통해 ChatHaruhi-54K로 이어지도록 추가적으로 캐릭터 내 대화를 자동으로 생성한다.
Figure 1: Our algorithm is role-playing Haruhi Suzumiya. Note that the user’s questions are related but not identical to the original plot, while Chat Haruhi Suzumiya’s answers can largely quote the original plot.
Figure 1: Our algorithm is role-playing Haruhi Suzumiya. Note that the user’s questions are related but not identical to the original plot, while Chat Haruhi Suzumiya’s answers can largely quote the original plot.

실험 결과

연구 질문

  • RQ1메모리 증강 프롬프팅 시스템이 동일한 기본 모델에서 베이스라인 프롬프트를 훨씬 능가하는 수준으로 LLM의 특정 캐릭터 역할 수행 능력을 향상시킬 수 있는가?
  • RQ2원문 스크립트 메모리와 생성 대화를 결합하면 다양한 언어에서 더 충실하고 일관된 캐릭터 묘사가 나오는가?
  • RQ3기억 검색과 프롬프트 설계가 캐릭터의 설정 및 언어적 스타일에 대한 정렬에 어떤 영향을 미치는가?
  • RQ4로컬 7B 모델을 ChatHaruhi-54K 데이터로 파인튜닝하면 더 큰 모델과 비슷한 수준의 in-character 행동을 재현할 수 있는가?

주요 결과

  • ChatHaruhi 파이프라인은 동일한 기본 모델을 사용할 때 baselines에 비해 in-character 정렬 및 응답 품질을 향상시킨다.
  • 저자들은 22,752개의 원본 대화와 31,974개의 시뮬레이션 대화로 구성된 ChatHaruhi-54K를 32 characters에 대해 총 54,726개로 구성했다.
  • 평가에는 자동 유사도 기반 지표와 예정된 인간 정렬/품질 평가가 포함된다.
  • ChatHaruhi 데이터로 7B 모델을 파인튜닝했을 때, 각각 22,752 데이터와 54K 데이터로 학습된 A/B 모델을 얻고 평가를 보고한다.
  • 시스템은 ChatGPT/Claude의 사용이나 로컬에서의 파인튜닝된 7B를 사용한 배치를 지원한다.
Figure 2: The statistics of the ChatHaruhi-54K dataset, showing 32 characters and 54,726 dialogues. The opaque bars indicate the original script data, while the translucent bars present simulated dialogues generated by models like Alpaca.
Figure 2: The statistics of the ChatHaruhi-54K dataset, showing 32 characters and 54,726 dialogues. The opaque bars indicate the original script data, while the translucent bars present simulated dialogues generated by models like Alpaca.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.