fix(eval): QA 평가를 단일 데이터셋(qa_pairs.json) 소스로 통합#66
Merged
TaskerJang merged 1 commit intoMay 30, 2026
Conversation
수동으로 쪼갠 vectorrag_qa.json/graphrag_qa.json 분리본이 합본과 어긋나(예: '두산밥캣'→'두산밥칿' 글자 손상) 측정이 오염되는 문제가 있어, 단일 소스 eval/dataset/qa_pairs.json 만 읽고 각 항목의 qa_set 필드로 필터링하도록 변경. 결과 집계는 기존대로 qa_set별 분리 유지 (print_summary 2개 섹션 + 결과 JSON의 qa_set 필드). - _load_qa: 분리 파일 2개 읽기 → 단일 qa_pairs.json 읽고 qa_set 필터 - qa_set 필드 누락 시 pattern/expected_route 유무로 추론(방어) - vectorrag_qa.json / graphrag_qa.json 는 더 이상 사용 안 함(수동 삭제 가능)
TaskerJang
added a commit
that referenced
this pull request
May 30, 2026
…d on feat/p1) feat/chunk-rerank 가 dev 베이스라 eval 인프라(#66/#67/gpt-5.2 토글)가 없던 문제 → feat/p1-extractor-hardening 위로 rebase. 변경 내용은 동일: - Cypher: MENTIONS 청크를 12개까지 원문으로 retrieve ([..3]/substring 제거) - _rank_chunks_by_question: bge-m3 cosine 으로 entity 당 top 3 채택 + 600자 절단 - payload 모양({chunk_id,text,page}) 유지 → 답변 프롬프트 무변경 근거: Sentence-Transformers Retrieve & Re-Rank, MS GraphRAG Local Search. 한계: 답 청크가 해당 entity 의 MENTIONS 집합 안에 있을 때만 동작.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
QA 평가가 수동으로 쪼갠 분리 파일 2개(
vectorrag_qa.json,graphrag_qa.json)를 읽고 있었음. 합본qa_pairs.json은 멀쩡한데 분리본에만 글자가 손상되는 사고 발생:run_qa_eval._load_qa는read_text(encoding="utf-8")로 읽고 질문을 그대로 넘기므로 로더/콘솔 문제가 아니라 분리본 파일 자체의 글자 손상이었음.scripts/에 합본→분리 자동 스크립트가 없어 손으로 쪼개다 생긴 divergence.변경
_load_qa가 분리 파일 2개 대신 단일 소스eval/dataset/qa_pairs.json하나만 읽고, 각 항목의qa_set("vectorrag"/"graphrag") 필드로 필터링.print_summary가 qa_set별 2개 섹션으로 집계하고, 결과 JSON도 항목마다qa_set을 유지 → "하나의 데이터셋, 분리된 결과".qa_set필드 누락 시pattern/expected_route유무로 추론(_infer_qa_set).--qa-set vectorrag|graphrag|both동작·CLI 인터페이스 변경 없음.효과
vectorrag_qa.json/graphrag_qa.json은 더 이상 사용 안 함 (이 PR에서 삭제는 안 함 — 필요 시 수동 정리).검증
qa_pairs.json은 80개(vectorrag 40 + graphrag 40), 각 항목에qa_set존재 → 필터링 정상.--qa-set both→ 80,vectorrag→ 40,graphrag→ 40 기대.비고