본문 바로가기
ChatGPT 이용 및 활용/프롬프트 엔지니어링

프롬프트 엔지니어링이란?

by 열정주니어 2023. 7. 5.
반응형
해당 포스팅은 'Learn Prompting' 블로그 내용을 학습하며 요약한 글로
정확한 내용은 하단의 링크를 이용해 본문을 확인하시길 바랍니다.

 

프롬프트 엔지니어링을 이해하려면 먼저 몇 가지 매우 기본적인 AI 개념의 이해가 필요

 

AI란?

  • 인공지능(AI)은 지능을 갖춘 알고리즘으로 에세이 작성, 수학 문제 해결, 예술 창작 등 다양한 작업 수행 가능
  •  AI는 최근의 발전으로 매우 진보하여 저널리즘, 의료, 교육 등 여러 산업에서 혁신을 이루고 있으며, 이미 많은 직장이나 교실에서 AI를 사용하고 있거나 사용할 전망
  • AI는 매우 유용하지만 인간의 지시가 필요하며 이를 통해 AI를 적절히 이용할 수 있음

 

AI를 사용해야 하는 이유

  • AI는 이메일 작성, 보고서 작성, 심지어 코드 작성 등의 반복적이고 많은 시간을 소요하는 작업들을 자동화하는 데 사용할 수 있음
  • 해당 작업을 AI에게 설명할 수 있다면 AI는 해당 작업을 대신 수행하거나 적어도 시작점을 제공할 수 있음

 

프롬프트란?

  • 프롬프팅: AI에게 작업을 수행하도록 지시하는 프로세스
  • AI에게 일련의 지침(프롬프트)을 알려주면 AI가 작업을 수행
  • 프롬프트는 간단한 지침/질문과 같이 간단할 수도 있고 방대한 양의 텍스트로 복잡할 수도 있음

 

프롬프트 예시

1. 기사 요약

  • 플로리다의 폭설에 관한 기사를 읽고 있다고 가정
  • 기사의 주요 아이디어를 빨리 얻기 위해 기사 내용을 AI에게 보여주고 요약을 요청
It is very rare for snow to fall in the U.S. state of Florida, especially in the central and southern portions of the state. With the exception of the far northern areas of the state, most of the major cities in Florida have never recorded measurable snowfall, though trace amounts have been recorded, or flurries in the air observed few times each century. According to the National Weather Service, in the Florida Keys and Key West there is no known occurrence of snow flurries since the European colonization of the region more than 300 years ago. In Miami, Fort Lauderdale, and Palm Beach there has been only one known report of snow flurries observed in the air in more than 200 years; this occurred in January 1977. In any event, Miami, Fort Lauderdale, and Palm Beach have not seen snow flurries before or since this 1977 event.

Summarize this paragraph in a single sentence:
  • 내용이 요약된 AI 답변
Snowfall is extremely rare in Florida, with the exception of the far northern areas, and only one instance of snow flurries in the air has been recorded in the major cities of Miami, Fort Lauderdale, and Palm Beach in the last 200 years.

2. 수학 단어 문제 풀이

  • 언어 모델로 수학 방정식을 해결하는 경우 "What is [equation]?"라는 질문을 제기하여 프롬프트를 생성
What is 965*590?
  • 해당 프롬프트의 경우 GPT-3(text-davinci-003)에서 569,050(잘못된 값)으로 응답하는 경우가 있고, 여기에서 프롬프트 엔지니어링이 필요

 

프롬프트 엔지니어링

  • "What is 965*590?" 대신 "Make sure your answer is exactly correct. What is 965*590? Make sure your answer is exactly correct:"로 요청하면 GPT-3는 569350(맞는 값)으로 대답
  • 왜 그런지, AI에게 정답을 달라고 두 번 말하는 것이 도움이 되는 이유는 무엇인지, 작업에 대해 최적의 결과를 가져오는 프롬프트를 어떻게 만들 수 있는지 등이 Prompt Engineering 분야의 초점

 

Reference

Learn Prompting -> Basics -> Introduction, Prompting

- https://learnprompting.org/docs/category/-basics

 

😃 Basics | Learn Prompting: Your Guide to Communicating with AI

Intro to PE and simple PE techniques.

learnprompting.org

 

반응형

'ChatGPT 이용 및 활용 > 프롬프트 엔지니어링' 카테고리의 다른 글

챗봇 프롬프팅  (0) 2023.07.06
프롬프트 엔지니어링 방법  (0) 2023.07.05