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

Body: 선택적 Source와 Reference

~25 min · sources, retrieval, selectivity

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

Body는 working set

Body는 spine과 tail 사이 layer — 이번 turn scope의 source 파일, retrieval된 문서, 아직 중요한 최근 tool result. 의도적으로 선택적. 전체 repo나 knowledge base를 body에 로드하는 게 이 layer가 막으려는 실패 모드.

Source annotate

모든 body item은 짧은 header에서 이득 — 어디서 왔는지, 언제 로드됐는지, 왜 여기 있는지. 모형이 이 header로 사실 위치 찾고 stale/irrelevant material discount. 나중에 prompt audit하는 사람한테도 도움.

Body churn은 정상

Spine과 달리 body는 변하라고 만든 거. 새 질문이 새 source 로드. 옛 source는 attention 못 받게 되면 evict. 정적 body는 보통 워크플로가 over-load + under-page 신호.

Body는 working set이지 corpus 아니야. CPU cache처럼 다뤄 — 필요할 때 로드, stale하면 evict.

Code

Annotated body section·xml
<sources>
  <file path="backend/auth.py" loaded="this-turn" reason="task references auth flow">
    ... contents ...
  </file>
  <retrieval doc="OAuth RFC 6749" relevance=0.91 loaded="this-turn">
    ... excerpt ...
  </retrieval>
</sources>
Body loader 패턴·python
def build_body(task):
    body = []
    for path in task.required_files:
        body.append({"kind": "file", "path": path, "text": read(path)})
    for q in task.retrieval_queries:
        for hit in retrieve(q, top_k=3):
            body.append({"kind": "retrieval", "doc": hit.id, "text": hit.text})
    return body

External links

Exercise

code-review 워크플로용 annotated body section 설계. source-file entry 1, retrieval entry 1 — provenance와 reason 둘 다 포함.
Hint
사실의 출처를 모형이 추측해야 한다면, prompt가 annotation 빠진 거야.

Progress

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

댓글 0

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

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