← documentation

Reproduce the proof yourself

This page is not a claim. It is an instruction: run the code below and you will obtain the same numbers we publish, on real public data, in under two minutes.

What you are checking

That a vector search engine can prove, for each document it did not return, that the document could not belong in the top-K — and that the proof holds on a corpus you download yourself, not one we ship.

1. Get a real corpus

2,167 court decisions from the Brazilian Superior Court of Justice (STJ), published under open data. No account, no key.

curl -sL -o stj.json \
  "https://dadosabertos.web.stj.jus.br/dataset/bab65848-f287-4146-8273-e58faee39ad2/resource/de1881ee-8527-4b35-b1c6-99ad2b2fef57/download/20260930.json"

2. Build the index with the proof enabled

import json, numpy as np
import winnex_madhava as mad
from winnex_tracer.core import InstrumentedEngine
from sentence_transformers import SentenceTransformer

d = json.load(open("stj.json"))
docs = [f"{r.get('descricaoClasse','')}. {r['ementa']}"
        for r in d if len((r.get('ementa') or '').strip()) > 120]

enc = SentenceTransformer("sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
C = enc.encode(docs, normalize_embeddings=True).astype(np.float32)

engine = mad.build_engine(
    C, dim=384, metric="cosine", k=10,
    basis="pca_corpus",    # <-- the parameter that produces the proof
    stage1_dim=256,
    k1_fraction=1.0,
    postfilter=True,
    audit_exhaustive=True,
)

3. Measure

q = enc.encode(["penhora de bem de família por dívida de condomínio"],
               normalize_embeddings=True)[0]
c = InstrumentedEngine(engine, mode="commitment").search_with_commitment(q, k=10)

print(c["total_excluded_count"])   # documents PROVEN outside top-10
print(c["bound_pairs"])            # documents examined
print(c["bound_violations"])       # must be 0

4. What you should see

MetricResultMeaning
total_excluded_count2,157 of 2,167 99.5% of the corpus proven irrelevant to this query
bound_pairs2,167every document was examined — none skipped
bound_violations0no exclusion was wrong
recall_guaranteeexact_globalthe returned top-10 is the true top-10
latency~92 msthe cost of producing proof versus 0.2 ms without it

5. Compare with the default setting

Change one line — remove basis="pca_corpus" — and run again:

basisExcluded with proofLatency
random (default)0 of 2,1670.2 ms
pca_corpus2,157 (99.5%)92 ms
Why we show you this

The default configuration does not produce per-document proof. It is faster and the top-K is still exact, but nothing is proven excluded — every document is resolved by exact comparison instead.

We could have hidden this. A vendor page usually shows the best configuration and omits the default. We show both, because a CTO who discovers it later is a lost customer, and a CTO who discovers it here is a reference.

What this does not prove

Run it on Kaggle — public output

Same measurement, executed on Kaggle's free CPU, with the output visible and reproducible:

Open the Kaggle notebook →

ConfigurationExcluded with proofExaminedViolationsLatency
basis="random", s1=12802,16702.2 ms
basis="random", s1=25670 (3.2%)2,16702.4 ms
basis="pca_corpus", s1=1282,153 (99.4%)2,16706.6 ms
basis="pca_corpus", s1=2562,157 (99.5%)2,167021.7 ms

Latency on Kaggle's shared CPU is lower than on our machine because the index was already built — the numbers that matter are the excluded counts and the zero violations.

Verified against brute force

brute-force top-10 : [48, 857, 872, 878, 983, 1384, 1471, 1828, 2103, 2120]
engine top-10      : [48, 857, 872, 878, 983, 1384, 1471, 1828, 2103, 2120]
identical          : True

documents proven outside : 2157 of 2167
bound violations         : 0
recall guarantee         : exact_global
signature                : VALID — Ed25519

If you want this on your own corpus

We will run it on data you already have, and you compare the result against what your current system produces. Fifteen days, no cost for the first one.

Request an audit See the code examples