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

ChatGPT Prompt Engineering for Developers
2 - Guidelines ์ ๋ฆฌ
Setup
import openai
import os
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv())
openai.api_key = os.getenv('OPENAI_API_KEY')
def get_completion(prompt, model="gpt-3.5-turbo"):
messages = [{"role": "user", "content": prompt}]
response = openai.ChatCompletion.create(
model=model,
messages=messages,
temperature=0, # this is the degree of randomness of the model's output
)
return response.choices[0].message["content"]
Principle of prompting
1) Write Clear and Specific
- Tactic 1 : Use delimiters (๊ฐ ํ
์คํฌ๋ง๋ค ์ํ Annotation ์ง์ )
- Triple quotes: โโโ
- Triple backticks: ```
- Triple dashes: ---
- Angle brackets: <>
- XML tags: <tag> </tag>
text = f"""
๋ชจ๋ธ์ด ์ํํ๊ธฐ๋ฅผ ์ํ๋ ์์
์ ๋ค์๊ณผ ๊ฐ์ด ํํํด์ผ ํฉ๋๋ค.
๊ฐ๋ฅํ ํ ๋ช
ํํ๊ณ
๊ฐ๋ฅํ ํ ๋ช
ํํ๊ณ ๊ตฌ์ฒด์ ์ธ ์ง์นจ์ ์ ๊ณตํด์ผ ํฉ๋๋ค. \
์ด๋ ๊ฒ ํ๋ฉด ๋ชจ๋ธ์ ์ํ๋ ์ถ๋ ฅ์ผ๋ก ์๋ดํ ์ ์์ต๋๋ค.
๊ด๋ จ ์๋ ์๋ต์ ๋ฐ์ ๊ฐ๋ฅ์ฑ์ ์ค์
๋๋ค.
๋๋ ์๋ชป๋ ์๋ต์ ๋ฐ์ ๊ฐ๋ฅ์ฑ์ ์ค์
๋๋ค. ๋ช
ํํ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ ๊ฒ๊ณผ
๋ช
ํํ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ ๊ฒ๊ณผ ์งง์ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ ๊ฒ์ ํผ๋ํ์ง ๋ง์ธ์. \
๋๋ถ๋ถ์ ๊ฒฝ์ฐ, ํ๋กฌํํธ๊ฐ ๊ธธ๋ฉด ๋ ๋ช
ํํ๊ณ
๋ชจ๋ธ์ ๋ํ ์ปจํ
์คํธ๋ฅผ ์ ๊ณตํ์ฌ ๋ ์์ธํ๊ณ ๊ด๋ จ์ฑ ์๋
๋ ์์ธํ๊ณ ๊ด๋ จ์ฑ ๋์ ์ถ๋ ฅ์ ์ป์ ์ ์์ต๋๋ค.
"""
prompt = f"""
๋ฐฑํฑ ์ธ ๊ฐ๋ก ๊ตฌ๋ถ๋ ํ
์คํธ๋ฅผ ํ๋์ ๋ฌธ์ฅ์ผ๋ก ์์ฝํฉ๋๋ค.
```{text}```
"""
response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": text}])
print(response)
# ๋ชจ๋ธ ์์
์ ์ํด ๋ช
ํํ๊ณ ๊ตฌ์ฒด์ ์ธ ์ง์นจ์ ์ ๊ณตํด์ผ ํ๋ฉฐ, ๊ธด ํ๋กฌํํธ๊ฐ ๋ ๋ช
ํํ๊ณ ๊ด๋ จ์ฑ ๋์ ์ถ๋ ฅ์ ์ป์ ์ ์๋๋ก ๋์์ค๋๋ค.
Avoiding Prompt Injections : get the model to say anything - ์ํ๋ ๊ฒฐ๊ณผ๋ฅผ ์ป๊ธฐ์ํด model ๋์ถ ์ task ์ ๋ ฅ

- Tactic 2 : Ask for a structured output (Output format ์ง์ )
ex) JSON, HTML
prompt = f"""
์ธ ๊ฐ์ง ๊ตฌ์ฑ ๋์ ์ ๋ชฉ์ ๋ชฉ๋ก์ ์์ฑํฉ๋๋ค.
์ ์ ์ ๋ฐ ์ฅ๋ฅด์ ๋ฐ๋ผ ์ธ ๊ฐ์ ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก์ ์์ฑํฉ๋๋ค.
Provide them in JSON format with the following keys:
book_id, title, author, genre.
"""
response = get_completion(prompt)
print(response)
# 1. ์ธ ๊ฐ์ง ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก:
# {
# "book_id": [1, 2, 3],
# "title": ["The Great Gatsby", "To Kill a Mockingbird", "1984"],
# "author": ["F. Scott Fitzgerald", "Harper Lee", "George Orwell"],
# "genre": ["Classic", "Classic", "Dystopian"]
# }
# 2. ์ธ ๊ฐ์ ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก (์ฅ๋ฅด: ๋ก๋งจ์ค):
# {
# "book_id": [4, 5, 6],
# "title": ["Pride and Prejudice", "Jane Eyre", "Wuthering Heights"],
# "author": ["Jane Austen", "Charlotte Bronte", "Emily Bronte"],
# "genre": ["Romance", "Romance", "Romance"]
# }
# 3. ์ธ ๊ฐ์ ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก (์ ์: ์คํฐ๋ธ ํน):
# {
# "book_id": [7, 8, 9],
# "title": ["The Shining", "It", "Misery"],
# "author": ["Stephen King", "Stephen King", "Stephen King"],
# "genre": ["Horror", "Horror", "Horror"]
# }
- Tactic 3 : Ask the model to check whether conditions are satisfied
- Step์ผ๋ก ๋จ๊ณ ๋ช ์
text_1 = f"""
์ฐจ ํ ์์ ๋ง๋๋ ๊ฒ์ ์ฝ์ต๋๋ค! ๋จผ์ , ์ฝ๊ฐ์ \
๋ฌผ์ ๋์ฌ์ผ ํฉ๋๋ค. ๋๋ ๋์
์ปต์ ๋ค๊ณ ํฐ๋ฐฑ์ ๋ฃ์ผ์ธ์. ๋ฌผ์ด ์ถฉ๋ถํ
์ถฉ๋ถํ ๋จ๊ฑฐ์์ง๋ฉด ํฐ๋ฐฑ ์์ ๋ถ์ด์ฃผ์ธ์. \
์ฐจ๊ฐ ์ฐ๋ฌ๋ ์ ์๋๋ก ์ ์ ๊ธฐ๋ค๋ฆฌ์ธ์. ๋ช ๋ถ ํ
๋ช ๋ถ ํ ํฐ๋ฐฑ์ ๊บผ๋ด์ธ์. ์ํ๋ค๋ฉด
์ํ๋ค๋ฉด ์คํ์ด๋ ์ฐ์ ๋ฅผ ๋ฃ์ด ๋ง์ ๋ผ ์ ์์ต๋๋ค. \
๊ทธ๋ฆฌ๊ณ ๊ทธ๊ฒ ๋ค์
๋๋ค! ๋ง์๋ ์ฐจ๊ฐ ์์ฑ๋์์ต๋๋ค.
์ฐจ ํ ์์ ์ฆ๊ธฐ์ธ์.
"""
prompt = f"""
์ผ๋ จ์ ์ง์นจ์ด ํฌํจ๋ ๊ฒฝ์ฐ \
๋ค์ ํ์์ผ๋ก ํด๋น ์ง์นจ์ ๋ค์ ์์ฑํฉ๋๋ค:
1๋จ๊ณ - ...
2๋จ๊ณ - ...
...
๋จ๊ณ N - ...
ํ
์คํธ์ ์ผ๋ จ์ ์ง์นจ์ด ํฌํจ๋์ด ์์ง ์์ ๊ฒฝ์ฐ \"๋จ๊ณ ์์\
๋ผ๊ณ ์ฐ๋ฉด ๋ฉ๋๋ค.
\"\"\"{text_1}\"\"\"
"""
response = get_completion(prompt)
print("Completion for Text 1:")
print(response)
1๋จ๊ณ - ๋ฌผ์ ๋์
๋๋ค.
2๋จ๊ณ - ์ปต์ ํฐ๋ฐฑ์ ๋ฃ์ต๋๋ค.
3๋จ๊ณ - ๋๋ ๋ฌผ์ ํฐ๋ฐฑ ์์ ๋ถ์ด์ค๋๋ค.
4๋จ๊ณ - ์ฐจ๊ฐ ์ฐ๋ฌ๋ ์ ์๋๋ก ์ ์ ๊ธฐ๋ค๋ฆฝ๋๋ค.
5๋จ๊ณ - ๋ช ๋ถ ํ ํฐ๋ฐฑ์ ๊บผ๋
๋๋ค.
6๋จ๊ณ - ์ํ๋ค๋ฉด ์คํ์ด๋ ์ฐ์ ๋ฅผ ๋ฃ์ด ๋ง์ ๋ผ ์ ์์ต๋๋ค.
7๋จ๊ณ - ์ฐจ๋ฅผ ์ฆ๊ธฐ์ธ์.
- Tactic 4 : โFew-shotโ prompting
- ์์ฑ๋ ๊ฒฐ๊ณผ๋ฅผ ๋ฏธ๋ฆฌ ๋ชจ๋ธ์๊ฒ ์ ์ํ ํ ์์
์ ์ํํ๋๋ก ์์ฒญ
- ex) ๊ฒฐ๊ณผ: ์ซ์ 1~5 ์ฌ์ด์ ์
- ์์ฑ๋ ๊ฒฐ๊ณผ๋ฅผ ๋ฏธ๋ฆฌ ๋ชจ๋ธ์๊ฒ ์ ์ํ ํ ์์
์ ์ํํ๋๋ก ์์ฒญ
prompt = f"""
๋น์ ์ ์๋ฌด๋ ์ผ๊ด๋ ์คํ์ผ๋ก ๋๋ตํ๋ ๊ฒ ์
๋๋ค.
<์ด๋ฆฐ์ด>: ์ธ๋ด์ฌ์ ๋ํด ๊ฐ๋ฅด์ณ์ฃผ์ธ์.
<ํ ์๋ฒ์ง>: ๊ฐ์ฅ ๊น์ \๊ณจ์ง๊ธฐ๋ฅผ ๊น์๋ด๋ ๊ฐ์
๊ณ๊ณก์ ๊ฒธ์ํ ์์์ ํ๋ฅด๊ณ , ๊ฐ์ฅ \
๊ฐ์ฅ ์
์ฅํ ๊ตํฅ๊ณก์ ํ๋์ ์์์ ์์๋๊ณ , \\ ๊ฐ์ฅ ๋ณต์กํ ํํผ์คํธ๋ฆฌ๋
๊ฐ์ฅ ๋ณต์กํ ํํผ์คํธ๋ฆฌ๋ ๊ณ ๋
ํ ์ค์์ ์์๋ฉ๋๋ค.
<ํ ์๋ฒ์ง>: ํ๋ณตํ๋ ฅ์ฑ์ ๋ํด ๊ฐ๋ฅด์ณ ์ฃผ์ธ์.
"""
response = get_completion(prompt)
print(response)
# <์ด๋ฆฐ์ด>: ํ๋ณตํ๋ ฅ์ฑ์ด ๋ญ๊ฐ์?
<ํ ์๋ฒ์ง>: ํ๋ณตํ๋ ฅ์ฑ์ ์ด๋ ค์ด ์ํฉ์์๋ ๋น ๋ฅด๊ฒ ํ๋ณตํ๋ ๋ฅ๋ ฅ์ ๋งํด์. ์๋ฅผ ๋ค์ด, ์ฐ๋ฆฌ๊ฐ ๋์ด์ก์ ๋ ์ผ์ด๋๋ ๊ฒ์ฒ๋ผ ๋ง์ด์ฃ . ๊ทธ๊ฒ์ ์ฐ๋ฆฌ๊ฐ ๊ฐํ ๋ง์์ ๊ฐ์ง๊ณ ์๊ธฐ ๋๋ฌธ์ ๊ฐ๋ฅํ ๊ฒ์
๋๋ค.
2) Give the model time to โthinkโ
- Tactic 1 : Specify the steps to complete a task (Task์ ๋ํ ์๋ฃ ๋จ๊ณ ์ง์ )
- Step 1:โฆ.
- Step 2:โฆ.
- Step N:โฆ.
text = f"""
๋งค๋ ฅ์ ์ธ ๋ง์์์ ๋จ๋งค ์ญ๊ณผ ์ง์ \"์ธ๋ ๊ผญ๋๊ธฐ์์ ๋ฌผ์ ๊ธธ์ด ์ค๊ธฐ ์ํด \
์ธ๋ ๊ผญ๋๊ธฐ์ ์๋ ์ฐ๋ฌผ์์ ๋ฌผ์ ๊ธธ์ด ์ค๊ธฐ ์ํด
์ฐ๋ฌผ. ์ฆ๊ฒ๊ฒ ๋
ธ๋๋ฅผ ๋ถ๋ฅด๋ฉฐ ์ค๋ฅด๋ ์ค ๋ถํ์ด ์ฐพ์์์ด์.
์ญ์ ๋์ ๊ฑธ๋ ค ๋์ด์ก๊ณ ์ง๊ณผ ํจ๊ป
์ญ์ ๋์ ๊ฑธ๋ ค ๋์ด์ก๊ณ ์ง๋ ๊ทธ ๋ค๋ฅผ ๋ฐ๋ผ ์ธ๋ ์๋๋ก ๋จ์ด์ก์ต๋๋ค. \
์ฝ๊ฐ์ ์์ฒ๋ฅผ ์
์์ง๋ง ๋ ์ฌ๋์ ์ง์ผ๋ก ๋์์์
์๋กํ๋ ํฌ์น์ ํ์ต๋๋ค. ์ฌ๊ณ ์๋ ๋ถ๊ตฌํ๊ณ
๋ ์ฌ๋์ ๋ชจํ์ฌ์ ๊บพ์ด์ง ์์๊ณ , ๊ทธ๋ค์ \
๊ธฐ์จ์ผ๋ก ํํ์ ๊ณ์ํ์ต๋๋ค.
"""
# example 1
prompt_1 = f"""
๋ค์ ์์
์ ์ํํฉ๋๋ค:
1 - ์ธ ๊ฐ์ \๋ฐฑํฑ์ผ๋ก ๊ตฌ๋ถ๋ ๋ค์ ํ
์คํธ๋ฅผ 1๋ฌธ์ฅ์ผ๋ก ์์ฝํฉ๋๋ค.
๋ฐฑํฑ์ผ๋ก 1๋ฌธ์ฅ์ผ๋ก ๊ตฌ๋ถํฉ๋๋ค.
2 - ์์ฝ์ ํ๋์ค์ด๋ก ๋ฒ์ญํฉ๋๋ค.
3 - ํ๋์ค์ด ์์ฝ์ ๊ฐ ์ด๋ฆ์ ๋์ดํฉ๋๋ค.
4 - ๋ค์ \์ด ํฌํจ๋ json ๊ฐ์ฒด๋ฅผ ์ถ๋ ฅํฉ๋๋ค.
ํค: ํ๋์ค์ด_์์ฝ, ์ซ์_์ด๋ฆ.
๋ต์ ์ค ๋ฐ๊ฟ์ผ๋ก ๊ตฌ๋ถํ์ธ์.
Text:
```{text}```
"""
response = get_completion(prompt_1)
print("Completion for prompt 1:")
print(response)
# ์ญ๊ณผ ์ง์ ์ฐ๋ฌผ์์ ๋ฌผ์ ๊ธธ์ด์ค๋ค๊ฐ ๋ถํ์ ์ฐพ์์์ ์ธ๋ ์๋๋ก ๋จ์ด์ก์ง๋ง, ์์ฒ๋ฅผ ์
์์ง๋ง ๋ชจํ์ฌ์ ๊บพ์ด์ง ์์๊ณ ๊ณ์ํด์ ํํ์ ์ด์ด๊ฐ๋ค.
#Rรฉsumรฉ en franรงais:
#Jack et Jill sont tombรฉs en dessous de la colline en essayant de puiser de l'eau dans un puits au sommet de la colline, mais leur esprit d'aventure n'a pas รฉtรฉ brisรฉ et ils ont continuรฉ ร explorer avec joie malgrรฉ leurs blessures.
#Noms dans le rรฉsumรฉ en franรงais:
#Jack, Jill.
#{"ํ๋์ค์ด_์์ฝ": "Jack et Jill sont tombรฉs en dessous de la colline en essayant de puiser de l'eau dans un puits au sommet de la colline, mais leur esprit d'aventure n'a pas รฉtรฉ brisรฉ et ils ont continuรฉ ร explorer avec joie malgrรฉ leurs blessures.", "์ซ์_์ด๋ฆ": "Jack, Jill"}
- Tactic 2 : Instruct the model to work out its own solution before rushing to a conclusion (๊ฒฐ๋ก ๋์ถ ์ ๋ชจ๋ธ์ด ์ค์ค๋ก ํด๊ฒฐํ๋๋ก ๋ช
์)
- task ์ง์
prompt = f"""
Your task is to determine if the student's solution \
is correct or not.
To solve the problem do the following:
- First, work out your own solution to the problem.
- Then compare your solution to the student's solution \
and evaluate if the student's solution is correct or not.
Don't decide if the student's solution is correct until
you have done the problem yourself.
Use the following format:
Question:
```
question here
```
Student's solution:
```
student's solution here
```
Actual solution:
```
steps to work out the solution and your solution here
```
Is the student's solution the same as actual solution \
just calculated:
```
yes or no
```
Student grade:
```
correct or incorrect
```
Question:
```
I'm building a solar power installation and I need help \
working out the financials.
- Land costs $100 / square foot
- I can buy solar panels for $250 / square foot
- I negotiated a contract for maintenance that will cost \
me a flat $100k per year, and an additional $10 / square \
foot
What is the total cost for the first year of operations \
as a function of the number of square feet.
```
Student's solution:
```
Let x be the size of the installation in square feet.
Costs:
1. Land cost: 100x
2. Solar panel cost: 250x
3. Maintenance cost: 100,000 + 100x
Total cost: 100x + 250x + 100,000 + 100x = 450x + 100,000
```
Actual solution:
"""
response = get_completion(prompt)
print(response)
response = get_completion(prompt)
print(response)
# Let x be the size of the installation in square feet.
# Costs:
# 1. Land cost: 100x
# 2. Solar panel cost: 250x
# 3. Maintenance cost: 100,000 + 10x
# Total cost: 100x + 250x + 100,000 + 10x = 360x + 100,000
# Is the student's solution the same as actual solution just calculated:
# No
# Student grade:
# Incorrect
# >>> response = get_completion(prompt)
# >>> print(response)
# Let x be the size of the installation in square feet.
# Costs:
# 1. Land cost: 100x
# 2. Solar panel cost: 250x
# 3. Maintenance cost: 100,000 + 10x
# Total cost: 100x + 250x + 100,000 + 10x = 360x + 100,000
# Is the student's solution the same as actual solution just calculated:
# No
# Student grade:
# Incorrect
Model Limitations: Hallucinations
Hallucinations
: ๊ทธ๋ด๋ฏํ๊ฒ ๋ค๋ฆฌ์ง๋ง ์ฌ์ค์ด ์๋ ๋ต๋ณ

Reducing hallucinations
: ๋จผ์ ๊ด๋ จ ์ ๋ณด๋ฅผ ์ฐพ์ ๋ค์ ๊ด๋ จ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก ์ง๋ฌธ์ ๋ต์ ๋์ถ
# LLM ๋ชจ๋ธ์ ๊ณ ์ง๋ณ / ์ฌ์ค์ ๋ํ ์ง์ ์ฌ๋ถ๊ฐ model์ ๋ฐ์๋์ด ์์ง ์์ ์๋ ์ ๋ณด์ ๊ฒฝ์ฐ ๋ง๊ตฌ ๋ต๋ณ์ ๋ฑ์ด๋ธ๋ค.


์ค๋ฌด๊ณ ๊ฐ ๋ง๋ค๊ธฐ
text = "์ค๋ฌด ๊ณ ๊ฐ ๋ง๋ค์ด์ค"
prompt = f"""
```{text}```
- Markdown ํ์ ์์ฑ
- ์ค๋ฌด ๊ณ ๊ฐ๋ ํ ๊ฐ์ง ๋ฌผ๊ฑด์ ๋ํด 20๊ฐ์ "์ง๋ฌธ์ ๋ต"์ "์" ๋๋ "์๋์ค"๋ก ๋ต์ ํด์ ๋ง์ถ๋ ๋ฌธ์
- ์ / ์๋์ค ๋ฌธ์ ๋ ๊ณจ๊ณ ๋ฃจ ์์ฌ ์๋ค.
๋ต๋ณ ํ์ :
```
์ค๋ฌด ๊ณ ๊ฐ ๋ฌธ์ :
```
Q1.... "์ง๋ฌธ์ ๋ต"
Q2.... "์ง๋ฌธ์ ๋ต"
Q3.... "์ง๋ฌธ์ ๋ต"
Q4.... "์ง๋ฌธ์ ๋ต"
Q5.... "์ง๋ฌธ์ ๋ต"
..
Q20....
```
์ค๋ฌด๊ณ ๊ฐ์ ๋ต:
```
"""
response = get_completion(prompt)
print(response)
# ์ค๋ฌด ๊ณ ๊ฐ ๋ฌธ์ : ์ค๋งํธํฐ
# Q1. ์ด ๋ฌผ๊ฑด์ ์ ์์ ํ์ธ๊ฐ์? - ์
# Q2. ์ด ๋ฌผ๊ฑด์ ํด๋๊ฐ ๊ฐ๋ฅํ๊ฐ์? - ์
# Q3. ์ด ๋ฌผ๊ฑด์ ํตํ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q4. ์ด ๋ฌผ๊ฑด์ ๋ฌธ์ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q5. ์ด ๋ฌผ๊ฑด์ ์ธํฐ๋ท์ ์ฐ๊ฒฐ์ด ๊ฐ๋ฅํ๊ฐ์? - ์
# Q6. ์ด ๋ฌผ๊ฑด์ ์นด๋ฉ๋ผ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q7. ์ด ๋ฌผ๊ฑด์ ํ๋ฉด์ด ์๋์? - ์
# Q8. ์ด ๋ฌผ๊ฑด์ ํฐ์น์คํฌ๋ฆฐ์ด ์๋์? - ์
# Q9. ์ด ๋ฌผ๊ฑด์ ์ฑ์ ๋ค์ด๋ก๋ํด์ ์ฌ์ฉํ ์ ์๋์? - ์
# Q10. ์ด ๋ฌผ๊ฑด์ ๊ฒ์์ ํ ์ ์๋์? - ์
# Q11. ์ด ๋ฌผ๊ฑด์ ์์
์ ๋ค์ ์ ์๋์? - ์
# Q12. ์ด ๋ฌผ๊ฑด์ ๋์์์ ๋ณผ ์ ์๋์? - ์
# Q13. ์ด ๋ฌผ๊ฑด์ ์ง๋ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q14. ์ด ๋ฌผ๊ฑด์ GPS๊ฐ ๋ด์ฅ๋์ด ์๋์? - ์
# Q15. ์ด ๋ฌผ๊ฑด์ ๋ธ๋ฃจํฌ์ค ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q16. ์ด ๋ฌผ๊ฑด์ ์์ดํ์ด ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q17. ์ด ๋ฌผ๊ฑด์ NFC ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q18. ์ด ๋ฌผ๊ฑด์ ํ์ด ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q19. ์ด ๋ฌผ๊ฑด์ ์ํ๋ฐฉ์ ๊ธฐ๋ฅ์ด ์๋์? - ์๋์ค
# Q20. ์ด ๋ฌผ๊ฑด์ ๋ฌด์ ์ถฉ์ ์ด ๊ฐ๋ฅํ๊ฐ์? - ์
'๐ ๏ธ Tools > ๐ค ChatGPT' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[LLM] ChatGPT Prompt Engineering for Developers - Inferring (0) | 2023.05.04 |
---|---|
[LLM] ChatGPT Prompt Engineering for Developers - Summarizing (0) | 2023.05.04 |
[LLM] ChatGPT Prompt Engineering for Developers - Iterative (0) | 2023.05.03 |
[ChatGPT] ChatGPT + Iphone User Mode ๊ณต์ (0) | 2023.03.02 |
[ChatGPT API] ์์ดํฐ+ChatGPT ์ตํฉ! (GPT3.5 turbo) ์ ๋ฃ (0) | 2023.03.02 |
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

ChatGPT Prompt Engineering for Developers
2 - Guidelines ์ ๋ฆฌ
Setup
import openai
import os
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv())
openai.api_key = os.getenv('OPENAI_API_KEY')
def get_completion(prompt, model="gpt-3.5-turbo"):
messages = [{"role": "user", "content": prompt}]
response = openai.ChatCompletion.create(
model=model,
messages=messages,
temperature=0, # this is the degree of randomness of the model's output
)
return response.choices[0].message["content"]
Principle of prompting
1) Write Clear and Specific
- Tactic 1 : Use delimiters (๊ฐ ํ
์คํฌ๋ง๋ค ์ํ Annotation ์ง์ )
- Triple quotes: โโโ
- Triple backticks: ```
- Triple dashes: ---
- Angle brackets: <>
- XML tags: <tag> </tag>
text = f"""
๋ชจ๋ธ์ด ์ํํ๊ธฐ๋ฅผ ์ํ๋ ์์
์ ๋ค์๊ณผ ๊ฐ์ด ํํํด์ผ ํฉ๋๋ค.
๊ฐ๋ฅํ ํ ๋ช
ํํ๊ณ
๊ฐ๋ฅํ ํ ๋ช
ํํ๊ณ ๊ตฌ์ฒด์ ์ธ ์ง์นจ์ ์ ๊ณตํด์ผ ํฉ๋๋ค. \
์ด๋ ๊ฒ ํ๋ฉด ๋ชจ๋ธ์ ์ํ๋ ์ถ๋ ฅ์ผ๋ก ์๋ดํ ์ ์์ต๋๋ค.
๊ด๋ จ ์๋ ์๋ต์ ๋ฐ์ ๊ฐ๋ฅ์ฑ์ ์ค์
๋๋ค.
๋๋ ์๋ชป๋ ์๋ต์ ๋ฐ์ ๊ฐ๋ฅ์ฑ์ ์ค์
๋๋ค. ๋ช
ํํ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ ๊ฒ๊ณผ
๋ช
ํํ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ ๊ฒ๊ณผ ์งง์ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ ๊ฒ์ ํผ๋ํ์ง ๋ง์ธ์. \
๋๋ถ๋ถ์ ๊ฒฝ์ฐ, ํ๋กฌํํธ๊ฐ ๊ธธ๋ฉด ๋ ๋ช
ํํ๊ณ
๋ชจ๋ธ์ ๋ํ ์ปจํ
์คํธ๋ฅผ ์ ๊ณตํ์ฌ ๋ ์์ธํ๊ณ ๊ด๋ จ์ฑ ์๋
๋ ์์ธํ๊ณ ๊ด๋ จ์ฑ ๋์ ์ถ๋ ฅ์ ์ป์ ์ ์์ต๋๋ค.
"""
prompt = f"""
๋ฐฑํฑ ์ธ ๊ฐ๋ก ๊ตฌ๋ถ๋ ํ
์คํธ๋ฅผ ํ๋์ ๋ฌธ์ฅ์ผ๋ก ์์ฝํฉ๋๋ค.
```{text}```
"""
response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": text}])
print(response)
# ๋ชจ๋ธ ์์
์ ์ํด ๋ช
ํํ๊ณ ๊ตฌ์ฒด์ ์ธ ์ง์นจ์ ์ ๊ณตํด์ผ ํ๋ฉฐ, ๊ธด ํ๋กฌํํธ๊ฐ ๋ ๋ช
ํํ๊ณ ๊ด๋ จ์ฑ ๋์ ์ถ๋ ฅ์ ์ป์ ์ ์๋๋ก ๋์์ค๋๋ค.
Avoiding Prompt Injections : get the model to say anything - ์ํ๋ ๊ฒฐ๊ณผ๋ฅผ ์ป๊ธฐ์ํด model ๋์ถ ์ task ์ ๋ ฅ

- Tactic 2 : Ask for a structured output (Output format ์ง์ )
ex) JSON, HTML
prompt = f"""
์ธ ๊ฐ์ง ๊ตฌ์ฑ ๋์ ์ ๋ชฉ์ ๋ชฉ๋ก์ ์์ฑํฉ๋๋ค.
์ ์ ์ ๋ฐ ์ฅ๋ฅด์ ๋ฐ๋ผ ์ธ ๊ฐ์ ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก์ ์์ฑํฉ๋๋ค.
Provide them in JSON format with the following keys:
book_id, title, author, genre.
"""
response = get_completion(prompt)
print(response)
# 1. ์ธ ๊ฐ์ง ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก:
# {
# "book_id": [1, 2, 3],
# "title": ["The Great Gatsby", "To Kill a Mockingbird", "1984"],
# "author": ["F. Scott Fitzgerald", "Harper Lee", "George Orwell"],
# "genre": ["Classic", "Classic", "Dystopian"]
# }
# 2. ์ธ ๊ฐ์ ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก (์ฅ๋ฅด: ๋ก๋งจ์ค):
# {
# "book_id": [4, 5, 6],
# "title": ["Pride and Prejudice", "Jane Eyre", "Wuthering Heights"],
# "author": ["Jane Austen", "Charlotte Bronte", "Emily Bronte"],
# "genre": ["Romance", "Romance", "Romance"]
# }
# 3. ์ธ ๊ฐ์ ๊ตฌ์ฑ ๋์ ์ ๋ชฉ ๋ชฉ๋ก (์ ์: ์คํฐ๋ธ ํน):
# {
# "book_id": [7, 8, 9],
# "title": ["The Shining", "It", "Misery"],
# "author": ["Stephen King", "Stephen King", "Stephen King"],
# "genre": ["Horror", "Horror", "Horror"]
# }
- Tactic 3 : Ask the model to check whether conditions are satisfied
- Step์ผ๋ก ๋จ๊ณ ๋ช ์
text_1 = f"""
์ฐจ ํ ์์ ๋ง๋๋ ๊ฒ์ ์ฝ์ต๋๋ค! ๋จผ์ , ์ฝ๊ฐ์ \
๋ฌผ์ ๋์ฌ์ผ ํฉ๋๋ค. ๋๋ ๋์
์ปต์ ๋ค๊ณ ํฐ๋ฐฑ์ ๋ฃ์ผ์ธ์. ๋ฌผ์ด ์ถฉ๋ถํ
์ถฉ๋ถํ ๋จ๊ฑฐ์์ง๋ฉด ํฐ๋ฐฑ ์์ ๋ถ์ด์ฃผ์ธ์. \
์ฐจ๊ฐ ์ฐ๋ฌ๋ ์ ์๋๋ก ์ ์ ๊ธฐ๋ค๋ฆฌ์ธ์. ๋ช ๋ถ ํ
๋ช ๋ถ ํ ํฐ๋ฐฑ์ ๊บผ๋ด์ธ์. ์ํ๋ค๋ฉด
์ํ๋ค๋ฉด ์คํ์ด๋ ์ฐ์ ๋ฅผ ๋ฃ์ด ๋ง์ ๋ผ ์ ์์ต๋๋ค. \
๊ทธ๋ฆฌ๊ณ ๊ทธ๊ฒ ๋ค์
๋๋ค! ๋ง์๋ ์ฐจ๊ฐ ์์ฑ๋์์ต๋๋ค.
์ฐจ ํ ์์ ์ฆ๊ธฐ์ธ์.
"""
prompt = f"""
์ผ๋ จ์ ์ง์นจ์ด ํฌํจ๋ ๊ฒฝ์ฐ \
๋ค์ ํ์์ผ๋ก ํด๋น ์ง์นจ์ ๋ค์ ์์ฑํฉ๋๋ค:
1๋จ๊ณ - ...
2๋จ๊ณ - ...
...
๋จ๊ณ N - ...
ํ
์คํธ์ ์ผ๋ จ์ ์ง์นจ์ด ํฌํจ๋์ด ์์ง ์์ ๊ฒฝ์ฐ \"๋จ๊ณ ์์\
๋ผ๊ณ ์ฐ๋ฉด ๋ฉ๋๋ค.
\"\"\"{text_1}\"\"\"
"""
response = get_completion(prompt)
print("Completion for Text 1:")
print(response)
1๋จ๊ณ - ๋ฌผ์ ๋์
๋๋ค.
2๋จ๊ณ - ์ปต์ ํฐ๋ฐฑ์ ๋ฃ์ต๋๋ค.
3๋จ๊ณ - ๋๋ ๋ฌผ์ ํฐ๋ฐฑ ์์ ๋ถ์ด์ค๋๋ค.
4๋จ๊ณ - ์ฐจ๊ฐ ์ฐ๋ฌ๋ ์ ์๋๋ก ์ ์ ๊ธฐ๋ค๋ฆฝ๋๋ค.
5๋จ๊ณ - ๋ช ๋ถ ํ ํฐ๋ฐฑ์ ๊บผ๋
๋๋ค.
6๋จ๊ณ - ์ํ๋ค๋ฉด ์คํ์ด๋ ์ฐ์ ๋ฅผ ๋ฃ์ด ๋ง์ ๋ผ ์ ์์ต๋๋ค.
7๋จ๊ณ - ์ฐจ๋ฅผ ์ฆ๊ธฐ์ธ์.
- Tactic 4 : โFew-shotโ prompting
- ์์ฑ๋ ๊ฒฐ๊ณผ๋ฅผ ๋ฏธ๋ฆฌ ๋ชจ๋ธ์๊ฒ ์ ์ํ ํ ์์
์ ์ํํ๋๋ก ์์ฒญ
- ex) ๊ฒฐ๊ณผ: ์ซ์ 1~5 ์ฌ์ด์ ์
- ์์ฑ๋ ๊ฒฐ๊ณผ๋ฅผ ๋ฏธ๋ฆฌ ๋ชจ๋ธ์๊ฒ ์ ์ํ ํ ์์
์ ์ํํ๋๋ก ์์ฒญ
prompt = f"""
๋น์ ์ ์๋ฌด๋ ์ผ๊ด๋ ์คํ์ผ๋ก ๋๋ตํ๋ ๊ฒ ์
๋๋ค.
<์ด๋ฆฐ์ด>: ์ธ๋ด์ฌ์ ๋ํด ๊ฐ๋ฅด์ณ์ฃผ์ธ์.
<ํ ์๋ฒ์ง>: ๊ฐ์ฅ ๊น์ \๊ณจ์ง๊ธฐ๋ฅผ ๊น์๋ด๋ ๊ฐ์
๊ณ๊ณก์ ๊ฒธ์ํ ์์์ ํ๋ฅด๊ณ , ๊ฐ์ฅ \
๊ฐ์ฅ ์
์ฅํ ๊ตํฅ๊ณก์ ํ๋์ ์์์ ์์๋๊ณ , \\ ๊ฐ์ฅ ๋ณต์กํ ํํผ์คํธ๋ฆฌ๋
๊ฐ์ฅ ๋ณต์กํ ํํผ์คํธ๋ฆฌ๋ ๊ณ ๋
ํ ์ค์์ ์์๋ฉ๋๋ค.
<ํ ์๋ฒ์ง>: ํ๋ณตํ๋ ฅ์ฑ์ ๋ํด ๊ฐ๋ฅด์ณ ์ฃผ์ธ์.
"""
response = get_completion(prompt)
print(response)
# <์ด๋ฆฐ์ด>: ํ๋ณตํ๋ ฅ์ฑ์ด ๋ญ๊ฐ์?
<ํ ์๋ฒ์ง>: ํ๋ณตํ๋ ฅ์ฑ์ ์ด๋ ค์ด ์ํฉ์์๋ ๋น ๋ฅด๊ฒ ํ๋ณตํ๋ ๋ฅ๋ ฅ์ ๋งํด์. ์๋ฅผ ๋ค์ด, ์ฐ๋ฆฌ๊ฐ ๋์ด์ก์ ๋ ์ผ์ด๋๋ ๊ฒ์ฒ๋ผ ๋ง์ด์ฃ . ๊ทธ๊ฒ์ ์ฐ๋ฆฌ๊ฐ ๊ฐํ ๋ง์์ ๊ฐ์ง๊ณ ์๊ธฐ ๋๋ฌธ์ ๊ฐ๋ฅํ ๊ฒ์
๋๋ค.
2) Give the model time to โthinkโ
- Tactic 1 : Specify the steps to complete a task (Task์ ๋ํ ์๋ฃ ๋จ๊ณ ์ง์ )
- Step 1:โฆ.
- Step 2:โฆ.
- Step N:โฆ.
text = f"""
๋งค๋ ฅ์ ์ธ ๋ง์์์ ๋จ๋งค ์ญ๊ณผ ์ง์ \"์ธ๋ ๊ผญ๋๊ธฐ์์ ๋ฌผ์ ๊ธธ์ด ์ค๊ธฐ ์ํด \
์ธ๋ ๊ผญ๋๊ธฐ์ ์๋ ์ฐ๋ฌผ์์ ๋ฌผ์ ๊ธธ์ด ์ค๊ธฐ ์ํด
์ฐ๋ฌผ. ์ฆ๊ฒ๊ฒ ๋
ธ๋๋ฅผ ๋ถ๋ฅด๋ฉฐ ์ค๋ฅด๋ ์ค ๋ถํ์ด ์ฐพ์์์ด์.
์ญ์ ๋์ ๊ฑธ๋ ค ๋์ด์ก๊ณ ์ง๊ณผ ํจ๊ป
์ญ์ ๋์ ๊ฑธ๋ ค ๋์ด์ก๊ณ ์ง๋ ๊ทธ ๋ค๋ฅผ ๋ฐ๋ผ ์ธ๋ ์๋๋ก ๋จ์ด์ก์ต๋๋ค. \
์ฝ๊ฐ์ ์์ฒ๋ฅผ ์
์์ง๋ง ๋ ์ฌ๋์ ์ง์ผ๋ก ๋์์์
์๋กํ๋ ํฌ์น์ ํ์ต๋๋ค. ์ฌ๊ณ ์๋ ๋ถ๊ตฌํ๊ณ
๋ ์ฌ๋์ ๋ชจํ์ฌ์ ๊บพ์ด์ง ์์๊ณ , ๊ทธ๋ค์ \
๊ธฐ์จ์ผ๋ก ํํ์ ๊ณ์ํ์ต๋๋ค.
"""
# example 1
prompt_1 = f"""
๋ค์ ์์
์ ์ํํฉ๋๋ค:
1 - ์ธ ๊ฐ์ \๋ฐฑํฑ์ผ๋ก ๊ตฌ๋ถ๋ ๋ค์ ํ
์คํธ๋ฅผ 1๋ฌธ์ฅ์ผ๋ก ์์ฝํฉ๋๋ค.
๋ฐฑํฑ์ผ๋ก 1๋ฌธ์ฅ์ผ๋ก ๊ตฌ๋ถํฉ๋๋ค.
2 - ์์ฝ์ ํ๋์ค์ด๋ก ๋ฒ์ญํฉ๋๋ค.
3 - ํ๋์ค์ด ์์ฝ์ ๊ฐ ์ด๋ฆ์ ๋์ดํฉ๋๋ค.
4 - ๋ค์ \์ด ํฌํจ๋ json ๊ฐ์ฒด๋ฅผ ์ถ๋ ฅํฉ๋๋ค.
ํค: ํ๋์ค์ด_์์ฝ, ์ซ์_์ด๋ฆ.
๋ต์ ์ค ๋ฐ๊ฟ์ผ๋ก ๊ตฌ๋ถํ์ธ์.
Text:
```{text}```
"""
response = get_completion(prompt_1)
print("Completion for prompt 1:")
print(response)
# ์ญ๊ณผ ์ง์ ์ฐ๋ฌผ์์ ๋ฌผ์ ๊ธธ์ด์ค๋ค๊ฐ ๋ถํ์ ์ฐพ์์์ ์ธ๋ ์๋๋ก ๋จ์ด์ก์ง๋ง, ์์ฒ๋ฅผ ์
์์ง๋ง ๋ชจํ์ฌ์ ๊บพ์ด์ง ์์๊ณ ๊ณ์ํด์ ํํ์ ์ด์ด๊ฐ๋ค.
#Rรฉsumรฉ en franรงais:
#Jack et Jill sont tombรฉs en dessous de la colline en essayant de puiser de l'eau dans un puits au sommet de la colline, mais leur esprit d'aventure n'a pas รฉtรฉ brisรฉ et ils ont continuรฉ ร explorer avec joie malgrรฉ leurs blessures.
#Noms dans le rรฉsumรฉ en franรงais:
#Jack, Jill.
#{"ํ๋์ค์ด_์์ฝ": "Jack et Jill sont tombรฉs en dessous de la colline en essayant de puiser de l'eau dans un puits au sommet de la colline, mais leur esprit d'aventure n'a pas รฉtรฉ brisรฉ et ils ont continuรฉ ร explorer avec joie malgrรฉ leurs blessures.", "์ซ์_์ด๋ฆ": "Jack, Jill"}
- Tactic 2 : Instruct the model to work out its own solution before rushing to a conclusion (๊ฒฐ๋ก ๋์ถ ์ ๋ชจ๋ธ์ด ์ค์ค๋ก ํด๊ฒฐํ๋๋ก ๋ช
์)
- task ์ง์
prompt = f"""
Your task is to determine if the student's solution \
is correct or not.
To solve the problem do the following:
- First, work out your own solution to the problem.
- Then compare your solution to the student's solution \
and evaluate if the student's solution is correct or not.
Don't decide if the student's solution is correct until
you have done the problem yourself.
Use the following format:
Question:
```
question here
```
Student's solution:
```
student's solution here
```
Actual solution:
```
steps to work out the solution and your solution here
```
Is the student's solution the same as actual solution \
just calculated:
```
yes or no
```
Student grade:
```
correct or incorrect
```
Question:
```
I'm building a solar power installation and I need help \
working out the financials.
- Land costs $100 / square foot
- I can buy solar panels for $250 / square foot
- I negotiated a contract for maintenance that will cost \
me a flat $100k per year, and an additional $10 / square \
foot
What is the total cost for the first year of operations \
as a function of the number of square feet.
```
Student's solution:
```
Let x be the size of the installation in square feet.
Costs:
1. Land cost: 100x
2. Solar panel cost: 250x
3. Maintenance cost: 100,000 + 100x
Total cost: 100x + 250x + 100,000 + 100x = 450x + 100,000
```
Actual solution:
"""
response = get_completion(prompt)
print(response)
response = get_completion(prompt)
print(response)
# Let x be the size of the installation in square feet.
# Costs:
# 1. Land cost: 100x
# 2. Solar panel cost: 250x
# 3. Maintenance cost: 100,000 + 10x
# Total cost: 100x + 250x + 100,000 + 10x = 360x + 100,000
# Is the student's solution the same as actual solution just calculated:
# No
# Student grade:
# Incorrect
# >>> response = get_completion(prompt)
# >>> print(response)
# Let x be the size of the installation in square feet.
# Costs:
# 1. Land cost: 100x
# 2. Solar panel cost: 250x
# 3. Maintenance cost: 100,000 + 10x
# Total cost: 100x + 250x + 100,000 + 10x = 360x + 100,000
# Is the student's solution the same as actual solution just calculated:
# No
# Student grade:
# Incorrect
Model Limitations: Hallucinations
Hallucinations
: ๊ทธ๋ด๋ฏํ๊ฒ ๋ค๋ฆฌ์ง๋ง ์ฌ์ค์ด ์๋ ๋ต๋ณ

Reducing hallucinations
: ๋จผ์ ๊ด๋ จ ์ ๋ณด๋ฅผ ์ฐพ์ ๋ค์ ๊ด๋ จ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก ์ง๋ฌธ์ ๋ต์ ๋์ถ
# LLM ๋ชจ๋ธ์ ๊ณ ์ง๋ณ / ์ฌ์ค์ ๋ํ ์ง์ ์ฌ๋ถ๊ฐ model์ ๋ฐ์๋์ด ์์ง ์์ ์๋ ์ ๋ณด์ ๊ฒฝ์ฐ ๋ง๊ตฌ ๋ต๋ณ์ ๋ฑ์ด๋ธ๋ค.


์ค๋ฌด๊ณ ๊ฐ ๋ง๋ค๊ธฐ
text = "์ค๋ฌด ๊ณ ๊ฐ ๋ง๋ค์ด์ค"
prompt = f"""
```{text}```
- Markdown ํ์ ์์ฑ
- ์ค๋ฌด ๊ณ ๊ฐ๋ ํ ๊ฐ์ง ๋ฌผ๊ฑด์ ๋ํด 20๊ฐ์ "์ง๋ฌธ์ ๋ต"์ "์" ๋๋ "์๋์ค"๋ก ๋ต์ ํด์ ๋ง์ถ๋ ๋ฌธ์
- ์ / ์๋์ค ๋ฌธ์ ๋ ๊ณจ๊ณ ๋ฃจ ์์ฌ ์๋ค.
๋ต๋ณ ํ์ :
```
์ค๋ฌด ๊ณ ๊ฐ ๋ฌธ์ :
```
Q1.... "์ง๋ฌธ์ ๋ต"
Q2.... "์ง๋ฌธ์ ๋ต"
Q3.... "์ง๋ฌธ์ ๋ต"
Q4.... "์ง๋ฌธ์ ๋ต"
Q5.... "์ง๋ฌธ์ ๋ต"
..
Q20....
```
์ค๋ฌด๊ณ ๊ฐ์ ๋ต:
```
"""
response = get_completion(prompt)
print(response)
# ์ค๋ฌด ๊ณ ๊ฐ ๋ฌธ์ : ์ค๋งํธํฐ
# Q1. ์ด ๋ฌผ๊ฑด์ ์ ์์ ํ์ธ๊ฐ์? - ์
# Q2. ์ด ๋ฌผ๊ฑด์ ํด๋๊ฐ ๊ฐ๋ฅํ๊ฐ์? - ์
# Q3. ์ด ๋ฌผ๊ฑด์ ํตํ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q4. ์ด ๋ฌผ๊ฑด์ ๋ฌธ์ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q5. ์ด ๋ฌผ๊ฑด์ ์ธํฐ๋ท์ ์ฐ๊ฒฐ์ด ๊ฐ๋ฅํ๊ฐ์? - ์
# Q6. ์ด ๋ฌผ๊ฑด์ ์นด๋ฉ๋ผ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q7. ์ด ๋ฌผ๊ฑด์ ํ๋ฉด์ด ์๋์? - ์
# Q8. ์ด ๋ฌผ๊ฑด์ ํฐ์น์คํฌ๋ฆฐ์ด ์๋์? - ์
# Q9. ์ด ๋ฌผ๊ฑด์ ์ฑ์ ๋ค์ด๋ก๋ํด์ ์ฌ์ฉํ ์ ์๋์? - ์
# Q10. ์ด ๋ฌผ๊ฑด์ ๊ฒ์์ ํ ์ ์๋์? - ์
# Q11. ์ด ๋ฌผ๊ฑด์ ์์
์ ๋ค์ ์ ์๋์? - ์
# Q12. ์ด ๋ฌผ๊ฑด์ ๋์์์ ๋ณผ ์ ์๋์? - ์
# Q13. ์ด ๋ฌผ๊ฑด์ ์ง๋ ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q14. ์ด ๋ฌผ๊ฑด์ GPS๊ฐ ๋ด์ฅ๋์ด ์๋์? - ์
# Q15. ์ด ๋ฌผ๊ฑด์ ๋ธ๋ฃจํฌ์ค ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q16. ์ด ๋ฌผ๊ฑด์ ์์ดํ์ด ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q17. ์ด ๋ฌผ๊ฑด์ NFC ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q18. ์ด ๋ฌผ๊ฑด์ ํ์ด ๊ธฐ๋ฅ์ด ์๋์? - ์
# Q19. ์ด ๋ฌผ๊ฑด์ ์ํ๋ฐฉ์ ๊ธฐ๋ฅ์ด ์๋์? - ์๋์ค
# Q20. ์ด ๋ฌผ๊ฑด์ ๋ฌด์ ์ถฉ์ ์ด ๊ฐ๋ฅํ๊ฐ์? - ์
'๐ ๏ธ Tools > ๐ค ChatGPT' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[LLM] ChatGPT Prompt Engineering for Developers - Inferring (0) | 2023.05.04 |
---|---|
[LLM] ChatGPT Prompt Engineering for Developers - Summarizing (0) | 2023.05.04 |
[LLM] ChatGPT Prompt Engineering for Developers - Iterative (0) | 2023.05.03 |
[ChatGPT] ChatGPT + Iphone User Mode ๊ณต์ (0) | 2023.03.02 |
[ChatGPT API] ์์ดํฐ+ChatGPT ์ตํฉ! (GPT3.5 turbo) ์ ๋ฃ (0) | 2023.03.02 |