feat: add spring ai retrieval sidecar

This commit is contained in:
aruo
2026-07-05 03:22:03 +08:00
parent 5197712719
commit b9ec07de57
21 changed files with 944 additions and 0 deletions
@@ -0,0 +1,24 @@
## 1. Dependency And Configuration
- [x] 1.1 Inspect available Spring AI VectorStore/Milvus classes for the current dependency set.
- [x] 1.2 Add the narrow dependency or optional configuration needed for the sidecar path.
- [x] 1.3 Add disabled-by-default sidecar properties under RAG configuration.
## 2. Sidecar Retrieval Adapter
- [x] 2.1 Define a comparable retrieval result DTO for current and sidecar paths.
- [x] 2.2 Implement a Spring AI sidecar retrieval service that reports readiness and failures without breaking the main path.
- [x] 2.3 Normalize sidecar metadata into source/doc id, title, breadcrumb, category, rank, content preview, and score label/value.
## 3. Comparison Evaluation
- [x] 3.1 Add a comparison service or script that runs golden cases against current retrieval and the sidecar path when enabled.
- [x] 3.2 Write sidecar comparison JSON/Markdown reports separate from the offline baseline reports.
- [x] 3.3 Preserve the existing offline evaluator behavior without requiring live Spring AI/Milvus services.
## 4. Tests And Validation
- [x] 4.1 Add tests for disabled sidecar fallback/readiness behavior.
- [x] 4.2 Add tests for comparable result normalization and report generation.
- [x] 4.3 Run targeted tests, the offline RAG retrieval baseline evaluator, and OpenSpec validation.
- [x] 4.4 Review git diff to confirm the default `lookup_knowledge` runtime path is unchanged.