상위: 00_00_MOC
00_02 — 정의 수렴과 프롬프트 엔지니어링 비교
핵심 명제
Lütke와 Karpathy의 트윗(2025-06) 이후 주요 기관들이 저마다 정의를 다듬었고, 그 결과는 놀랍도록 비슷한 그림으로 수렴했다. 세 정의가 공유하는 공통분모는 (a) 동적 시스템, (b) right information / format / time, (c) 최소·고신호 토큰 큐레이팅이다.
1. 3대 핵심 정의
Philipp Schmid (2025-06-30)
“Context Engineering is the discipline of designing and building dynamic systems that provides the right information and tools, in the right format, at the right time, to give a LLM everything it needs to accomplish a task.”
Schmid는 이 분야의 중요성을 이렇게 짚는다.
“Agent failures aren’t only model failures; they are context failures.”
Anthropic Applied AI Team (2025-09-29)
저자: Prithvi Rajasekaran, Ethan Dixon, Carly Ryan, Jeremy Hadfield, Rafi Ayub, Hannah Moran, Cal Rueb, Connor Jennings
“Context engineering refers to the set of strategies for curating and maintaining the optimal set of tokens (information) during LLM inference, including all the other information that may land there outside of the prompts.”
“good context engineering means finding the smallest possible set of high-signal tokens that maximize the likelihood of some desired outcome.”
Cognition AI (인용: Lance Martin, 2025)
“Context engineering is effectively the #1 job of engineers building AI agents.”
2. 컨텍스트의 7가지 구성요소 (Philipp Schmid 분류)
현대 LLM 애플리케이션의 컨텍스트 윈도우는 단순한 “프롬프트”가 아니다. Schmid는 이를 7가지 구성요소로 나눈다.
| # | 구성요소 | 영어명 | 설명 |
|---|---|---|---|
| 1 | 지시문/시스템 프롬프트 | Instructions / System Prompt | 행동 정의, 규칙, Few-shot 예제 |
| 2 | 사용자 프롬프트 | User Prompt | 즉각적 태스크 입력 |
| 3 | 상태/히스토리 | State / History | 현재 대화의 단기 메모리 |
| 4 | 장기 메모리 | Long-Term Memory | 세션을 가로지르는 지속 지식 |
| 5 | 검색 정보 | Retrieved Information / RAG | 외부 DB·문서 |
| 6 | 가용 도구 | Available Tools | 함수 정의, MCP 도구 |
| 7 | 구조화 출력 | Structured Output | 응답 형식 정의 (JSON 스키마 등) |
LlamaIndex(2025-07-03)는 여기에 Global State/Context를 더해 여덟 번째 요소로 본다.
3. 프롬프트 엔지니어링 vs. 컨텍스트 엔지니어링
Anthropic의 정리가 가장 명료하다. “Prompt engineering is a subset of context engineering.”
프롬프트 엔지니어링은 사라지지 않는다. 다만 컨텍스트 엔지니어링이라는 더 큰 우산 아래로 포섭될 뿐이다.
| 구분 | 프롬프트 엔지니어링 | 컨텍스트 엔지니어링 |
|---|---|---|
| 대상 | 단일 텍스트 스트링 | 토큰 전체 (시스템·도구·메모리·히스토리) |
| 타이밍 | 사전 정적(pre-static) | 추론 시점마다 동적 큐레이팅 |
| 주요 질문 | ”어떻게 쓸까?" | "무엇을, 얼마나, 어떤 형태로 넣을까?” |
| 적용 범위 | 단일 호출(one-shot) | 멀티턴, 툴루프, 장기 에이전트 |
| 핵심 제약 | 명확성(clarity) | 어텐션 예산(attention budget) |
| 설계 단위 | 텍스트 스트링 | 동적 시스템 |
graph TD CW[컨텍스트 윈도우<br/>Context Window] CW --> SP[시스템 프롬프트<br/>System Prompt] CW --> UP[사용자 프롬프트<br/>User Prompt] CW --> SH[상태/히스토리<br/>State / History] CW --> LM[장기 메모리<br/>Long-Term Memory] CW --> RAG[검색 정보<br/>RAG / Retrieved Docs] CW --> TD[도구 정의<br/>Tool Definitions] CW --> SO[구조화 출력<br/>Structured Output] SP --> |정적 사전 설계| PE[프롬프트 엔지니어링<br/>Prompt Engineering] SH --> |동적 런타임 관리| CE[컨텍스트 엔지니어링<br/>Context Engineering] LM --> CE RAG --> CE TD --> CE style CE fill:#ff9900,color:#000 style PE fill:#6699cc,color:#fff
4. “Cheap Demo vs. Magical Agent” — 가장 짧은 답
Schmid의 대비가 직관적이다.
- Cheap Demo: 사용자 입력만 컨텍스트에 들어 있어 로봇 같고 뻔한 응답이 나온다.
- Magical Agent: 캘린더, 이메일 히스토리, 연락처, 툴 정의를 동적으로 구성해 맥락에 맞는 사람다운 응답이 나온다.
두 경우 모델은 똑같다. 차이는 오직 컨텍스트뿐이다. 이 대비가 “왜 컨텍스트 엔지니어링인가”에 대한 가장 짧은 답이다.
참고문헌
- The New Skill in AI is Not Prompting, It’s Context Engineering — Philipp Schmid, 2025-06-30, 개인 블로그
- Effective Context Engineering for AI Agents — Prithvi Rajasekaran et al., 2025-09-29, Anthropic Engineering Blog
- Context Engineering for Agents — LangChain Team, 2025-07-02, LangChain Blog
- Context Engineering — What it is, and techniques to consider — Tuana Çelik, Logan Markewich, 2025-07-03, LlamaIndex Blog
관련 노트: 00_01-용어-탄생과-계보 · 00_03-Transformer-어텐션-KV캐시 · 00_07-4대-전략-Write-Select-Compress-Isolate · 00_핵심용어집