Proxicord
CPU-first semantic retrieval engine — Rust core, C ABI, Python, Node.js, and CLI.
> 0.99 Recall@10 · ~1 ms median latency · ~200 MB resident — on the CPU you already have.
Version 0.2.0 · License: AGPL-3.0 · GitHub · Website
crates.io: cargo add proxicord — PyPI: pip install proxicord — npm: npm install proxicord
This is the package README. The full documentation — with benchmark plots, the CLI reference screenshot, and developer guides — lives on GitHub.
Overview
Proxicord is a CPU-first approximate nearest-neighbor (ANN) and semantic vector retrieval engine engineered for high recall with minimal resident memory and zero GPU or async-runtime dependencies. Its Rust core compiles into a native binary, a C ABI shared library (include/proxicord.h), and prebuilt bindings for Python (pip) and Node.js (npm) — so every language executes the exact same SIMD-dispatched retrieval path.
v0.2.0 ships a multi-stage guarded retrieval pipeline (IVF-PQ8 + OPQ rotation, dynamic precision quantization, predictive routing, exact reranking), a 12-check tamper-evident index loader, and a 10-stage reproducible benchmark harness that measures every engine it competes with on identical hardware, queries, and ground truth.
Highlights
| Multi-Stage Guarded Retrieval | IVF-PQ8 + OPQ rotation, dynamic precision quantization (F16 / INT8), predictive routing, and exact reranking — tuned for > 0.99 Recall@10, not just fast approximations. |
| Hardware-Aware SIMD Dispatch | Runtime ISA detection selects AVX-512, AVX2+FMA, SSE4.2, NEON, or scalar fallback kernels. Zero manual tuning on any machine. |
| 12-Check Verified Loading | proxicord_open_verified validates framing, schema, engine semver pin, SHA-256 header/index hashes, an optional HMAC-SHA256 seal (PROXICORD_HMAC_KEY), Wilson-gated calibration, and live on-machine recall/latency before serving a single query. |
| One Core, Four Ecosystems | The same Rust core behind crates.io, PyPI, npm, and a frozen 7-symbol C ABI — prebuilt for Windows x86_64/ARM64, Linux x86_64/AArch64, and macOS Universal. |
| Built-In Embeddings | OpenAI-compatible /v1/embeddings client (Embedder / configure_embedding / search_text) with custom endpoints, extra headers, and pluggable embed_fn — or bring your own pre-computed vectors. |
| Reproducible Benchmarks | A 10-stage pipeline with dataset auto-staging (--sift, --dbpedia, or any --path <folder>), burst and sustained protocols, and JSON / CSV / Markdown audit artifacts. |
Installation
Install the full proxicord CLI (including the 10-stage benchmark pipeline) directly from GitHub:
cargo install --git https://github.com/biforax/proxicord --locked
--locked pins the exact dependency versions from Cargo.lock for a reproducible release build and places proxicord directly on your PATH.
| Ecosystem | Package | Install Command |
|---|---|---|
| Rust (crates.io) | proxicord |
cargo add proxicord (CLI: cargo install proxicord --locked) |
| Python (PyPI) | proxicord |
pip install proxicord (Python ≥ 3.9) |
| Node.js (npm) | proxicord |
npm install proxicord (Node ≥ 18, TypeScript defs included) |
Or clone and build locally:
git clone https://github.com/biforax/proxicord.git
cd proxicord
cargo install --path . --locked
Quick Start
Rust
use proxicord::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let embedder = Embedder::new(std::env::var("OPENAI_API_KEY")?)?
.with_model("text-embedding-3-small");
let query_vec = embedder.embed("CPU-first semantic retrieval")?;
let mut engine = ProxicordEngine::new(L2Config::default());
engine.load_index(Some("path/to/index.bin"))?;
let results = engine.search(&query_vec, 10)?;
println!("Top hit: {:?}", results.candidates.first());
Ok(())
}
Python (pip install proxicord)
import proxicord
proxicord.configure_embedding(api_key="...", model="text-embedding-3-small")
with proxicord.open("path/to/index.bin") as idx:
# Vector search -> [(row_id, squared_l2_distance), ...]
hits = idx.search([0.1, 0.2, 0.3], k=10)
# Concurrent fan-out for a batch of queries
batch_hits = idx.search_batch([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]], k=10)
# Or embed text and search in one call
text_hits = idx.search_text("CPU-first semantic retrieval", k=10)
# Tamper-evident serving: 12-check verified loader (requires the .calib sidecar)
vidx = proxicord.open_verified("path/to/index.bin")
try:
verified_hits = vidx.search([0.1, 0.2, 0.3], k=10)
finally:
vidx.close()
Typed errors (ProxicordLoadError, ProxicordSearchError, ProxicordEmbedError) carry stable codes for clean error handling; proxicord.version(), proxicord.stats(), and proxicord.cli_run(args) expose the CLI surface from Python.
Node.js (npm install proxicord)
const proxicord = require("proxicord");
proxicord.configureEmbedding({ apiKey: "...", model: "text-embedding-3-small" });
const idx = proxicord.open("path/to/index.bin");
try {
const hits = idx.search([0.1, 0.2, 0.3], 10);
const batchHits = idx.searchBatch([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]], 10);
// Embed text and search in one call
const textHits = await idx.searchText("CPU-first semantic retrieval", 10);
console.log(hits);
} finally {
idx.close();
}
// Tamper-evident serving (requires the .calib sidecar)
const vidx = proxicord.openVerified("path/to/index.bin");
Verified Loading
Production indexes can be sealed and verified end-to-end with open_verified / openVerified / proxicord_open_verified. Before an index is allowed to serve queries, the loader runs 12 independent checks: container framing, schema compatibility, engine semver pinning, SHA-256 header and index hashes, an optional HMAC-SHA256 seal (PROXICORD_HMAC_KEY), Wilson-gated calibration samples, and a live on-machine recall/latency verification against the attached .calib sidecar. If any check fails, the index never opens.
CLI
Command Reference
| Command | Description |
|---|---|
proxicord --help |
Show CLI usage, options, and environment variables |
proxicord --version |
Print version, git revision, target, and build profile |
proxicord --benchmark |
Interactive dataset selector (sift, dbpedia, custom) |
proxicord --benchmark --sift |
Run the 10-stage benchmark pipeline on SIFT-1M |
proxicord --benchmark --dbpedia |
Run the 10-stage benchmark pipeline on DBpedia-OpenAI |
proxicord --benchmark --path <DIR> |
Benchmark any dataset folder (quoted or unquoted path) |
proxicord --benchmark --protocol burst/sustained |
Choose the load protocol |
proxicord --benchmark --no-download |
Skip dataset download and use locally staged data |
proxicord --stats [--json] |
Print vector and index statistics for registered datasets |
proxicord --search <QUERY> |
Embed text via the configured provider and search (--top-k <N>) |
proxicord --search-vector <VEC> |
Search with comma-separated pre-computed floats (--top-k <N>) |
Environment Variables
| Variable | Purpose |
|---|---|
OPENAI_API_KEY |
API key for the OpenAI-compatible embedding provider |
L2_EMBED_MODEL |
Embedding model (default: text-embedding-3-small) |
L2_EMBED_ENDPOINT |
Embeddings endpoint (default: https://api.openai.com/v1/embeddings) |
L2_SEARCH_INDEX |
Default index used by --search |
L2_BENCH_DATASET |
Default benchmark dataset |
L2_BENCH_QUERIES |
Number of benchmark queries |
L2_BENCH_WORKERS |
Benchmark worker count |
L2_BENCH_RESULTS_DIR |
Output directory for benchmark audit artifacts |
L2_BENCH_REUSE_INDEX |
Reuse a staged index between benchmark runs |
PROXICORD_HMAC_KEY |
HMAC-SHA256 seal key for verified index loading |
Benchmarks
All results come from a unified harness running real wall-clock concurrent execution — every engine is measured on the same machine, the same dataset, the same queries, and the same ground truth. Test machine: Intel Core Ultra 7 255H · AVX2 · 16 cores (laptop-class consumer silicon, no datacenter hardware).
Headline Results
| Metric | SIFT-1M | DEEP-1M | DBpedia-OpenAI |
|---|---|---|---|
| Recall@1 | 0.9900 |
0.9960 |
0.9950 |
| Recall@10 | 0.9983 |
0.9963 |
0.9957 |
| Recall@100 | 0.9921 |
0.9932 |
0.9920 |
| Throughput | 13,599 QPS (CV 3.1%) |
11,306 QPS (11,012–11,544) |
1,849 QPS (CV 8.2%) |
| Latency p50 | 830 µs |
1,122 µs |
6,395 µs |
| Latency p99 | 1,870 µs |
2,886 µs |
18,679 µs |
| Max query | 27,100 µs |
10,265 µs |
— |
| Index resident | 162.4 MiB ¹ |
201.4 MB |
— |
| RSS | 206 MB |
276.2 MB |
474 MB |
¹ From the pinned local run: results/sift1m/benchmark_result.md.
SIFT-1M / DEEP-1M: 16 workers, 1,000 queries. DBpedia-OpenAI: 14 workers, 10 consecutive runs (10/10 OK), operating point nprobe=320 · rerank=5000; worst per-run p99 across the 10 runs: 35.7 ms.
Cross-Engine Comparison — SIFT-1M (16 Workers)
Highest-recall configuration found for each engine, same queries, same ground truth:
| Engine | Configuration | Recall@10 | Recall@100 | QPS | p99 (ms) | RSS (MB) |
|---|---|---|---|---|---|---|
| FAISS HNSW | M=32 efC=256 efSearch=400 |
0.9994 |
0.9986 |
6,922 |
12.44 |
2,019 |
| Redis Vector | HNSW M=32 ef_runtime=400 |
0.9994 |
0.9985 |
686 |
28.47 |
1,967 |
| FAISS IVF-PQ+Refine | nlist=2048 m=16 nprobe=224 kf=16 |
0.9993 |
0.9978 |
4,009 |
16.84 |
1,264 |
| Milvus | HNSW M=16 efC=256 ef=400 |
0.9991 |
0.9971 |
716 |
53.89 |
3,171 |
| usearch | HNSW conn=32 expansion_search=400 |
0.9990 |
0.9985 |
273 |
147.92 |
2,621 |
| Qdrant | HNSW m=16 efC=256 hnsw_ef=200 |
0.9988 |
0.9990 |
932 |
34.76 |
436 |
| Proxicord | nprobe=96 rerank=2000 spill=2 |
0.9983 |
0.9921 |
13,599 |
1.87 |
206 |
| FAISS HNSW (matched recall) | M=32 efC=256 efSearch=200 |
0.9983 |
0.9909 |
11,185 |
3.35 |
2,014 |
| FAISS IVF-PQ (raw) | nlist=2048 m=16 nprobe=224 |
0.5752 |
0.6411 |
6,621 |
11.59 |
708 |
At matched recall (0.9983): Proxicord delivers 1.22× the throughput of FAISS HNSW with a 1.8× lower p99 (1.87 ms vs 3.35 ms) while using 9.8× less resident memory (206 MB vs 2,014 MB). Against FAISS HNSW's highest-recall setting (
efSearch=400), Proxicord is 2× faster with 9.8× less memory and a 6.7× lower p99.
Cross-Engine Comparison — DEEP-1M (16 Workers)
| Engine | Configuration | Recall@10 | Recall@100 | QPS | p99 (ms) | RSS (MB) |
|---|---|---|---|---|---|---|
| Qdrant | HNSW m=16 efC=256 hnsw_ef=400 |
0.9999 |
0.9997 |
531 |
54.98 |
459 |
| Redis Vector | HNSW M=32 ef_runtime=400 |
0.9994 |
0.9965 |
888 |
23.83 |
1,662 |
| FAISS HNSW | M=32 efC=256 efSearch=400 |
0.9989 |
0.9967 |
5,703 |
15.47 |
4,089 |
| Milvus | HNSW M=16 efC=256 ef=400 |
0.9987 |
0.9951 |
1,021 |
49.68 |
2,631 |
| FAISS IVF-PQ+Refine | nlist=2048 m=12 nprobe=224 kf=16 |
0.9980 |
0.9900 |
3,244 |
21.99 |
3,464 |
| Proxicord | nprobe=192 rerank=4000 |
0.9963 |
0.9932 |
11,306 |
2.89 |
276 |
| FAISS HNSW (matched recall) | M=32 efC=256 efSearch=200 |
0.9961 |
0.9872 |
11,336 |
3.87 |
4,088 |
| usearch | HNSW conn=32 expansion_search=400 |
0.9947 |
0.9932 |
304 |
105.81 |
4,635 |
| FAISS IVF-PQ (raw) | nlist=2048 m=12 nprobe=224 |
0.4608 |
0.5507 |
4,731 |
18.68 |
3,045 |
At matched recall (≈ 0.996): throughput is on parity with FAISS HNSW (11,306 vs 11,336 QPS), p99 is 25% lower (2.89 ms vs 3.87 ms), and resident memory is 14.8× smaller (276 MB vs 4,088 MB — a 93% reduction).
Concurrency Stress — Readers Under Live Writers (SIFT-1M)
8 concurrent readers + 2 writers, 100 queries per phase. This is where guarded retrieval separates itself: Proxicord's search path holds recall and throughput while writers are active.
| Engine | Idle | + Low writes | + Medium writes | + High writes | Recall@10 | Write errors |
|---|---|---|---|---|---|---|
| Proxicord | 6,533 |
6,461 |
8,737 |
7,434 |
1.0000 (all phases) |
0 |
| FAISS IVF-PQ | 14,961 |
56 |
47 |
41 |
0.042 – 0.116 |
0 |
| usearch | 1,130 |
977 |
543 |
452 |
0.148 |
1 / 14 / 14 |
QPS in searches per second. Recall and errors as measured by the stress protocol (separate query set and co-located write load; not comparable to the tables above). usearch column shows cumulative write errors at low / medium / high intensity.
Index Build & Kernel Profile
From the pinned SIFT-1M run (results/sift1m/benchmark_result.md, release build, 14 workers, burst protocol, timestamp 20261130-102619):
| Stage | Measured |
|---|---|
| Index build (1M × 128-d) | 42.35 s — 23,612.5 vec/s ingest |
| OPQ rotation | 0.29 s |
| Clustering | 2,048 centroids · 12 k-means iterations · quantization MSE 117.72 |
| Compression | 516 MB raw → 162.4 MiB resident index (3.03×) |
| Memory | peak RSS 746.1 MB → steady-state 204.33 MB |
| CPU utilization | 91.4% peak across 16 cores |
| Per-query kernel (median) | distance kernel 987 µs · routing 85 µs · rerank 142 µs · 96 elements visited per query |
Benchmark plots (Recall-vs-QPS curves, memory footprints, worker scaling) are published in the repository under public/charts/.
Test on Your Own Hardware (10-Stage Benchmark Pipeline)
You are free to reproduce every number or benchmark Proxicord on your own CPU hardware and datasets using the built-in 10-stage pipeline (discovery → inspection → validation → preparation → planning → construction → search evaluation → recall evaluation → verification → results):
# Interactive selector (choose sift, dbpedia, or a custom folder)
proxicord --benchmark
# Calibrated datasets (auto-downloaded and checksum-verified on first run)
proxicord --benchmark --sift
proxicord --benchmark --dbpedia
# Any local dataset folder (auto-discovers roles by content and scales parameters)
proxicord --benchmark --path "path/to/dataset_folder"
# Sustained single-stream workload instead of default 3-pass burst mode
proxicord --benchmark --sift --protocol sustained
- Where results are written: Each run writes
benchmark_result.md,benchmark_result.json, andbenchmark_result.csvto./results/<dataset>/(overridable viaL2_BENCH_RESULTS_DIR), alongside full execution logs, event streams, and stage manifests in./results/<dataset>/audit_dir/<timestamp>/. - Protocols:
--protocol burst(default) runs 1,000 queries × 3 passes with 2,000 ms settle gaps and reports the per-cell median;--protocol sustainedruns the full query workload in a single continuous stream. - Full guide: See the Benchmark Methodology for environment overrides, dataset preparation, and metric definitions.
Architecture
proxicord/
├── src/
│ ├── core/ Core types and engine trait interfaces
│ ├── engines/ IVF-PQ index, retrieval, routing, quantization, memory, storage
│ ├── pipeline/ Multi-stage retrieval + 10-stage benchmark pipeline
│ ├── runtime/ Hardware discovery, backend registry, execution planner
│ ├── calibration/ Wilson-gated calibration, ground truth, sidecar verification
│ ├── ffi.rs 7-symbol C ABI (legacy, verified, embedded CLI)
│ └── cli/ Frozen CLI surface + embedding client
├── include/ proxicord.h C header
└── docs/ Architecture, Benchmarks, FFI Guide, Tuning
Documentation:
C ABI
The entire engine is exposed through a frozen seven-symbol surface (include/proxicord.h):
| Symbol | Purpose |
|---|---|
proxicord_open |
Open an index for querying |
proxicord_search |
k-NN search (out_ids, out_dists) |
proxicord_close |
Release a legacy handle |
proxicord_open_verified |
Open with the 12-check verified loader |
proxicord_search_verified |
k-NN search on a verified handle |
proxicord_close_verified |
Release a verified handle |
proxicord_cli_run |
Run the embedded CLI from any host process |
Build the C ABI shared library from source:
cargo build --release --lib --no-default-features
See the C ABI / FFI Guide for linking instructions on Windows (proxicord.dll), Linux (libproxicord.so), and macOS (libproxicord.dylib).
License
Copyright (C) 2026 Biforax. Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) — see the LICENSE file for full terms and commercial licensing details.
Metadata
Release files for proxicord 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| proxicord-0.2.0.tar.gz | 4.3 MB | Without provenance | Details for proxicord-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| proxicord-0.2.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for proxicord-0.2.0-cp312-cp312-win_amd64.whl |
Total release size: 7.5 MB
Release files / proxicord-0.2.0.tar.gz
| Download URL | proxicord-0.2.0.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
322b55afbd6a5d897f6c6debcbc1ac57b1cd481827912eacc7cfc721a2dd50e8
|
|
BLAKE2b-256 checksum How to use checksums |
3e5a1d5726f647477a97c74548943bf672b5b8acc98fe83a73d7f8eedb59ab75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / proxicord-0.2.0-cp312-cp312-win_amd64.whl
| Download URL | proxicord-0.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
794d02b914e00a45d666fc669be0353151e43905f8860806e7b04d3a4cb6f9f0
|
|
BLAKE2b-256 checksum How to use checksums |
4235884a7e1b0053e96066dc9f7db248a90de2b4e2a6c82b6336905aa7b1f09f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for proxicord 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.