상황 효과적으로 설정하기
‘당신은 …입니다’, ‘…라는 점을 고려하면’, ‘목표는 …입니다’와 같은 구성 기법을 익힙니다.
상황 효과적으로 설정하기은(는) CoddyKit의 무료 AI Prompt Engineering 강의입니다. 이것은 4개 중 3번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 AI Prompt Engineering 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. AI Prompt Engineering 강의에는 총 4개의 강의가 포함되어 있습니다.
효과적인 시작 프레임
프롬프트의 첫 문장이 가장 중요합니다. 첫 문장은 모델의 작업 맥락, 즉 뒤에 이어지는 모든 내용을 해석하는 관점을 설정합니다.
효과적인 시작 프레임에는 당신은..., 맥락은..., ...라는 점을 고려하면..., 목표는...이 있습니다. 각각은 실제 작업을 시작하기 전에 맥락의 서로 다른 측면을 활성화합니다.
'당신은...' 프레임
당신은... 프레임은 모델에 특정 역할을 부여합니다. 이 프레임을 사용하면 해당 역할과 관련된 어휘, 추론 방식, 우선순위가 활성화됩니다.
핵심은 구체적으로 작성하는 것입니다. '당신은 전문가입니다'는 약한 표현입니다. '당신은 10년 경력의 선임 파이썬 엔지니어이며 기발한 해결책보다 가독성을 중시합니다'는 강한 표현입니다.
역할 프레임은 여러분에게 필요한 특정 사고방식과 소통 방식을 역할에 담아낼 때 가장 효과적입니다.
import anthropic
client = anthropic.Anthropic(api_key='sk-ant-your-key-here')
persona_prompts = [
'You are a Socratic philosophy professor. Ask 3 probing questions about this claim: AI will replace programmers.',
'You are a skeptical venture capitalist who has seen 500 pitches. Give brutal feedback on this pitch: We are building an AI writing assistant.',
'You are a patient kindergarten teacher. Explain what a computer does in 3 sentences for 5-year-olds.'
]
for prompt in persona_prompts:
response = client.messages.create(
model='claude-opus-4-5',
max_tokens=150,
messages=[{'role': 'user', 'content': prompt}]
)
print(f'--- Persona ---')
print(prompt[:80] + '...')
print(response.content[0].text.strip())
print()시스템 메시지의 ‘당신은…’ 프레임
페르소나 프레임을 배치하기에 가장 효과적인 곳은 사용자 발화가 아니라 시스템 메시지입니다. 시스템 메시지의 페르소나는 대화 전체에서 계속 활성 상태로 유지되므로 반복해서 지정할 필요가 없습니다.
잘 설계된 시스템 페르소나는 수십 개의 후속 질문에 대해 AI 도우미가 응답하는 방식을 완전히 바꿀 수 있습니다.
import openai
client = openai.OpenAI(api_key='sk-your-key-here')
# Persona set once in system; stays active for all turns
system_persona = (
'You are Marcus, a senior software architect at a Fortune 500 company. '
'You have 20 years of experience with distributed systems. '
'Your communication style: direct, pragmatic, no buzzwords. '
'You always ask about scale and failure modes before giving architecture advice. '
'If a question lacks context, ask one clarifying question before answering.'
)
response = client.chat.completions.create(
model='gpt-4o',
messages=[
{'role': 'system', 'content': system_persona},
{'role': 'user', 'content': 'Should we use microservices for our new product?'}
]
)
print(response.choices[0].message.content)‘상황은…’ 프레임
‘context는…’ 프레임은 페르소나를 지정하지 않고 상황의 배경을 설정합니다. 특정 인물을 따르게 하기보다 자신의 구체적인 상황을 모델이 추론해야 할 때 사용하십시오.
이 프레임은 모델이 본연의 방식으로 추론하되 사용자의 제약 조건을 충분히 인식해야 하는 기술 및 분석 작업에 특히 효과적입니다.
import anthropic
client = anthropic.Anthropic(api_key='sk-ant-your-key-here')
response = client.messages.create(
model='claude-opus-4-5',
max_tokens=300,
messages=[{
'role': 'user',
'content': (
'The context is: we are a 5-person startup with $2M in seed funding. '
'Our Python monolith handles 10,000 users and is starting to show performance issues. '
'We have one backend engineer and cannot hire more for 6 months. '
'We need to choose between refactoring the monolith vs migrating to microservices.\n\n'
'Give a recommendation with 3 supporting reasons. Be direct.'
)
}]
)
print(response.content[0].text)‘…라는 전제에서’ 프레임
…라는 전제에서 프레임은 전체 응답의 방향을 결정하는 전제나 가정을 설정합니다. 작업의 목적상 모델이 참으로 간주해야 하는 사실을 정립할 때 사용하십시오.
이는 특정한 출발점에서 추론해야 하는 가설 분석, 조건부 계획 수립, 시나리오 기반 글쓰기에 강력하게 활용할 수 있습니다.
import openai
client = openai.OpenAI(api_key='sk-your-key-here')
scenarios = [
'Given that our user base will grow 10x in 6 months, what architecture changes should we make today?',
'Given that we must launch in 2 weeks with the current team, which features should we cut from the MVP?',
'Given that our API key was exposed publicly for 3 hours, what steps should we take in the next 24 hours?'
]
for scenario in scenarios:
response = client.chat.completions.create(
model='gpt-4o',
max_tokens=120,
messages=[{
'role': 'user',
'content': scenario + ' (Answer in 3 bullet points.)'
}]
)
print(f'Scenario: {scenario[:60]}...')
print(response.choices[0].message.content.strip())
print()‘목표는…’ 프레임
목표는…입니다 프레임은 출력물의 최종 목적을 명시합니다. 이 프레임은 작업 지시와는 다릅니다. 이 출력물이 왜 필요한지, 그리고 무엇을 달성해야 하는지를 설명합니다.
이 프레임은 모델이 더 나은 세부 결정을 내리도록 돕습니다. 예를 들어 어느 정도로 설득할지, 어떤 반론을 미리 다룰지, 어떤 세부 정보를 포함하거나 생략할지를 결정할 수 있습니다.
import anthropic
client = anthropic.Anthropic(api_key='sk-ant-your-key-here')
goal_frames = [
(
'The goal is to get the reader to schedule a 30-minute demo call. '
'Write a 100-word cold outreach email for our AI data pipeline tool '
'targeting data engineers at e-commerce companies.'
),
(
'The goal is to help the reader pass a senior Python interview at a FAANG company. '
'Explain Python decorators with one conceptual explanation and one practical code example.'
)
]
for prompt in goal_frames:
response = client.messages.create(
model='claude-opus-4-5',
max_tokens=200,
messages=[{'role': 'user', 'content': prompt}]
)
print('--- Goal Frame ---')
print(prompt[:80] + '...')
print(response.content[0].text.strip())
print()시작 프레임 결합하기
가장 강력한 프롬프트는 작업 지시를 제시하기 전에 여러 시작 프레임을 결합합니다. 일반적인 고성능 구조는 다음과 같습니다.
- 당신은…입니다 [페르소나]
- context는…입니다 [상황]
- 목표는…입니다 [최종 목적]
- …라는 전제에서 [핵심 가정 또는 제약 조건]
- [작업 지시]
각 프레임은 방향 설정을 한 겹씩 더합니다. 이들을 함께 사용하면 모델이 추측해야 할 부분이 거의 남지 않습니다.
import openai
client = openai.OpenAI(api_key='sk-your-key-here')
combined_frame_prompt = (
'You are a senior product manager with 10 years of B2B SaaS experience.\n'
'The context is: our team is debating whether to build a native mobile app '
'or keep investing in our responsive web app.\n'
'The goal is: to help our leadership team make a clear go/no-go decision at '
'next week\'s board meeting.\n'
'Given that: we have 3 engineers, $300k runway, and 85% of current users are on desktop.\n\n'
'Write a 250-word recommendation memo with a clear position (build or wait) '
'and 3 supporting arguments. End with one risk to monitor.'
)
response = client.chat.completions.create(
model='gpt-4o',
messages=[{'role': 'user', 'content': combined_frame_prompt}]
)
print(response.choices[0].message.content)어조와 문체를 설정하는 프레임
시작 프레임은 ‘어조’라는 단어를 전혀 사용하지 않고도 어조와 문체를 설정할 수 있습니다. 페르소나와 상황을 설명하면 문체가 암묵적으로 정해집니다.
- ‘어려움을 겪는 학생에게 따뜻하고 인내심 있게 말하는 멘토입니다’ → 자연스럽게 따뜻하고 격려하는 말투가 됩니다.
- ‘빈틈없이 일하는 군수 장교입니다’ → 자연스럽게 직접적이고 정확한 말투가 됩니다.
- ‘와이어드에 글을 쓰는 재치 있는 기술 기자입니다’ → 자연스럽게 재치 있고 이해하기 쉬운 문체가 됩니다.
import anthropic
client = anthropic.Anthropic(api_key='sk-ant-your-key-here')
frames = [
'You are a warm, patient mentor. Explain why learning to code is hard but worth it.',
'You are a no-nonsense military logistics officer. Explain why learning to code is hard but worth it.',
'You are a witty tech journalist writing for Wired. Explain why learning to code is hard but worth it.'
]
for frame in frames:
response = client.messages.create(
model='claude-opus-4-5',
max_tokens=80,
messages=[{'role': 'user', 'content': frame + ' (2 sentences only)'}]
)
print(f'Frame: {frame[:55]}...')
print(response.content[0].text.strip())
print()분석의 엄밀성을 위한 프레임
열정적인 동의가 아니라 엄밀하고 비판적인 분석이 필요하다면, 회의적이거나 분석적인 사고방식을 명시적으로 활성화하는 프레임으로 시작하십시오.
- ‘약점을 찾아내는 것이 임무인 비판적 검토자입니다…’
- ‘악마의 변호인 역할을 하여 다음 내용을 반박하십시오…’
- ‘통념과 반대되는 내용을 가정하고 주장하십시오…’
- ‘…에 반대하는 가장 약한 논거를 가장 강력한 형태로 재구성하십시오…’
import openai
client = openai.OpenAI(api_key='sk-your-key-here')
analytical_frames = [
'You are a critical reviewer whose job is to find fatal flaws. Review this startup idea: a subscription box for AI prompt templates.',
'Play devil\'s advocate. Challenge this claim: AI will make every knowledge worker 10x more productive.',
'Steelman the weakest argument against remote work, then give the strongest counter-argument.'
]
for frame in analytical_frames:
response = client.chat.completions.create(
model='gpt-4o',
max_tokens=120,
messages=[{'role': 'user', 'content': frame + ' (3 sentences max)'}]
)
print(f'Frame type: analytical/critical')
print(f'Prompt: {frame[:60]}...')
print(response.choices[0].message.content.strip())
print()페르소나 프레임을 사용하지 말아야 할 때(NOT)
페르소나 프레임이 항상 적절한 도구는 아닙니다. 다음과 같은 경우에는 사용하지 마십시오.
- 객관적인 데이터 추출이 필요할 때 — 페르소나가 편향을 더합니다.
- 구조화된 데이터를 처리할 때 — 페르소나가 주의를 분산시킵니다.
- 작업이 순전히 기계적일 때 — 추론이 필요하지 않습니다.
- 모델의 진솔한 평가를 원할 때 — 페르소나가 의견의 방향을 바꿉니다.
‘이 CSV를 JSON으로 변환하십시오’ 또는 ‘이 문단의 문장 수를 세십시오’와 같은 작업에는 프레임이 필요하지 않습니다. 지시만 제시하면 됩니다.
import anthropic
client = anthropic.Anthropic(api_key='sk-ant-your-key-here')
# Persona frame is unhelpful here — just adds tokens
prompt_with_unnecessary_frame = (
'You are an expert data processing specialist with years of experience. '
'Convert the following to JSON: Name: Alice, Age: 30, City: London'
)
# Clean, direct instruction
prompt_direct = (
'Convert to a JSON object with keys name, age, city:\n'
'Name: Alice, Age: 30, City: London'
)
for label, prompt in [('WITH UNNECESSARY FRAME', prompt_with_unnecessary_frame), ('DIRECT', prompt_direct)]:
response = client.messages.create(
model='claude-opus-4-5',
max_tokens=50,
messages=[{'role': 'user', 'content': prompt}]
)
print(f'[{label}]')
print(response.content[0].text.strip())
print()프레임 검증하기
자신의 사용 사례에 어떤 프레임이 효과적인지 알아보는 가장 좋은 방법은 A/B 검증을 실행하는 것입니다. 같은 작업에 서로 다른 시작 프레임을 사용하고 출력을 비교하십시오.
다음 측면을 검증하십시오.
- 프레임 없음과 페르소나 프레임 비교
- 모호한 페르소나와 구체적인 페르소나 비교
- context 프레임만 사용하는 경우와 context + 목표 프레임을 사용하는 경우 비교
- 프레임 하나와 프레임 여러 개를 결합한 경우 비교
업무의 각 작업 범주에서 어떤 프레임이 가장 좋은 출력을 만드는지 기록해 두십시오.
import openai
client = openai.OpenAI(api_key='sk-your-key-here')
task = 'Explain the pros and cons of using TypeScript over JavaScript.'
frames = {
'No frame': task,
'Persona frame': f'You are a TypeScript advocate who also knows JavaScript deeply. {task}',
'Goal frame': f'The goal is to help a JavaScript developer decide if switching to TypeScript is worth it. {task}',
'Combined frame': f'You are a pragmatic senior engineer. The goal is to help a JavaScript developer decide. {task} Give a balanced view in 3 bullet points.'
}
for label, prompt in frames.items():
response = client.chat.completions.create(
model='gpt-4o', max_tokens=80,
messages=[{'role': 'user', 'content': prompt}]
)
print(f'[{label}]: {response.choices[0].message.content.strip()[:120]}...')
print()지식 확인
한 개발자가 자신의 스타트업 발표 자료에 대해 AI가 비판적이고 가혹한 피드백을 제공하기를 원합니다. 격려도 균형도 없이 순전히 적대적인 비평을 원한다면, 어떤 시작 프레임이 가장 효과적입니까?
상황 설정 — 복습
시작 프레임은 모델이 작업 지시를 읽기 전에 방향을 잡아 줍니다. 가장 효과적인 네 가지 프레임은 다음과 같습니다.
- ‘당신은…입니다’: 구체적인 전문성, 소통 방식, 우선순위를 지닌 페르소나를 지정합니다.
- ‘context는…입니다’: 페르소나 없이 상황의 배경을 설정합니다.
- ‘…라는 전제에서’: 모델이 참으로 간주해야 하는 전제나 제약 조건을 설정합니다.
- ‘목표는…입니다’: 출력물의 최종 목적을 정의합니다.
복잡한 작업에는 프레임을 결합하십시오. 순전히 기계적인 작업에는 프레임을 사용하지 마십시오. 프레임을 다양하게 구성해 보고 자신의 사용 사례에 가장 잘 맞는 방식을 찾으십시오.
자주 묻는 질문
“상황 효과적으로 설정하기” 강의는 무료인가요?
네 — “상황 효과적으로 설정하기” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 AI Prompt Engineering 강의 전체를 잠금 해제할 수 있습니다. AI Prompt Engineering 강의에는 총 4개의 강의가 포함되어 있습니다.
“상황 효과적으로 설정하기”에서 뭘 배우나요?
‘당신은 …입니다’, ‘…라는 점을 고려하면’, ‘목표는 …입니다’와 같은 구성 기법을 익힙니다. 브라우저에서 직접 실행하는 실습 코드로 AI Prompt Engineering을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
AI Prompt Engineering을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 AI Prompt Engineering은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 3번째 강의입니다.
“상황 효과적으로 설정하기” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 AI Prompt Engineering 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 AI Prompt Engineering 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 인공지능 프롬프트에서 맥락이란 무엇인가
- 배경 정보 제공하기
- 상황 효과적으로 설정하기
- 맥락의 길이와 관련성