feat(rag): chunk evidence identity, dedup, and search port

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.
This commit is contained in:
zhuyongxin
2026-07-27 18:26:15 +08:00
parent 99d4f6f216
commit ac1f831903
34 changed files with 2880 additions and 298 deletions
@@ -0,0 +1,24 @@
package com.superbiz.agent.service.retrieval;
import java.util.Map;
/**
* Normalized search hit returned by {@link KnowledgeSearchPort}.
*/
public record KnowledgeSearchHit(
String id,
String content,
Double score,
Double rawScore,
String scoreLabel,
String metadataJson,
Map<String, String> metadata,
String docId,
Integer chunkIndex,
String evidenceKey,
String source,
String title,
String breadcrumb,
int originalRank
) {
}