lance-format / lance-format/lance
ANN Index explain and analyze
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
Goal: give users easy way to understand how ANN index can and will perform.
Explain index
Goal: give user an idea of how an ANN index will perform before training the index.
fn explain_index(
field: &arrow_schema::Field,
parameters: &dyn VectorIndexParams,
) -> ExplainIndexResults { ... }
struct ExplainIndexResults {
/// Expected size of the index in bytes
expected_size_bytes: u64,
/// Ratio of uncompressed vector size to index size
compression_ratio: f32,
/// Expected top-1 in-sample recall when nprobes == num_partitions. Represents
/// recall impact from compression alone. This is derived from a formula
/// based on experimental data.
/// TODO: formula
recall_top_1_probe_all: f32,
/// Expected top-1 in-sample recall for default nprobes (10).
/// Represents overall recall for default nprobes. Higher nprobes and
/// refine factor will increase recall.
recall_top_1_probe_default: f32,
}
Analyze index
Goal: give users a way to measure performance of an existing ANN index
async fn analyze_index(
index_name: &str,
nprobes: u32,
refine_factor: usize,
recall_top_n: usize
) -> AnalyzeIndexResult { ... }
struct AnalyzeIndexResult {
/// In sample recall
recall: f32,
/// Latency when index cache is cold
cold_latency: Latencies,
/// Latency when index cache is warm
warm_latency: Latencies,
}
/// Query latencies in ms
struct Latencies {
avg_ms: u64,
p50_ms: u64,
p90_ms: u64,
p99_ms: u64
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the Rust ANN index implementation and compare its existing index parameters and query paths with the proposed explain_index and analyze_index signatures; done means the specified size, compression, recall, and cold/warm latency results are available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- machine-learning, performance, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100