Skip to main content

docbert_plaid/
lib.rs

1//! PLAID-style multi-vector index for docbert.
2//!
3//! This crate implements the ColBERT late-interaction indexing pipeline
4//! originally described in "PLAID: An Efficient Engine for Late Interaction
5//! Retrieval" (Santhanam et al., 2022), modelled on the `fast-plaid`
6//! reference implementation but written directly against plain Rust
7//! primitives so that it drops into docbert's candle-based stack without a
8//! libtorch dependency.
9//!
10//! The pipeline is built bottom-up over several modules:
11//!
12//! - [`distance`] — vector distance primitives.
13//! - k-means clustering of token embeddings (next).
14//! - residual codec (coarse centroid + quantized residual).
15//! - inverted file (centroid → documents).
16//! - search path (query tokens → candidate docs → MaxSim).
17//!
18//! At the moment the crate only exposes the lowest-level primitives; more
19//! layers will be added as subsequent TDD cycles come in.
20
21pub mod codec;
22pub mod device;
23pub mod distance;
24pub mod error;
25pub mod index;
26pub mod kmeans;
27pub mod persistence;
28pub mod search;
29pub mod update;
30
31pub use error::{PlaidError, Result};