29 lines
1.2 KiB
Markdown
29 lines
1.2 KiB
Markdown
## Why
|
|
|
|
The current `lookup_knowledge` result is still shaped as one L0 primary result plus one L1 supplement. That makes retrieval evidence hard to inspect, hard to deduplicate, and hard to reuse later by verifier/evaluator code. The RAG refactor needs a structured evidence layer before Spring AI retriever migration.
|
|
|
|
## What Changes
|
|
|
|
- Add structured evidence blocks to `LookupResult`.
|
|
- Build evidence blocks from L0 hint matches and L1 candidates.
|
|
- Deduplicate evidence by source identity where possible.
|
|
- Add hit reasons such as L0 matched keywords, L1 semantic rank, category filter, and fallback.
|
|
- Persist evidence block summaries and postprocess counts in `tool_invocation.retrieval_details`.
|
|
- Keep existing `primary` and `supplement` fields for compatibility.
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
|
|
- None.
|
|
|
|
### Modified Capabilities
|
|
|
|
- `rag-knowledge-retrieval`: Add evidence block post-processing requirements for explicit RAG knowledge retrieval.
|
|
|
|
## Impact
|
|
|
|
- Affects `LookupResult`, `LookupKnowledgeTool`, and `ToolInvocationRecorder`.
|
|
- Updates tool tests and trace recorder tests.
|
|
- Does not change Milvus schema, document upload, chunking, or Spring AI integration.
|