본문 바로가기

Data Science/Prompt Engineering

ChatGPT Prompt Engineering for Developers - (4) Summarizing

반응형

DeepLearning.AI 강의 ChatGPT Prompt Engineering for Developers - Summarizing 요약

 

https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/

 

ChatGPT Prompt Engineering for Developers

What you’ll learn in this course In ChatGPT Prompt Engineering for Developers, you will learn how to use a large language model (LLM) to quickly build new and powerful applications.  Using the OpenAI API, you’ll...

www.deeplearning.ai

글 요약할 때 사용할 수 있는 방법들

 

- 단어 수 / 문장 수 / 글자 수 등 제한 지시

prompt = f"""
Your task is to generate a short summary of a product \
review from an ecommerce site. 

Summarize the review below, delimited by triple 
backticks, in at most 30 words. 

Review: ```{prod_review}```
"""

 

- 특정 키워드에 초점을 맞춰서 요약 지시

prompt = f"""
Your task is to generate a short summary of a product \
review from an ecommerce site to give feedback to the \
pricing deparmtment, responsible for determining the \
price of the product.  

Summarize the review below, delimited by triple 
backticks, in at most 30 words, and focusing on any aspects \
that are relevant to the price and perceived value. 

Review: ```{prod_review}```
"""

 

- 요약(summarize) 대신 추출(extract) 지시

prompt = f"""
Your task is to extract relevant information from \ 
a product review from an ecommerce site to give \
feedback to the Shipping department. 

From the review below, delimited by triple quotes \
extract the information relevant to shipping and \ 
delivery. Limit to 30 words. 

Review: ```{prod_review}```
"""
반응형