Files
kebab/tasks/p9/p9-fb-40-fact-grounded-answer.md
th-kim0823 600c6182fc docs(fb-40): rag-v2 prompt + README + design + SKILL + INDEX
- README: [rag] prompt_template_version default rag-v2 + V2 강화 3 규칙
- design §7: rag-v2 본문 + V1 legacy note
- SKILL.md: mcp__kebab__ask 응답 행태 변화 안내
- task spec: status open → completed, design + plan 링크
- INDEX: fb-40  머지 (2026-05-10)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 19:37:28 +09:00

2.2 KiB

phase, component, task_id, title, status, target_version, depends_on, unblocks, contract_source, contract_sections, source_feedback
phase component task_id title status target_version depends_on unblocks contract_source contract_sections source_feedback
P9 kebab-rag + kebab-llm p9-fb-40 Fact-grounded answer 강화 (citation 강제 + 근거 없음 fallback) completed 0.5.0
../../docs/superpowers/specs/2026-04-27-kebab-final-form-design.md
§7 RAG
prompt template
사용자 도그푸딩 2026-05-06 — Claude Code 가 kebab CLI 사용 후 "fact extraction 은 RAG 한계" 지적. fact 단위 질문에서 LLM 이 retrieved chunk 외 internal knowledge 로 답하거나 hallucinate.

p9-fb-40 — Fact-grounded answer 강화

구현 완료. 본 spec 은 구현 시점의 frozen 상태.

증상 / 동기

  • "X 의 정확한 값 / 날짜 / 숫자" 류 질문에서 LLM 이 retrieved chunk 의 fact 와 internal knowledge 충돌 시 internal 우세.
  • 근거 부족한 질문에도 LLM 이 그럴듯한 답 생성 — hallucinate.
  • RAG 본질적 한계지만 prompt / 검증 layer 로 완화 가능.

Goal (skeleton — brainstorm 단계에서 확정)

  • 답변의 모든 fact 가 retrieved chunk 안 span 으로 매핑되도록 강제.
  • 근거 부족 시 "모름" 답변 fallback.
  • citation 미포함 답변 거부 또는 경고.

후속 작업 — brainstorm 필요 항목

  • prompt template 수정 — citation 강제 형식 (예: [doc_id#L] inline).
  • post-generation 검증 — 답변의 fact span 이 retrieved chunk 에 있는지 substring / fuzzy 매치.
  • "모름" fallback 의 trigger 조건 (top score gate, chunk count 등).
  • prompt_template_version cascade — bump 필요.

Risks / notes

  • 너무 strict 하면 정상 답변도 차단 — 경고만 / 거부의 trade-off.
  • post-generation 검증은 latency 증가.
  • prompt_template_version bump → eval re-run 필요.
  • p9-fb-15 (RAG multi-turn) 와 prompt 변경 영역 겹침 — 같은 batch 가능.