cocoindex-io/cocoindex
Incremental engine for long horizon agents 🌟 Star if you like it!
What it solves
CocoIndex 解決了 AI 代理與 LLM 應用中資料陳舊的問題。傳統的批次管線常會產生「上下文缺口」,使代理在過時資訊上推理。CocoIndex 提供了一種方式,僅重新處理變更(增量),而非整個資料集,從而持續維持企業資料(程式碼庫、Slack、會議記錄、PDF 等)的即時新鮮索引。
How it works
它作為一個宣告式、Python 原生的增量索引框架運作。使用者定義一個轉換函式 (F) 以將來源映射到目標狀態。引擎追蹤每列的來源資訊,並使用 Rust 為核心來管理即時快取、版本追蹤與資料血緣。當來源檔案被編輯或轉換程式碼本身被修改時,引擎會精確找出需要更新的目標部分,確保次秒級的新鮮度,並降低計算與嵌入成本。
Who it’s for
它設計給需要在大規模企業資料來源上保持永遠新鮮上下文的工程師,這些工程師正在建構生產等級的 AI 代理與 RAG(檢索增強生成)管線。
Highlights
- Incremental Processing: Only the delta ($Δ$) is reprocessed on every change, significantly reducing LLM and embedding costs.
- Sub-second Freshness: Source changes propagate to the target index almost instantly.
- End-to-End Lineage: Every target vector or row traces back to its exact source byte for auditing and debugging.
- Production-Ready Core: Built with a Rust core featuring retries, exponential back-off, and dead-letter queues to guarantee no data loss.
- Broad Connectivity: Supports various sources (Codebases, APIs, Databases, Message Queues) and targets (Vector DBs, Graph DBs, Relational DBs).