[negative result] feat(retrieval): MENTIONS 청크 question-relevance rerank — 효과 없음, 머지 보류#70
Draft
TaskerJang wants to merge 1 commit into
Draft
[negative result] feat(retrieval): MENTIONS 청크 question-relevance rerank — 효과 없음, 머지 보류#70TaskerJang wants to merge 1 commit into
TaskerJang wants to merge 1 commit into
Conversation
…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 집합 안에 있을 때만 동작.
TaskerJang
added a commit
that referenced
this pull request
May 30, 2026
chunk-rerank 네거티브(#70) 진단 처방: graph traversal/entity-MENTIONS 병목을 어휘 검색으로 우회. Neo4j fulltext(chunk_fulltext) → top-k 청크 → 답변. - retrieval/bm25_retriever.py: queryNodes(Lucene/BM25) + Lucene escape + graceful - retrieval/prompts/bm25_answer_v1.md: 청크 기반 답변(수치 원문 보존, 정직한 N/A) 근거: BEIR(Thakur 2021) BM25 robust OOD baseline; 자기 80 QA 에서 BM25 baseline factual/numerical 압승. 한국어는 cjk analyzer 필수 (인덱스 DDL은 docstring 참조). 아직 router 미배선 — fulltext 인덱스 생성 + sanity check 통과 후 배선 예정.
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.
LocalRetriever 의
_EXPAND_SUBGRAPH_CYPHER가 entity 의 MENTIONS 청크 중 임의 3개를 300자로 잘라 넘겨 질문 관련성 랭킹이 0이던 문제를 retrieve-then-rerank 로 고쳐봤으나, 80 QA 측정 결과 효과 없음 + 응답속도 4배 악화. 가설 실패를 기록으로 박제한다.변경
[..3]/substring제거)_rank_chunks_by_question: bge-m3 cosine 으로 entity 당 top 3 채택 + 600자 절단{chunk_id, text, page}) 유지 → 답변 프롬프트 무변경, 델타 귀속 명확근거: Sentence-Transformers Retrieve & Re-Rank, MS GraphRAG Local Search (ranking + filtering).
측정 —
gpt52_p1clean→gpt52_p1clean_chunkrank(80 QA, gpt-5.2 / claude-haiku judge)전 지표 평탄~하락, 응답시간 4배.
진단 (왜 안 먹혔나)
결론
청크 랭킹은 병목이 아님이 측정으로 확인됨. 다음 레버는 Hybrid(BM25) — 그래프/entity-MENTIONS 병목을 우회해 어휘 매칭으로 청크를 직접 가져와 factual/numerical 약점을 정조준. 본 브랜치는 네거티브 결과 기록용으로 보존.