wiki2 observatory nornen knowledge atlas

brief · wiki/brief-chemical-simulation-rag-worker.md

Brief — chemical simulation RAG worker slices

국가별 RAG 후처리 — 성공 문구 보존, 빈 보충 거부, 실패 시 cache fallback 후 country `failed`, **한 패스에 한 국가 저장**.

corpusprojectlayersourcetypebriefdomainbackendsprojectchemicalstatusactiveupdated2026-07-18originowned
raw: raw/imports/2026-07-18-chemical-simulation-rag-worker-slices.py

Brief — chemical simulation RAG worker slices

한 줄: 국가별 RAG 후처리 — 성공 문구 보존, 빈 보충 거부, 실패 시 cache fallback 후 country failed, 한 패스에 한 국가 저장.

핵심 takeaway

  1. claim/require: rag_status pending류이면서 저장된 supplement 없을 때만.
  2. _apply_rag_supplement: 전 언어 비면 ValueError("빈 법령 해석 보충 결과") — completed+null 저장 경로 차단.
  3. _preserve_current_successful_rag: merge 시 기존 국가 성공 문구 유지.
  4. process_pending_rag_scenario: 국가 루프 중 한 국가 처리 후 commit·return (국가별 점진 저장).
  5. 예외 시: 동등 결정/사유의 cache hit면 재사용(rag_cache_source); 없으면 해당 국가 rag_status=failed + rag_error.
  6. 이미 supplement 있으면 status를 completed로 정규화.
  7. retry_failed_rag: failed 국가만 재대기(슬라이스에 포함).
  8. stale sweep: 오래된 시나리오 전체를 status=failed로 (시나리오 단위).

관련