C.W.K.
Stream
Lesson 09 of 10 · published

Multi-document 프롬프트 — 순서, boundary, 이름

~16 min · context, multi-document, structure

Level 0수련생
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

blob-of-text가 망하는 곳

5개 문서를 separator 없이 user message에 paste하면 모델이 conflate, 잘못된 거 pick, union 요약하는 레시피야. Multi-document 프롬프트는 explicit boundary, 이름, ordering decision 필요해.

Boundary tag

XML 같은 tag나 stable id 박힌 fenced section 써. 각 문서가 모델이 reference 가능하고 user가 verify 가능한 이름 받아.

Ordering decision

  • relevance로 — most-relevant 먼저. RAG default.
  • recency로 — support ticket, news에 유용.
  • authority로 — official doc 먼저, community 둘째. reference 질문에 유용.
  • source로 — multi-source 결과 group. 비교 필요할 때.

boundary 읽으라는 instruction

Synthesis 프롬프트가 구조 사용법 explicit하게 알려야. "각 문서가 <doc id=…>로 wrap. id로 cite. 각 문서 independent로 다뤄 — corroborate 안 하면 문서 사이로 claim merge X."

Code

boundary 박힌 multi-document 프롬프트·xml
<docs>
  <doc id="d1" source="manual" date="2026-01-12">
    ... document text ...
  </doc>
  <doc id="d2" source="changelog" date="2026-04-01">
    ... document text ...
  </doc>
  <doc id="d3" source="forum" date="2026-03-15">
    ... document text ...
  </doc>
</docs>

<task>
Answer the user question using only <docs>.
Cite each claim with [<id>]. Treat each doc independently.
</task>

External links

Exercise

현재 line break으로 source concatenate하는 multi-document 프롬프트 골라. explicit XML boundary와 stable id 추가. 같은 5개 query를 전후로 돌려. output 개선된 곳 메모.

Progress

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

댓글 0

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

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