Benchmarks
Fifteen measurements over 65 rows, every one against an external reference. What matters is not the best-case recall — it is the distance to the exact scan, and what you gain in exchange. Each table links to the notebook that produced it.
1. What was measured, and against what
Every number on this page has two references: the exact scan over the same query, and an approximate index on the same corpus. Without both, a recall figure means nothing.
2. Every number has a notebook
No figure on this page is copied from a report. Each one comes from a public notebook that installs the published packages, runs the benchmark and writes the output shown here.
| Notebook | What it measures |
|---|---|
| five-datasets-fusoes | GloVe, ProtBERT, SBERT, FastText, Word2Vec — routed config |
| scale-v2-gt-externo | projeção aleatória vs PCA contra ground truth externa |
| ndcg-vs-faiss | Madhava contra FAISS: recall, latência, RAM |
| madhava-certificado | indexação contra HNSW, IVF, PQ + certificado |
| scale-timed | 100 mil a 100 milhões, com tempo medido |
| certificado-v2-jus-med | the four tracer domains on real corpora |
| glosa-benchmark-2026-11 | Rol da ANS: 898 guias, cobertura e falso coberto |
winnex-madhava, winnex-tracer and winnex-ai-normalize from PyPI and runs without an API key. The result reproduces in minutes.3. Recall by real dataset — routed configuration
| Dataset (real, raw) | d | Routed config | Recall@10 | Bound viol. | Bound-pruned | Prefilter | Latency | Build |
|---|---|---|---|---|---|---|---|---|
| GloVe-Twitter | 25 | default | 1.0000 | 0 | 99.9% | 0.0% | 1.65 ms | 0.1 s |
| ProtBERT-CAFA5 | 1024 | pca_corpus | 1.0000 | 0 | 98.5% | 0.0% | 4.11 ms | 2.7 s |
| SBERT-Forum | 384 | pca_corpus | 0.991 | 0 | 78.6% | 17.7% | 1.90 ms | 1.8 s |
| FastText | 300 | default | 0.974 | 0 | 11.0% | 84.2% | 1.41 ms | 1.5 s |
| Word2Vec | 300 | preset word2vec* | 0.7333 | 0 | 0.0% | 80.0% | 0.26 ms | 0.1 s |
Cinco datasets reais com configuração roteada — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-madhava-1913-five-datasets-fusoes
4. Random projection vs PCA — the measured effect
| Dataset (real, raw) | d | Projection | Recall@10 | Bound viol. | Bound-pruned | Prefilter | Latency | Build |
|---|---|---|---|---|---|---|---|---|
| GloVe (rtatman) | 100 | random | 1.0000 | 0 | 100.0% | 0.0% | 1.36 ms | 0.1 s |
| pca_corpus | 1.0000 | 0 | 79.3% | 15.7% | 1.95 ms | 0.2 s | ||
| BIGANN (shurangwu) | 128 | random | 1.0000 | 0 | 100.0% | 0.0% | 1.25 ms | 0.1 s |
| pca_corpus | 1.0000 | 0 | 100.0% | 0.0% | 1.27 ms | 0.4 s | ||
| arXiv (tomtum/openai) | 1536 | random | 0.9960 | 0 | 0.4% | 94.6% | 3.44 ms | 1.7 s |
| pca_corpus | 1.0000 | 0 | 80.5% | 15.7% | 3.47 ms | 3.8 s |
Projeção aleatória vs PCA, ground truth externa — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-1913-scale-v2-gt-externo
5. Comparison with FAISS — recall, RAM and auditability
| Method | Recall@10 | Latency | RAM | Bound Vio. | Auditability |
|---|---|---|---|---|---|
| FAISS FlatIP (Exact) | 1.0000 | OOM | ~51.0 GB | 0.000% | None |
| FAISS HNSW (ef=512) | ~0.985 | 45.2 ms | ~32.0 GB | N/A | None |
| FAISS IVF-PQ + Refine | ~0.992 | 88.5 ms | ~28.0 GB | N/A | None |
| Winnex Madhava Cascade | 1.0000* | 64.9 ms | 18.6 GB | 0.000% | Full Proof |
Madhava contra FAISS: recall, RAM, auditabilidade — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-1913-ndcg-vs-faiss
6. Indexing — Madhava against HNSW, IVF and PQ
| Method | NDCG@10 | R@10 | Lat | Build | Vio |
|---|---|---|---|---|---|
| Madhava [64,128] | 1.0000 | 1.000 | 1.45ms | 0.10s | 0 / 10M |
| Madhava [32,64] | 1.0000 | 1.000 | 1.23ms | 0.06s | 0 / 10M |
| HNSW ef=128 | 1.0000 | 1.000 | 0.17ms | 0.55s | N/A |
| IVF np=50 | 1.0000 | 1.000 | 0.11ms | <1m | N/A |
| IVF np=20 | 0.987 | 0.980 | 0.05ms | <1m | N/A |
| PQ m=16 | 0.456 | 0.401 | 0.17ms | 0.33s | N/A |
Indexação contra HNSW, IVF e PQ — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-1913-madhava-certificado
7. Scale — from 100 thousand to 100 million
| Scale | Build | Query | NDCG@10 | R@10 | Mem |
|---|---|---|---|---|---|
| 100K | 0.77s | 3.95ms | 1.0000 | 1.0000 | 0.02GB |
| 1M | 4.90s | 36.9ms | 1.0000 | 1.0000 | 0.19GB |
| 10M | 42.0s | 399ms | 1.0000 | 1.0000 | 1.86GB |
| 50M | 203s | 2058ms | 1.0000 | 1.0000 | 9.31GB |
| 100M | 24.4s* | 2.0s | 1.0000 | 1.0000 | ~30GB RSS |
Escala de 100 mil a 100 milhões — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-madhava-1913-scale-timed
8. Tracer by domain — real corpus
| Product | Dataset (real) | Corpus | recall@10 | Bound viol. | Bound pairs | ms/query |
|---|---|---|---|---|---|---|
| Tracer-GOV | AG News (384d) | 2,000 | 1.0000 | 0 | 200,000 | 0.14 |
| Tracer-JUS | Indian Supreme Court (512d) | 2,000 | 1.0000 | 0 | 100,000 | 0.23 |
| Tracer-MED | MTSamples (BlueBERT 768d) | 2,000 | 1.0000 | 0 | 100,000 | 0.20 |
| Tracer-GAP | SEC 10-K (512d) | 187 | 1.0000 | 0 | 9,350 | 0.08 |
Tracer por domínio em corpus real — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-1913-certificado-v2-jus-med
9. Aggregated metrics
| Metric | Madhava | HNSW | IVF |
|---|---|---|---|
| NDCG@10 | 1.000* | 1.000 | 0.987 |
| Recall@10 | 1.000* | 1.000 | 0.980 |
| Bound violations | 0 in 20M+ verified | Cannot measure | Cannot measure |
| Build (1M) | 2.57s | ~40s | <1 min |
| Deterministic? | Yes | No (random) | Yes |
| Audit trail? | Per-document | None | None |
Métricas agregadas com certificado — notebook no Kaggle ↗
Notebook: https://www.kaggle.com/code/kleniopadilha/winnex-1913-madhava-certificado
10. What these numbers do not say
An honest benchmark declares where it loses.
- Latency is the axis where we lose. Indexing is far faster than HNSW (2.57 s against 40 s at 1M), but the query costs more — the bound is work an approximate search does not do.
- Word2Vec shows the limit of the method. Recall 0.7333 with 0% bound-pruned: on a weak manifold PCA degrades. That is why the router sends this dataset to a random projection.
- A random projection empties the proof. In the projection table,
randomreaches 100% recall with 0.4% provable exclusion on arXiv. The answer is right and the proof is empty. - 100M uses mmap streaming. The 24.4 s build at that scale is with a memory map, not a corpus in RAM — the FAISS comparison on that row is not apples to apples.
Every benchmark runs from the packages published on PyPI. The notebooks are on Kaggle and reproduce line by line.
11. Raw real datasets — no routing
Before the router existed, the engine ran on raw datasets with the default configuration. These are the numbers without tuning.
| Dataset (raw, real) | R@10 | Bound-pruned | Latency | Build | Vio |
|---|---|---|---|---|---|
| GloVe-Twitter d=25 (preset default) | 1.0000 | 99.9% | 1.65 ms | 0.1 s | 0 |
| ProtBERT-CAFA5 d=1024 (pca_corpus) | 1.0000 | 98.5% | 4.11 ms | 2.7 s | 0 |
| SBERT-Forum d=384 (pca_corpus) | 0.991 | 78.6% | 1.90 ms | 1.8 s | 0 |
| FastText d=300 (preset default) | 0.974 | 11.0% | 1.41 ms | 1.5 s | 0 |
| Word2Vec d=300 (quality gate → preset word2vec) | 0.7333 | 0.0% | 0.26 ms | 0.1 s | 0 |
12. Build speed — Madhava against HNSW
Where the engine wins decisively is index construction. The bound is computed once at build; the approximate index has to insert every vector into a graph.
| Scale | Madhava | HNSW | Speedup |
|---|---|---|---|
| 50K | 0.086s | 0.61s | 7.1× |
| 100K | 0.213s | 1.54s | 7.2× |
| 1M | 2.57s | 41.3s | 16.1× |
13. Engine routing inside Maestro
The ERP runs three different workloads, and each gets a different engine configuration. The choice is per workload, not per product.
| Módulo Maestro | Motor | Configuração | Justificativa |
|---|---|---|---|
| WorkRAI (compliance) | Bound 5%/1% | int8, postfilter | 99.6% recall, 0 violations, mathematical proof. HNSW loses 2.4% with no explanation. |
| DevAI (batch RAG) | Speed GPU batch | Accumulates 50+ queries | 3.1ms/query, build 1.5s, R=1.0. Determinístico. |
| Alertas (streaming) | Bound 5%/1% | Rebuild a cada 1-60s | Build 2s para 1M, 14s para 10M. HNSW leva 159s/3209s. |
| Sala Mensagens (search) | Speed GPU exact | Single-query | 6.1ms, aceitável para chat. Build 1.5s. |
| Fallback sem GPU | Bound 5%/1% ou Scan exato | CPU | If GPU unavailable, bound at 46 ms or exact scan at ~50 ms. |
14. Prompt-injection bound check — cost
winnex-madhava-sec uses the same bound to detect injected tool calls. This is what the check costs per query.
| Step | Result |
|---|---|
| Build 500 attack vectors | 0.53 ms |
| check_bounds (query) | 0.16 ms |
| Bound violations — layer 4D | 0 |
| Bound violations — layer 16D (refine) | 79 (candidates for exact refinement) |
15. Red ocean vs blue ocean
This is positioning, not a benchmark — but it belongs here, because every number above only matters in the column on the right.
| Dimension | Red Ocean (80%) | Blue Ocean (20%) |
|---|---|---|
| Primary need | Speed (sub-ms) | Proof and audit trail |
| Customers | Startups, e-commerce | Banks, healthcare, gov, legal |
| Competitors | FAISS (free), Pinecone | None (unique) |
| Pricing | Extreme commodity | Low (compliance premium) |
| Contract value | $1K-$50K/yr | $500K-$5M/yr |
| Regulatory need | None | EU AI Act, LGPD, HIPAA |
| Winnex position | Not competitive | Category creator |