cocoindex icon indicating copy to clipboard operation
cocoindex copied to clipboard

feat: Add LEANN vector index target for RAG support in CocoIndex

Open Ash-Blanc opened this issue 1 week ago • 0 comments

Summary

This PR adds LEANN vector index target support to CocoIndex, enabling efficient RAG capabilities with 97% storage savings.

Features

  • Efficient Vector Indexing: 97% storage savings via graph-based recomputation
  • Multiple Backends: HNSW (default) and DiskANN
  • Flexible Embedding Models: facebook/contriever, Ollama, OpenAI, etc.
  • Metadata Preservation: Automatic field preservation in search results
  • Privacy-First: All processing is local
  • Incremental Updates: Full support for building incrementally

Implementation

  • File: python/cocoindex/targets/leann.py
  • Size: 165 lines of code
  • Pattern: Follows CocoIndex target connector design
  • Configuration: Fully customizable via LEANN spec

Related Projects

Integrates LEANN (https://github.com/yichuan-w/LEANN) Graph-based selective recomputation vector database

Ash-Blanc avatar Dec 17 '25 17:12 Ash-Blanc