Abstract:
- 이 논문은 대규모 언어 모델(LLM)을 지시(Instruction) 기반으로 학습시키는 과정에서, 인간이 직접 복잡하고 다양한 지시문을 작성하는 데 드는 노력을 줄이고자 하는 시도를 다룸.
- 구체적으로, 저자들은 Evol-Instruct라는 기법을 통해, 이미 존재하는 단순한 지시문을 단계적으로 다시 쓰고 확장하여, 점진적으로 더 복잡한 지시문을 대규모로 생성할 수 있음을 보였음.
- 이렇게 생성된 방대한 양의 지시 데이터를 LLaMA 모델을 통해 미세조정한 결과 모델의 이름을 WizardLM이라 명명.
- 논문의 주요 내용:
- 지시 데이터 생성 어려움:
- 기존의 지시 기반 학습(Instruct Tuning) 접근법은 주로 사람이 직접 지시문(Instruction)을 만들고, 이에 맞춰 답변을 작성하는 방식.
- 하지만 인간이 고난도 지시문(복잡도가 높은, 전문성이 필요한 지시문)을 대규모로 생산하기는 시간과 인력 면에서 굉장히 부담스럽다고 함.
- Evol-Instruct 기법:
- 저자들은 “Evol-Instruct(진화형 지시 생성)” 기법을 제안하여, 현재 가지고 있는 지시문들을 단계별로 점차 복잡하게 변형(rewrite)하는 과정을 자동화 했음.
- 이 과정을 통해 저복잡도→중간복잡도→고복잡도 식으로 지시문을 진화시켜, 인간이 일일이 작성하는 것보다 훨씬 많은 수준의 복합 지시문을 확보할 수 있었다고.
- 지시 데이터 생성 어려움:
- 주요 발견:
- 인간 평가(Human Evaluation)에서, 복잡도를 균등하게 고려한 테스트 세트 및 Vicuna의 공개 테스트셋으로 평가해본 결과, Evol-Instruct로 생성된 지시문이 사람 손으로 만들어진 지시문보다 더 우수한 것으로 발견됨.
- 특히 고난도 지시문을 다루는 부분에서, WizardLM 모델의 답변이 오픈AI의 ChatGPT보다 더 선호된다는 평가를 얻었음.
- GPT-4를 이용한 자동 평가에서도, 29개 항목 중 17개 항목에 대해 ChatGPT 기능의 90% 이상을 달성하는 성능을 보였음.
- 코드와 데이터는 https://github.com/nlpxucan/WizardLM에서 공개되어 있다고 함.
- 데이터를 어떤 지시문을 이용해서 생성하느냐에 따라 고품질의 데이터를 만들 수 있다고 함.
Evol-Instruct 방법의 세부 사항:

- Evol-Instruct 는 두 가지 구성 요소로 이뤄져있음: '지침 발전기(Instruction Evolver)'와 '지침 제거기(Instruction Eliminator)'입니다
- 지침 발전기(Instruction Evolver): 이 구성 요소는 간단한 초기 지침을 기반으로 지침을 더 복잡하게 발전시키거나 새로운 지침을 생성하여 다양성을 높이는 역할을 함:
- 이 과정은 특정 프롬프트를 통해 이루어지며, 상세 발전(In-Depth Evolving)과 폭넓은 발전(In-Breadth Evolving) 두 가지 유형의 발전 방법으로 세분화됨.
- 상세 발전 특화 프롬프트:
- 상세 발전에서는 특정 프롬프트를 사용하여 지침을 더 복잡하고 어렵게 만들기 위한 다섯 가지 방법(add constraints, deepening(심화), concretizing(구체화), increase reasoning steps, complicate input)이 사용됨.
- Add Constraints:
- "Please add one more constraints/requirements"라는 지시를 통해 원래 지침에 비해 더 많은 조건을 요구하게 만들어 문제를 해결하기 어렵게 만드는 식으로 만듬.
- 그리고 여기서 추가된 내용은 단어 수 제한(10~20 단어) 내에서 이루어져야 하며, 불필요한 장황함을 피하도록 함.
- Deepening Prompt:
- "increased depth and breadth of the inquiry"를 통해 기존의 간단한 질문을 더 깊고 복잡한 질문으로 발전시킴.
- 이렇게 함으로써 AI가 처리하기 더 어려운 문제로 만들 수 있다.
- Concretizing Prompt:
- 이 프롬프트는 일반적인 개념을 더 구체적인 개념으로 대체합니다. "Please replace general concepts with more specific concepts."라는 요청을 통해, 추상적인 내용을 구체적인 예시로 발전시켜 명료성은 유지하면서도 처리 난이도를 증가시킵니다
- Increased Reasoning Steps Prompt:
- 이 프롬프트는 간단한 사고 과정으로 해결 가능한 문제를 여러 단계의 추론 과정을 필요로 하도록 변경합니다. "request multiple-step reasoning"이라는 지시를 통해 AI가 더 깊은 사고를 거쳐 문제를 해결해야 하게끔 문제를 재구성합니다
- Complicating Input:
- 이 프롬프트는 입력 데이터의 복잡성을 증가시킵니다. "[XML data] format data" 또는 "JSON data as input"와 같은 형식을 추가함으로써, AI가 더 복잡한 데이터 구조를 처리해야 하도록 문제를 바꿈.
- 폭넓은 발전 프롬프트:
- 주어진 지침을 기반으로 완전히 새로운 지침을 생성하여 주제 및 기술의 커버리지와 전체 데이터셋의 다양성을 강화함.
- 방법론:
- 새로운 지시 생성:
- "create a brand new prompt"라는 지시를 통해 주어진 지침에서 영감을 받아 완전히 새로운 지침을 만들도록 유도.
- 이 새로운 지침은 동일한 도메인 내에서 더 희귀한 주제를 다루도록 함. 이는 기존 데이터셋이 종종 주제 및 기술 다양성이 부족하다는 문제점을 해결하기 위한 접근임.
- 유사한 길이와 난이도 유지:
- 새로운 지침이 "LENGTH and difficulty level"에서 #Given Prompt#와 유사해야 한다고 명시함으로써, 난이도와 길이의 균형을 유지하도록 지침을 조정함. 이는 새로 생성된 지침이 원래 지침과 비교했을 때 과도하게 쉽거나 어렵지 않도록 보장한다.
- 이해 가능성과 응답 가능성 유지:
- "must be reasonable and must be understood and responded by humans" 라는 조건은, 생성된 지침이 인간이 이해하고 응답할 수 있는 형태로 유지되어야 한다는 것을 명확히 함. 이는 AI 시스템이 학습할 때 현실적인 시나리오에서 유용하도록 지침을 보장하는 역할을 합니다
- 용어의 사용 제한:
- 지침 작성 시 "‘#Given Prompt#’, ‘#Created Prompt#’, ‘given prompt’ and ‘created prompt’가 "생성된 지침에 나타나지 않도록" 제한함.
- 이런 용어는 창의적인 프롬프트가 생성이 안되었다는 뜻일 수 있다고 함.
- 새로운 지시 생성:
- 지침 제거기(Instruction Eliminator):
- 이 구성 요소는 발전 과정에서 실패한 지침을 걸러내어 제거하는 역할을 함.
- 실패로 간주하는 상황은 4가지가 있음:
- (1) 발전된 지침이 원래 지침에 비해 정보이득을 제공하지 않는 경우.
- (2) 발전된 지침에 대해 LLM이 응답을 생성하기 어려운 경우. 생성된 응답에 'sorry'가 포함되고, 길이가 짧다면(80단어 미만) 이 경우를 포함합니다.
- (3) LLM이 생성한 응답이 구두점(= 쉼표와 마침표)과 불용어만 포함할 때.
- (4) 발전된 지침에 발전 프롬프트에서 직접적으로 복사된 단어들이 포함되어 있을 때(예: 'given prompt', 'rewritten prompt' 등).
특화 프롬프트 예시:
add constraints:
I want you act as a Prompt Rewriter.
Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4) a bit harder to handle.
But the rewritten prompt must be reasonable and must be understood and responded by humans.
Your rewriting cannot omit the non-text parts such as the table and code in #Given Prompt#:. Also, please do not omit the input in #Given Prompt#.
You SHOULD complicate the given prompt using the following method:
Please add one more constraints/requirements into #Given Prompt#
You should try your best not to make the #Rewritten Prompt# become verbose, #Rewritten Prompt# can only add 10 to 20 words into #Given Prompt#.
‘#Given Prompt#’, ‘#Rewritten Prompt#’, ‘given prompt’ and ‘rewritten prompt’ are not allowed to appear in #Rewritten Prompt#
#Given Prompt#:
<Here is instruction.>
#Rewritten Prompt#:
Deepening Prompt:
I want you act as a Prompt Rewriter.
Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4) a bit harder to handle.
But the rewritten prompt must be reasonable and must be understood and responded by humans.
Your rewriting cannot omit the non-text parts such as the table and code in #Given Prompt#:. Also, please do not omit the input in #Given Prompt#.
You SHOULD complicate the given prompt using the following method:
If #Given Prompt# contains inquiries about certain issues, the depth and breadth of the inquiry can be increased. or
You should try your best not to make the #Rewritten Prompt# become verbose, #Rewritten Prompt# can only add 10 to 20 words into #Given Prompt#.
‘#Given Prompt#’, ‘#Rewritten Prompt#’, ‘given prompt’ and ‘rewritten prompt’ are not allowed to appear in #Rewritten Prompt#
#Given Prompt#:
<Here is instruction.>
#Rewritten Prompt#:
Concretizing Prompt:
I want you act as a Prompt Rewriter.
Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4) a bit harder to handle.
But the rewritten prompt must be reasonable and must be understood and responded by humans.
Your rewriting cannot omit the non-text parts such as the table and code in #Given Prompt#:. Also, please do not omit the input in #Given Prompt#.
You SHOULD complicate the given prompt using the following method:
Please replace general concepts with more specific concepts. or
You should try your best not to make the #Rewritten Prompt# become verbose, #Rewritten Prompt# can only add 10 to 20 words into #Given Prompt#.
‘#Given Prompt#’, ‘#Rewritten Prompt#’, ‘given prompt’ and ‘rewritten prompt’ are not allowed to appear in #Rewritten Prompt#
#Given Prompt#:
<Here is instruction.>
#Rewritten Prompt#:
Increased Reasoning Steps Prompt:
I want you act as a Prompt Rewriter.
Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4) a bit harder to handle.
But the rewritten prompt must be reasonable and must be understood and responded by humans.
Your rewriting cannot omit the non-text parts such as the table and code in #Given Prompt#:. Also, please do not omit the input in #Given Prompt#.
You SHOULD complicate the given prompt using the following method:
If #Given Prompt# can be solved with just a few simple thinking processes, you can rewrite it to explicitly request multiple-step reasoning.
You should try your best not to make the #Rewritten Prompt# become verbose, #Rewritten Prompt# can only add 10 to 20 words into #Given Prompt#.
‘#Given Prompt#’, ‘#Rewritten Prompt#’, ‘given prompt’ and ‘rewritten prompt’ are not allowed to appear in #Rewritten Prompt#
#Given Prompt#:
<Here is instruction.>
#Rewritten Prompt#:
complicating input:
I want you act as a Prompt Rewriter.
Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4) a bit harder to handle.
But the rewritten prompt must be reasonable and must be understood and responded by humans.
You must add [XML data] format data as input data in [Rewritten Prompt]
#Given Prompt#:
<Here is Demonstration instruction 1.>
#Rewritten Prompt#:
<Here is Demonstration Example 1.>
... N -1 Examples ...
I want you act as a Prompt Rewriter.
Your objective is to rewrite a given prompt into a more complex version to make those famous AI systems (e.g., ChatGPT and GPT4) a bit harder to handle.
But the rewritten prompt must be reasonable and must be understood and responded by humans.
You must add [#Given Dataformat#] format data as input data, add [#Given Dataformat#] code as input code in [Rewritten Prompt]
Rewrite prompt must be a question style instruction
#Given Prompt#:
<Here is instruction.>
#Rewrite prompt must be a question style instruction Rewritten Prompt(MUST contain a specific JSON data as input#:
폭넓은 발전 프롬프트 예시:
I want you act as a Prompt Creator.
Your goal is to draw inspiration from the #Given Prompt# to create a brand new prompt.
This new prompt should belong to the same domain as the #Given Prompt# but be even more rare.
The LENGTH and difficulty level of the #Created Prompt# should be similar to that of the #Given Prompt#. The #Created Prompt# must be reasonable and must be understood and responded by humans.
‘#Given Prompt#’, ‘#Created Prompt#’, ‘given prompt’ and ‘created prompt’ are not allowed to appear in #Created Prompt#.
#Given Prompt#:
<Here is instruction.>
#Created Prompt#:
'Generative AI > Fine-tuning' 카테고리의 다른 글
Reinforced Self-Training (ReST) for Language Modeling (0) | 2025.01.22 |
---|---|
Magicoder: Empowering Code Generation with OSS-INSTRUCT (0) | 2025.01.22 |
Fine-tuned Language Models are Zero-shot Learners (0) | 2025.01.20 |
SELF-INSTRUCT: Aligning Language Models with Self-Generated Instructions (0) | 2025.01.19 |
Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Models (0) | 2025.01.16 |