Skip to content

feat(ai): enhance RAG with Milvus integration, query rewrite, multi-path retrieval and refactor#1458

Open
YuZhangLarry wants to merge 4 commits intoapache:aifrom
YuZhangLarry:ai
Open

feat(ai): enhance RAG with Milvus integration, query rewrite, multi-path retrieval and refactor#1458
YuZhangLarry wants to merge 4 commits intoapache:aifrom
YuZhangLarry:ai

Conversation

@YuZhangLarry
Copy link
Copy Markdown

Summary

Refactored RAG component with enhanced capabilities including Milvus integration, query rewrite optimization, and multi-path retrieval.

Key Changes

RAG Component Refactor

  • Modularized RAG architecture with pluggable components
  • Separated concerns: Loader, Splitter, Indexer, Retriever, Reranker, QueryProcessor
  • Improved configuration management with schema validation

Milvus/Zilliz Cloud Support

  • Added Milvus as vector store option alongside local SQLite
  • Support for dense, sparse, and hybrid search modes
  • Configurable collection management and batch operations

Query Rewrite Enhancement

  • Integrated query processor using dashscope/qwen-max model
  • Optimizes user queries before retrieval for better accuracy
  • Configurable timeout and temperature settings
  • Graceful fallback on errors

Multi-Path Retrieval

  • Implemented multi-path retrieval with merge capabilities
  • Combines results from multiple retrieval strategies
  • Enhanced reranking with Cohere integration

Testing

  • Added comprehensive E2E tests for RAG workflows
  • Test utilities for CI/CD pipeline

Configuration

Query processor is enabled by default in ai/component/rag/rag.yaml

YuZhangLarry and others added 4 commits March 24, 2026 03:35
… merge

- Reorganize RAG components into indexers, retrievers, loaders, mergers, rerankers, and query packages
- Add Milvus multi-path retrieval support (Dense, BM25 Sparse, Hybrid)
- Add RRF (Reciprocal Rank Fusion) merge layer with deduplication
- Add score normalization strategies (MinMax, ZScore, Rank, Softmax, Sigmoid, Log)
- Add comprehensive Milvus unit tests and E2E workflow tests
- Fix deduplication to handle documents without IDs using content hash
- Fix Milvus SDK dependency compatibility with Go 1.25+

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add query rewrite processor for enhanced query optimization
- Implement multi-path retrieval with merge capabilities
- Add comprehensive E2E tests for RAG workflows
- Enable query processor by default in config
- Add RAG test helpers and utilities

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant