Skip to content

Add Nomic query and document embedding prefixes#10

Merged
renezander030 merged 1 commit into
mainfrom
agent/nomic-query-prefixes
Jul 18, 2026
Merged

Add Nomic query and document embedding prefixes#10
renezander030 merged 1 commit into
mainfrom
agent/nomic-query-prefixes

Conversation

@renezander030

Copy link
Copy Markdown
Owner

What changed

  • Add opt-in Nomic search_query: and search_document: embedding prefixes.
  • Add separate vector collection and metadata-path configuration for safe side-by-side reindexing.
  • Make embedding truncation Unicode-safe.
  • Add benchmark variants and any-of-N gold task support for A/B evaluation.

Why

Nomic retrieval expects search_document: for indexed documents and search_query: for queries. The adapter previously embedded both without task prefixes, so the recommended asymmetric retrieval mode was unavailable. Prefixes must be enabled with a separately reindexed collection.

Measured impact

On a private 25-question, 1,900-task benchmark:

  • Semantic: hit@1 84% -> 88%, recall@5 92% -> 96%, MRR 0.88 -> 0.92.
  • Hybrid/find: hit@1 84% -> 88%, recall@5 96% -> 100%, MRR 0.89 -> 0.93.

No private benchmark data is included.

Validation

  • npm test: lint, PII, claims, 225 tests, and all proof suites passed.
  • Focused adapter test suite: 8/8 passed.
  • Synthetic side-by-side benchmark variant test passed, including any-of-N gold task IDs.

@renezander030
renezander030 marked this pull request as ready for review July 18, 2026 08:53
@renezander030
renezander030 merged commit eb7c5db into main Jul 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant