본문 바로가기
🤖 AI/AI

📖논문 - Principled Instructions Are All You Need for Questioning LLaMA-1/2, GPT-3.5/4

by 정람지 2024. 3. 20.
Prompt engineering is the art of communicating with a generative large language model.
- ChatGPT 2023

 

 

Beyond mere task instruction, recent studies have shifted towards understanding the semantic and contextual nuances in prompts, examining how subtle changes can lead to significantly different responses from the LLM.

- 논문 중


📖 논문

 

Principled Instructions Are All You Need for Questioning LLaMA-1/2, GPT-3.5/4

This paper introduces 26 guiding principles designed to streamline the process of querying and prompting large language models. Our goal is to simplify the underlying concepts of formulating questions for various scales of large language models, examining

arxiv.org

 

 


🤖 정리

 

the specialized prompts we introduced have en- hanced both the quality and accuracy of the LLM responses by an average of 57.7% and 36.4%, respectively, when applied to GPT-4. Furthermore, the improvements are more pronounced with the increase in model size, for example, the performance gains when moving from LLaMA-2-7B to GPT-4 exceed 20%.

퀄리티 57.7 퍼센트 상승 

정확도 36.4 퍼센트 상승

모델의 크기가 클수록 정확도 상승


Ask-Me-Anything prompting

- 여러 개의 불완전한 프롬프트 통합

Chain-of-Thought method

복잡한 작업에 대한 중간 추론 단계 생성

east-to-most prompting

복잡한 문제를 간단한 하위 문제로

Directional Stimulus Prompting

보조 프롬프트 생성하기


5 Categories

Prompt Structure and Clarity

"integrate the intended audience in the prompt such as the audience is an expert in the field"

 

Specificity and Information

“Ensure that your answer is unbiased and does not rely on stereotypes.”

 

User Interaction and Engagement

 Allow the model to elicit precise details and requirements from you by asking you questions until he has enough information to provide the needed output.

“From now on, I would like you to ask me questions to...”.

 

Content and Language Style

No need to be polite with LLM so there is no need to add phrases like 

“please”, “if you don’t mind”, “thank you”, “I would like to”

get straight to the point

 

Complex Tasks and Coding Prompts

Break down complex tasks into a sequence of simpler prompts in an interactive conversation


26 Principles

📍본론만 말하기

- 예의를 갖추지 말기

📍 청중 설정

- 의도한 청중을 설정하고 질문

📍세분화

복잡한 작업을 간단한 프롬프트로 세분화

단계별 접근

📍긍정 지시문

부정문을 쓰지 말고 긍정문을 쓰기

"do" ( dont nono)

📍어린이 청자

"어린아이에게 설명하듯"

o Explain [insert specific topic] in simple terms.
o Explain to me like I’m 11 years old.
o Explain to me as if I’m a beginner in [field].
o Write the [essay/text/paragraph] using simple English like you’re explaining something to a 5-year-old.

📍팁 설정

" 더 나은 답변을 하면 팁을 줄게"

 “I’m going to tip $xxx for a better solution!”

📍예시 설정

few - shot prompting

예시를 넣기

📍지시,예시, 질문 설정

구간을 나누어 ( 지시,예시, 질문 ) 프롬프트 작성

start with ‘###Instruction###’, followed by either ‘###Example###’ or ‘###Question###’

📍임무 설정

" 당신의 임무는" "당신은 반드시" 포함 

“Your task is” and “You MUST”

📍협박하기

" 당신은 불이익을 받을 것입니다", " 벌점을 받을 겁니다", 등 포함 

“You will be penalized”.

📍인간적인 방식

"자연스럽고 인간적인 방식으로 주어진 질문에 답해" 포함

 ”Answer a question given in a natural, human-like manner” 

📍단계별 생각

"단계별로 생각해" 포함

" think step by step"

📍편견 제거

" 대답이 편견이 없고 고정관념에 의존하는 것을 피하세요"

 “Ensure that your answer is unbiased and avoids relying on stereotypes.”

📍질문 시키기

정보가 충분할 때까지 질문을 하라고 시키기

 “From now on, I would like you to ask me questions to ...”

📍테스트 추가

지식 뒤에 테스트 추가 요청

- 내가 답변할 때까지 테스트 같은 질문을 하라고 함

“Teach me any [theorem/topic/rule name] and include a test at the end, and let me know if my answers are correct after I respond, without providing the answers beforehand.”

📍역할 부여

역할을 부여하고 대화하기

- " 당신이 --라면"

📍구분 기호 사용

delimters

구분 기호를 사용하여 구분

📍반복하기

특정 단어(중점 화제)를 반복하여 사용

📍CoT + 예시

chain-of-thought

few-shot prompt 

📍출력 문구 지정

" 설명 : "

"반박: "

📍필요한 모든 정보 추가

"필요한 모든 정보를 추가하여"

: “Write a detailed [essay/text /paragraph] for me on [topic] in detail by adding all the information necessary”.

📍텍스트 개선

"사용자가 보낸 모든 텍스트를 개선"

 “Try to revise every paragraph sent by users. You should only improve the user’s grammar and vocabulary and make sure it sounds natural. You should maintain the original writing style, ensuring that a formal paragraph remains formal.”

📍여러 개의 파일

- 여러 파일의 프로젝트를 만드는 스크립트를 요청

“From now and on whenever you generate code that spans more than one file, generate a [programming language ] script that can be run to automatically create the specified files or make changes to existing files to insert the generated code. [your question]”.

📍제시어 기반 글

특정 단어, 구, 문장을 사용하여 텍스트 생성

I’m providing you with the beginning [song lyrics/story/paragraph/essay...]: [Insert lyrics/words/sentence]. Finish it based on the words provided. Keep the flow consistent.

📍키워드 제시

특정 키워드를 포함한 텍스트 생성

keywords, regulations, hint, or instructions

 

📍동일 언어 사용

" --- 제공된 텍스트를 기반으로 동일한 언어를 사용하여 묘사합니다"

Use the same language based on the provided paragraph[/title/text /essay/answer].


model improve

Boosting

The result of boosting refers to the percentage increase in response quality across a set of questions when the proposed principles are applied

Correctness

The concept of correctness refers to the precision of the model’s outputs or responses, ensuring they are accuraterelevant, and devoid of errors. We consider both absolute and relative correctness accuracy.


Boosting/ correctness 상승

모델 크기가 클수록 더 효율이 상승하는 모습을 보임


🤖 Read

재밋다


🤖 plus

마크다운 언어 알아들음

- 코드블럭/제목 등

 

영어로 하는 것이 더 정확함

 

근데 지피티4 번역실력 끝내준다

파파고의 10000배

아마 분야별 전문 지식이 있어서 더 그렇게 느껴지는 것 같다 컴퓨터 용어들번역굿

 

'🤖 AI > AI' 카테고리의 다른 글

🪻구축형 AI 환경 세팅하기 🪻  (1) 2024.04.08
✅ Viuron - Kia_EV6_RAG  (0) 2024.04.01
LLM - 냥plus🐈  (3) 2024.01.28
신촌정보 MY GPTS 만들어보기  (0) 2024.01.24
🦾LLM 강의 정리~!~!🦾  (4) 2024.01.23