feat(rag): implement KM-RAG retrieval read-path, API endpoints, global Q&A UI, and unit tests #49
Reference in New Issue
Block a user
Delete Branch "feature/km-rag-retrieval"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This Pull Request implements the complete Retrieval module (Read Path) for the Knowledge-Map RAG (KM-RAG) architecture within the NexusReader platform. It resolves all requirements for vector-based semantic search, Neo4j graph context expansion, structured grounding with Google Gemini, API/Wasm integration, and an interactive front-end global Q&A panel.
Resolves #48
🚀 Key Implementations
Grounded DTOs & Schema Definition
GroundedResponseDtoandCitationDtofor strict JSON Schema matching with Gemini.Core Service & Read Path Logic
KnowledgeService.AskQuestionAsync:IEmbeddingGenerator.IChatClient(Gemini) preventing hallucinations and using citations.CQRS & Endpoints
AskLibraryQuestionQueryand its handler./api/knowledge/askand/api/knowledge/searchendpoints insideProgram.cs.WasmKnowledgeServiceto support proxying retrieval requests.Premium Blazor UI Panel
/intelligence(Global AI Q&A) with a curated HSL palette, dark theme, smooth micro-animations, loading shimmers, and side-by-side citation cards.MainHubLayoutsidebar.Test Coverage
QueryTests.csusing Moq and FluentAssertions to assert that handlers correctly validate input and interact with services.🧪 Verification
dotnet build: 0 errors).dotnet test).