{ "caseId" : "chat-rag-chunk-context", "query" : "If a long section is split into multiple chunks, how do we keep retrieval context?", "retrievedAt" : "2026-07-28T06:54:51.843450400Z", "searchMode" : "hybrid", "kbScope" : "rag-eval", "lookupResult" : { "found" : true, "evidenceBlocks" : [ { "docId" : "rag-chunk-context-reconstruction", "chunkIndex" : 2, "evidenceKey" : "rag-chunk-context-reconstruction#chunk-2", "source" : "rag-chunk-context-reconstruction", "title" : "Context Reconstruction", "breadcrumb" : "RAG > Chunking > Context Reconstruction", "retrievalLayer" : "L1", "content" : "### Context Reconstruction\n\nWhen a long section is split into multiple chunks, retrieval should keep enough local structure for the answer.\n\nRecommended behavior:\n\n1. Store the breadcrumb with every chunk.\n2. Preserve the same section identity across adjacent chunks.\n3. During context packing, include a neighbor chunk when the selected chunk depends on nearby setup or definitions.\n4. Prefer concise evidence blocks that show the breadcrumb and the relevant content span.\n\nThe key concepts are neighbor chunk, same section, and breadcrumb.", "score" : 0.032786883413791656, "hitReasons" : [ "semantic_rank:1", "attempt:FILTERED_VECTOR", "l0_domain_overlap", "l0_entity_overlap", "l0_keyword_overlap" ] }, { "docId" : "rag-l0-domain-entity-hint", "chunkIndex" : 2, "evidenceKey" : "rag-l0-domain-entity-hint#chunk-2", "source" : "rag-l0-domain-entity-hint", "title" : "Domain Entity Hint", "breadcrumb" : "RAG > L0 > Domain Entity Hint", "retrievalLayer" : "L1", "content" : "### Domain Entity Hint\n\nL0 keyword matching should not decide the final retrieval result.\nIn the modular RAG pipeline, L0 behaves like a lightweight domain detector and entity extractor.\n\nThe output can provide:\n\n1. Candidate domain hints.\n2. Matched entities and keywords.\n3. An optional metadata filter for the first vector retrieval attempt.\n\nFinal evidence still comes from L1 vector retrieval, post-retrieval normalization, rerank, and context packing.\nThe important terms are domain detector, entity extractor, and metadata filter.", "score" : 0.032258063554763794, "hitReasons" : [ "semantic_rank:2", "attempt:FILTERED_VECTOR", "l0_domain_overlap" ] }, { "docId" : "rag-chunk-context-reconstruction", "chunkIndex" : 1, "evidenceKey" : "rag-chunk-context-reconstruction#chunk-1", "source" : "rag-chunk-context-reconstruction", "title" : "Chunking", "breadcrumb" : "RAG > Chunking > Context Reconstruction", "retrievalLayer" : "L1", "content" : "## Chunking", "score" : 0.01587301678955555, "hitReasons" : [ "semantic_rank:3", "attempt:FILTERED_VECTOR", "l0_domain_overlap" ] }, { "docId" : "rag-l0-domain-entity-hint", "chunkIndex" : 0, "evidenceKey" : "rag-l0-domain-entity-hint#chunk-0", "source" : "rag-l0-domain-entity-hint", "title" : "RAG", "breadcrumb" : "RAG > L0 > Domain Entity Hint", "retrievalLayer" : "L1", "content" : "# RAG", "score" : 0.015625, "hitReasons" : [ "semantic_rank:4", "attempt:FILTERED_VECTOR", "l0_domain_overlap" ] } ], "contextPack" : { "packedText" : "[Evidence 1]\nsource: rag-chunk-context-reconstruction\ntitle: Context Reconstruction\nbreadcrumb: RAG > Chunking > Context Reconstruction\nlayer: L1\nreasons: semantic_rank:1, attempt:FILTERED_VECTOR, l0_domain_overlap, l0_entity_overlap, l0_keyword_overlap\ncontent:\n### Context Reconstruction\n\nWhen a long section is split into multiple chunks, retrieval should keep enough local structure for the answer.\n\nRecommended behavior:\n\n1. Store the breadcrumb with every chunk.\n2. Preserve the same section identity across adjacent chunks.\n3. During context packing, include a neighbor chunk when the selected chunk depends on nearby setup or definitions.\n4. Prefer concise evidence blocks that show the breadcrumb and the relevant content span.\n\nThe key concepts are neighbor chunk, same section, and breadcrumb.\n\n[Evidence 2]\nsource: rag-l0-domain-entity-hint\ntitle: Domain Entity Hint\nbreadcrumb: RAG > L0 > Domain Entity Hint\nlayer: L1\nreasons: semantic_rank:2, attempt:FILTERED_VECTOR, l0_domain_overlap\ncontent:\n### Domain Entity Hint\n\nL0 keyword matching should not decide the final retrieval result.\nIn the modular RAG pipeline, L0 behaves like a lightweight domain detector and entity extractor.\n\nThe output can provide:\n\n1. Candidate domain hints.\n2. Matched entities and keywords.\n3. An optional metadata filter for the first vector retrieval attempt.\n\nFinal evidence still comes from L1 vector retrieval, post-retrieval normalization, rerank, and context packing.\nThe important terms are domain detector, entity extractor, and metadata filter.\n\n[Evidence 3]\nsource: rag-chunk-context-reconstruction\ntitle: Chunking\nbreadcrumb: RAG > Chunking > Context Reconstruction\nlayer: L1\nreasons: semantic_rank:3, attempt:FILTERED_VECTOR, l0_domain_overlap\ncontent:\n## Chunking\n\n[Evidence 4]\nsource: rag-l0-domain-entity-hint\ntitle: RAG\nbreadcrumb: RAG > L0 > Domain Entity Hint\nlayer: L1\nreasons: semantic_rank:4, attempt:FILTERED_VECTOR, l0_domain_overlap\ncontent:\n# RAG", "strategy" : "ranked_evidence_char_budget", "charBudget" : 4000, "usedChars" : 1966, "includedSources" : [ "rag-chunk-context-reconstruction", "rag-l0-domain-entity-hint", "rag-chunk-context-reconstruction", "rag-l0-domain-entity-hint" ], "omittedSources" : [ ] }, "retrievalTrace" : { "originalQuery" : "If a long section is split into multiple chunks, how do we keep retrieval context?", "rewrittenQuery" : "If a long section is split into multiple chunks, how do we keep retrieval context?", "categoryFilter" : "rag", "selectedAttempt" : "FILTERED_VECTOR", "fallbackReason" : null, "evidenceStatus" : "supported", "queryHints" : { "domains" : [ "rag" ], "matched_keywords" : [ "split into multiple chunks", "retrieval context" ], "entities" : [ "split into multiple chunks", "retrieval context" ], "l0_titles" : [ "RAG Chunk Context Reconstruction" ], "l0_match_count" : 1 }, "attempts" : [ { "name" : "FILTERED_VECTOR", "query" : "If a long section is split into multiple chunks, how do we keep retrieval context?", "categoryFilter" : "rag", "candidateCount" : 6, "usable" : true, "errorMessage" : null, "durationMs" : 743, "topScore" : 0.032786883413791656, "topSimilarity" : 0.7487991750240326 } ] }, "rerankTrace" : { "items" : [ { "finalRank" : 1, "source" : "rag-chunk-context-reconstruction", "baseScore" : 0.7487991750240326, "finalScore" : 0.7487991750240326, "boostReasons" : [ "l0_domain_overlap", "l0_entity_overlap", "l0_keyword_overlap" ] }, { "finalRank" : 2, "source" : "rag-l0-domain-entity-hint", "baseScore" : 0.4840593934059143, "finalScore" : 0.4840593934059143, "boostReasons" : [ "l0_domain_overlap" ] }, { "finalRank" : 3, "source" : "rag-chunk-context-reconstruction", "baseScore" : 0.42978107929229736, "finalScore" : 0.42978107929229736, "boostReasons" : [ "l0_domain_overlap" ] }, { "finalRank" : 4, "source" : "rag-l0-domain-entity-hint", "baseScore" : 0.3859822154045105, "finalScore" : 0.3859822154045105, "boostReasons" : [ "l0_domain_overlap" ] } ] }, "evidenceCandidateCount" : 6, "evidenceBlockCount" : 4, "relevanceLevel" : "REFERENCE", "completenessHint" : "当前结果为相关参考,如需更精准信息请明确缺少的具体维度", "retrievedDomainsThisSession" : null, "message" : null } }