260420/analysis-hard_qa_filtering_and_graph_retrieval.md
Hard QA 필터링 파이프라인 구축 + Query Plan 3-Bug Fix
1. Letsur gateway 비디오 입력 불가 확인 — 7가지 포맷 시도, 모두 실패. OpenAI schema strict. dense frame sampling으로 대체.
2. gen_hard_qa_filtered.py 신규 (2-stage pipeline): 300 frames 생성 → describe-only 필터 → category balance 10개 선정. 20후보 중 12개 생존(60% 하드율), 비용 $0.047.
3. Query plan 3-bug fix (Graph V1 → V3):
_fuzzy_match_all: 1-node → 최대 10개 multi-seed (substring/base form/description)
- Plan union:
{"plans":[...]} 리스트 반환, 병렬 실행 후 union. all 금지.
- Keyword-subgraph fallback: 74K dump → keyword BFS → 평균 9K chars (8x 축소)
3개 벤치마크 결과:
| 벤치마크 | Graph V3 | Describe | Frame-300 |
| hardfilt10 (description-proof) |
2/10 (20%) |
1/10 (10%) |
5/10 (50%) |
| hardest10 (3-way all-wrong) |
2/10 (20%) |
3/10 (30%) |
4/10 (40%) |
| L34hard10 (L3/L4 hardest) |
4/10 (40%) |
7/10 (70%) |
6/10 (60%) |
hardfilt10 clean 5개(hallucination 의심 제거): Graph V3 40% vs Describe 20% → +20%p 우위.
260420/analysis-query_plan_walkthrough_hardfilt10.md
Query Plan Before/After 상세 Walkthrough (10개 질문)
V1 → V3 개선된 질문: hardfilt_003 (celery 후 cutting board item). fallback 74K → plan 9.7K, 오답→정답.
나머지 8개 실패 원인 분류: 6개는 그래프 빌드 정보 부족(count/visual position/container/action chain), 1개 prompt 버그, 1개 MCQ 추출 실수.
Tier 2 예상 효과: 모두 구현 시 hardfilt10 2/10 → 6~8/10 기대.