C.W.K.
Stream
Lesson 01 of 05 · published

Spine: 안정적 Rule과 Tool Schema

~24 min · system-prompt, tools, stability

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

Spine이 일을 carry한다

Long-running prompt는 구조적으로 세 zone — spine(안정), body(선택적), tail(live). spine은 turn 사이 안 변해야 할 모든 것 — system rule, tool schema, reusable example, role 정의. 위에, system prompt나 첫 user message에 살고, request 사이 byte-identical해야 caching이 hit.

Spine 안정성의 복합 이득

Cache hit rate 올라감. Attention sink behavior가 rule 선호. Request 간 diff review가 trivial. 모형 behavior가 예측 가능 — 운영 context가 예측 가능하니까. 매 turn timestamp나 live state로 system prompt 재생성하면 다 사라져.

Spine을 versioning

Spine을 코드처럼 다뤄 — version label 붙이고, change-log하고, rule 바꾸면 명시적으로 version bump. Telemetry는 request당 spine version 기록. behavior 바뀌면 모형 탓인지 input 탓인지 rule 탓인지 알아야 해.

Code

Spine layout·markdown
<!-- SPINE v3 -->
# Role
You are an AI assistant for project X.

# Rules (do not modify between turns)
- Always validate before commit.
- Never push without human confirmation.

# Tool schemas
- search(query: string) -> list[doc]
- read(path: string) -> string
- write(path: string, content: string) -> void

# Reusable examples
... (stable few-shots) ...
Per-request telemetry·json
{
  "spine_version": "rules-v3",
  "tool_schema_version": "tools-v2",
  "cached_input_tokens": 28401,
  "fresh_input_tokens": 1230
}

External links

Exercise

long-running prompt 하나 골라. spine 식별. turn-to-turn 변하는 거 다 spine에서 명확히 분리된 tail section으로 빼. spine에 version comment.
Hint
오늘 날짜, request id, 사용자 입력 들은 거 다 tail에 속해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.