Code Search Benchmark: E5 vs Nomic Embed Text v1.5 (2026-05-28)

This page tracks the direct A/B benchmark and relevance comparison between the current E5 baseline and nomic-embed-text-v1.5 for MemorySmith code search.

Executive Summary

Scope

Current Status

E5 Baseline Snapshot

Rebuild (cold)

Model Files Chunks Elapsed (ms) Build (ms) Files/s Chunks/s Avg Embedding ms/call
E5 (e5-base-v2.onnx) 161 1746 1055795 1053000 0.15 1.66 3341.042

Query Baseline (warm)

The first sample in each query set is consistently higher than subsequent runs, so median and min values better represent steady-state behavior on this host.

Query Name Avg ms Median ms Min ms Max ms Top Document
semantic provider path 592.500 1527.675 115.037 1527.675 MemorySmith.App/Components/Pages/Admin.razor
query telemetry 261.165 554.907 108.028 554.907 MemorySmith.Tests/CodeSearchServiceTests.cs
vector prefilter 258.636 543.455 82.549 543.455 MemorySmith.Tests/CodeSearchServiceTests.cs
benchmark harness 191.579 506.250 33.445 506.250 MemorySmith.Tests/CodeSearchServiceTests.cs
page validation 297.627 695.855 49.263 695.855 MemorySmith.App/Components/Pages/Pages.razor
semantic provider tests 279.794 698.804 34.710 698.804 MemorySmith.Tests/SemanticEmbeddingPathTests.cs

Nomic Snapshot

Rebuild (cold)

Model Files Chunks Elapsed (ms) Build (ms) Files/s Chunks/s Avg Embedding ms/call
Nomic (nomic-embed-text-v1.5.onnx) 161 1746 1310318 1306000 0.12 1.34 4152.744

Query Baseline (warm)

Query Name Avg ms Median ms Min ms Max ms Top Document
semantic provider path 134.940 277.313 17.376 277.313 MemorySmith.App/Services/SemanticEmbeddingSearchService.cs
query telemetry 84.586 131.603 22.733 131.603 MemorySmith.App/Services/CodeSearchService.cs
vector prefilter 144.456 347.477 16.294 347.477 MemorySmith.App/Services/CodeSearchService.cs
benchmark harness 170.376 367.349 18.833 367.349 MemorySmith.Tests/SearchBenchmarkTests.cs
page validation 104.484 270.826 20.495 270.826 MemorySmith.App/Services/PageService.cs
semantic provider tests 126.504 224.954 32.620 224.954 MemorySmith.App/Services/SemanticEmbeddingSearchService.cs

Side-By-Side Summary

Rebuild Cost

Query Latency

Query Name E5 Avg ms Nomic Avg ms Nomic Faster %
semantic provider path 592.500 134.940 77.23
query telemetry 261.165 84.586 67.61
vector prefilter 258.636 144.456 44.15
benchmark harness 191.579 170.376 11.07
page validation 297.627 104.484 64.89
semantic provider tests 279.794 126.504 54.79

Top-Result Drift (Quick Read)

Relevance Suite Results (Completed)

The fixed relevance suite now exists in Scripts/code-search-relevance-suite.json and is executed by Scripts/Measure-CodeSearchRelevance.ps1.

Pass/fail totals:

Case-Level Readout

Case E5 Nomic E5 Warm Avg ms (no first) Nomic Warm Avg ms (no first)
implementation-telemetry pass pass 2251.307 13.331
implementation-prefilter pass pass 1931.827 66.092
page-validation-intent pass pass 2146.240 97.564
semantic-provider-path pass pass 2211.436 14.801
semantic-provider-tests pass pass 2113.255 41.070
benchmark-harness-intent pass pass 2139.772 12.637
ranking-weight-implementation pass pass 2041.100 48.266
nunit-regression-tests pass pass 2393.986 45.714

Interpretation:

Relevance Spot-Check Plan

  1. Expand the fixed suite from 8 to 20+ cases covering page routing, auth/admin, chat tools, and task workflows.
  2. Add expected-in-top-3 constraints (not only top-1) for ambiguous intents.
  3. Version the suite by date/model family so trend comparisons stay reproducible.

Recommendation

  1. Keep E5 as the default rebuild path for now because rebuild throughput is materially better (24% faster on this corpus).
  2. Continue Nomic as an optional query-optimized candidate because query latency was lower across all measured prompts in this run.
  3. Keep the new fixed relevance suite in CI and extend it to 20-30 queries with expected top-3 paths by intent category.
  4. Prioritize separating semantic and code-search embedding configuration seams so model experimentation does not couple both surfaces.