Skip to content

P1: validate HNSW retrieval on representative larger corpus #27

Open

Description

@guillaume-flambard

The pgvector HNSW index exists and the read-only KNN diagnostic recovered 20/20 exact top candidates from 70 on the small current corpus, but PostgreSQL chose a sequential scan. Acceptance: (1) isolated, clearly synthetic benchmark with at least 10k vectors without modifying production observations; (2) EXPLAIN query-plan evidence for ANN vs exact; (3) recall@K measured over current-source and independent-root eligibility, with missed-pair review; (4) p50/p95 latency and memory/cost bounds; (5) do not switch the production query unless recall targets and resource limits are met; (6) CI-safe deterministic tests. Never claim synthetic benchmark measures real-world corroboration accuracy.

Activity

  1. guillaume-flambard commented on Oct 12, 2026

    @guillaume-flambard
    CollaboratorAuthor

    P1 scalability progress: PR #29 adds isolated 10k-vector deterministic synthetic benchmark. Local PostgreSQL EXPLAIN used the HNSW index. Across six synthetic anchors, top-10 recall vs exact search was 10/10 for each; ANN median/p95 0.66/1.47 ms, exact median/p95 5.50/17.19 ms. All measurements are synthetic, limited to six anchors and include DB round trips. Production candidate retrieval is NOT changed. 263 PostgreSQL-inclusive tests pass. Still needed before closing: representative real-source corpus with enough source-grounded paraphrases, recall and p95 measurements across independent threads, and production-scale index-plan proof. The current 44-source corpus is far too small. Do not interpret this as real-world semantic accuracy or proof of production performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions