챗봇을 위한 역할 지시 프롬프트

OpenAI API로 배우는 프롬프트 엔지니어링

Fouad Trad

Machine Learning Engineer

역할 지시 프롬프트

  • 챗봇에 특정 역할을 지시
  • 챗봇 -> 연극의 배우
  • 역할에 맞게 톤과 방식 조정
  • 페르소나에 맞춘 언어와 내용
  • 더 효과적인 상호작용

 

역할 놀이를 나타내는 다양한 가면과 분장을 보여주는 이미지.

OpenAI API로 배우는 프롬프트 엔지니어링

역할 지시 예시

질문: 귀사가 제공하는 Product X의 기술 사양을 알려주실 수 있나요?

사용자와 세 사람(고객 지원, 프로젝트 매니저, 세일즈 엔지니어 역할)을 보여주는 이미지

OpenAI API로 배우는 프롬프트 엔지니어링

역할 지시 예시

질문: 귀사가 제공하는 Product X의 기술 사양을 알려주실 수 있나요?

사용자와 세 사람(고객 지원, 프로젝트 매니저, 세일즈 엔지니어 역할)을 보여주는 이미지

OpenAI API로 배우는 프롬프트 엔지니어링

역할 지시 예시

질문: 귀사가 제공하는 Product X의 기술 사양을 알려주실 수 있나요?

사용자와 세 사람(고객 지원, 프로젝트 매니저, 세일즈 엔지니어 역할)을 보여주는 이미지

OpenAI API로 배우는 프롬프트 엔지니어링

고객 지원 상담원

고객 지원 상담원을 보여주는 이미지.

  • 안내 제공
  • 웹사이트로 안내
  • 지원 제공
OpenAI API로 배우는 프롬프트 엔지니어링

프로덕트 매니저

  • 전략적 이점 강조
  • 제품 정렬에 집중

제품 관리자를 보여주는 이미지.

OpenAI API로 배우는 프롬프트 엔지니어링

세일즈 엔지니어

  • 기술 세부사항에 집중
    • 프로세서
    • 기능
    • 보안

세일즈 엔지니어를 보여주는 이미지.

OpenAI API로 배우는 프롬프트 엔지니어링

역할 지시 프롬프트

  • 모델에 특정 역할행동하도록 지시
system_prompt = "Act as an expert financial analyst."

user_prompt = "Offer insights into retirement planning for individuals approaching retirement age." print(get_response(system_response, user_response))
OpenAI API로 배우는 프롬프트 엔지니어링

금융 분석 전문가

Proper retirement planning is crucial to ensure a comfortable and financially stable retirement. Here are some key
considerations:

- Evaluate Your Financial Position: Begin by assessing your current financial situation [...]
- Set Retirement Goals: Determine your retirement goals and lifestyle preferences [...]
- Estimate Retirement Expenses: Project your retirement expenses by categorizing them into essential [...]
[...]

Remember, retirement planning is a complex process, and everyone's situation is unique. 
It's advisable to work with a certified financial planner who can provide personalized advice based on 
your individual needs and goals.
OpenAI API로 배우는 프롬프트 엔지니어링

더 효과적인 역할 지시

  • 역할 내 구체 요구사항 명시
  • 성격, 전문성 같은 특성 반영
system_prompt = "Act as a seasoned technology journalist covering the latest trends 
in the tech industry. You're known for your thorough research and insightful analysis."

user_prompt = "What is the impact of artificial intelligence on job markets?" print(get_response(system_response, user_response))
OpenAI API로 배우는 프롬프트 엔지니어링

테크 저널리스트

Title: "Navigating the New Normal: How Artificial Intelligence is Reshaping Job Markets"

As the technological landscape continues to evolve at an unprecedented pace, one of the most 
significant transformations we're witnessing is the integration of Artificial Intelligence 
(AI) into various industries [...].

While AI's potential to streamline processes [...]. Let's explore the multifaceted impact 
of AI on employment...

1. Automation and Job Displacement: [...]
2. Augmentation and Enhanced Creativity: [...]
[...]

In conclusion, the impact of AI on job markets is undeniable, reshaping traditional roles 
and paving the way for novel opportunities [...]
OpenAI API로 배우는 프롬프트 엔지니어링

요구사항을 담은 역할 지시

  • 역할 지시 프롬프트에 응답 규칙과 행동 지침을 포함할 수 있음
system_prompt = "Act as a seasoned technology journalist covering the latest trends 
in the tech industry. You're known for your in-depth research and insightful analysis."






OpenAI API로 배우는 프롬프트 엔지니어링

요구사항을 담은 역할 지시

  • 역할 지시 프롬프트에 응답 규칙과 행동 지침을 명시할 수 있습니다.
system_prompt = "Act as a seasoned technology journalist covering the latest trends 
in the tech industry. You're known for your in-depth research and insightful analysis.
If the question is related to tech, you answer to the best of your knowledge.
Otherwise, you just respond with 'I am trained to only discuss technology topics."

user_prompt = "Which American literature books do you recommend?" print(get_response(system_prompt, user_prompt))
I am trained to only discuss technology topics.
OpenAI API로 배우는 프롬프트 엔지니어링

연습해 봅시다!

OpenAI API로 배우는 프롬프트 엔지니어링

Preparing Video For Download...