Preserve same-document multi-chunk evidence with evidenceKey identity, per-document caps, retrieve-k/return-n split, and a dense KnowledgeSearchPort. Archives Delivery 1 OpenSpec change as the foundation for hybrid retrieval.
1.1 KiB
1.1 KiB
rag-knowledge-retrieval Delta
MODIFIED Requirements
Requirement: Knowledge retrieval SHALL deduplicate evidence blocks
The retrieval flow SHALL remove duplicate evidence blocks before returning them to the Agent. Duplicates are defined by chunk-level evidenceKey identity, not by document source alone.
Scenario: Chunk-level deduplication keeps distinct chunks
- WHEN L1 produces multiple candidates with the same source but different chunk identities
- THEN the retrieval flow SHALL keep separate evidence blocks for those chunk identities subject to per-document caps
- AND SHALL NOT collapse them solely because source is equal
Scenario: Same evidenceKey collapses
- WHEN two candidates share the same evidenceKey
- THEN the retrieval flow SHALL keep a single evidence block for that identity
- AND the evidence block SHALL preserve hit reasons from both paths when available
Scenario: Postprocess count tracking
- WHEN evidence post-processing completes
- THEN the tool invocation details SHALL record candidate count and final evidence block count