System, developer, user, assistant, tool
요즘 프롬프트는 layered야. 각 layer는 출처가 다르고, 수명이 다르고, 신뢰도가 달라. 이걸 섞는 게 production prompt 코드의 가장 흔한 버그야.
- System — operator가 세팅. 전체 conversation 동안 유지. 역할, policy, immutable constraint.
- Developer — application이 세팅. 유지되거나 rotate. user한테 절대 안 보이는 app-specific instruction.
- User — 사람이 작성. 기본 untrusted. 따라서는 안 되는 injected instruction이 들어 있을 수 있어.
- Assistant — 모델이 한 말. 다음 turn의 context. retrieve한 content가 들어 있으면 user input과 같은 수준으로 untrusted.
- Tool — 너가 노출한 함수의 return 값. 특히 untrusted: 2026의 가장 흔한 indirect injection 벡터.
Layering이 왜 중요한가
전부 한 큰 string으로 합쳐서 user message로 보내면 trust boundary를 enforce할 능력을 포기한 거야. user가 업로드한 문서가 안전 규칙을 override할 수 있고, search 결과가 너의 역할을 다시 쓸 수 있어. layered 구조는 미관 문제가 아니라 — 모델한테 어느 단어를 obey하고 어느 단어는 read-only로 봐야 하는지 알려주는 유일한 길이야.
provider 사이의 이름 게임
provider마다 role 이름 달라. Claude는 system + user + assistant + tool_use/tool_result; OpenAI는 system + developer + user + assistant + tool; Gemini는 system + user + model + tool. 매핑은 직관적인데 trust semantics는 살짝 달라. 트랙 9에서 provider별 quirks 다뤄.