AM.
Back to Overview

Designing an Embedding Migration Retrieval Check

Mandate & Focus

Design study · Fictional enterprise knowledge team · Independent Design study

By Design study

Authored rankings and relevance labels, independent of the hypothetical vector dimensions. Offline arithmetic and boundary checks executed locally. No embedding model, search index, database size, latency or realized savings were measured.

Design feature 01

4 fictional questions

Design feature 02

3 judged questions

Design feature 03

0 model calls

Executive Summary

Four authored questions separate top-three recall against declared labels from a hypothetical vector-value storage estimate.

Architectural Deep Dive

Design study. A fictional enterprise knowledge team is considering a shorter embedding representation for a RAG service. Before generating embeddings or building an index, it prepares a small evaluator for comparing two ranked result lists against the same declared relevance labels. The aim is to make the evaluation contract inspectable before connecting an actual retriever.

The four questions, document identifiers, relevant sets and ranked outputs are authored fixtures. The labels baseline and candidate identify hand-written rankings. They are not outputs from 768-dimensional and 256-dimensional models. The separate storage illustration uses those invented dimensions only to exercise a bounded formula. No causal relationship between the dimensions and the fixture’s retrieval scores is claimed.

Separate the representation estimate

The pgvector reference specifies 4 × dimensions + 8 bytes for a single-precision vector value. For 100,000 invented values, the worksheet calculates 308,000,000 bytes at 768 dimensions and 103,200,000 bytes at 256 dimensions. The 204,800,000-byte difference applies to the stated vector-value calculation.

The estimate excludes indexes, table overhead, text, metadata, replicas, backups and migration overlap. No database is created or measured. A production inventory would need actual chunk counts and measured storage under its own configuration. A proposed shortening operation would also need a compatible model: Sentence Transformers’ Matryoshka guide describes representations trained to support smaller dimensions, rather than a universal promise about arbitrary embeddings.

Declare top-three recall against fixture labels

The local evaluator selects the first three distinct document identifiers returned for each question. It counts how many occur in that question’s declared relevant set and divides by the size of that set. This applies the true-positive and false-negative recall relationship described in the scikit-learn reference to the declared retrieval cutoff. The reference function here is independent of that library. The result describes coverage of authored labels, not completeness against an unknown corpus.

For this exercise, an absent or empty relevant-label list is treated as unjudged. That is a deliberate local convention for incomplete preparation material. It is not a claim that the question has no relevant answer. Unjudged questions remain in the per-question output but are excluded from the macro average, whose denominator is reported explicitly.

Trace the three judged questions

Question q1 declares documents a and b relevant. The baseline ranking is a, x, b, so it retrieves both and scores 1. The candidate ranking is a, x, y, finding only a and scoring one half. The output retains the lost identifier b so a later reviewer can examine what changed.

Question q2 declares c relevant. The baseline ranking is x, c, y and the candidate is c, z, y. Both score 1 for recall at three, although c moves earlier. This illustrates a limit of the selected metric: equal recall does not mean identical ranking. The stored result order allows a later investigation to examine position-sensitive behavior without changing the original fixture.

Question q3 declares d and e relevant. The baseline finds d in d, x, y, giving one half. The candidate returns x, y, z, finding neither and scoring zero. Document e is absent from both top-three lists. That shared miss remains visible instead of being hidden by a report showing only changes between systems.

Across the three judged questions, baseline macro recall is five sixths and candidate macro recall is one half. These exact fractions are calculated from fictional lists. They are not observed model scores and establish no statistical confidence about a real retrieval population. Question q4 has no judgments and appears as unjudged for both paths, with no invented numeric score.

Keep malformed evidence out of the average

The verifier rejects duplicate question IDs, repeated identifiers within a ranking, duplicate relevant identifiers and an invalid cutoff. Those checks keep ambiguous fixture records from entering an apparently precise aggregate. A deliberately empty ranking for a judged question produces zero recall; a ranking with no relevance judgments produces an unjudged result. The distinction is part of the authored contract.

The executed boundary checks also confirm that an all-unjudged evaluation has no numeric macro score and that identifiers beyond the cutoff do not count. Reordering questions preserves the aggregate, while the per-question records remain available for inspection. The reference uses exact fractions rather than rounding before the comparison.

Retain the rehearsal and the missing experiment

The fictional fixture, offline evaluator, reproduction guide and actual local execution record preserve the inputs, outputs, boundary-check count and source/input hashes. Python’s standard library is sufficient to reproduce them. No credentials, model or index are used.

The next experiment needs an authorized corpus, accountable relevance review, pinned query/document encoders, an explicit shortening method, measured index settings and a representative task set. A service decision also needs latency, answer-quality and cost evidence. The companion essay explains that decision boundary; the inference cost calculator handles a separate token-cost scenario. The published material prepares a comparison without presenting an unrun embedding migration as a demonstrated saving.

Proposed approach

Scope
Exact recall arithmetic and bounded vector-value estimation
Evidence
Authored rankings, labels, verifier and actual local execution record

Sources

  1. Vector type storage reference — pgvector maintainers; checked 22 November 2026
  2. Matryoshka Embeddings — Sentence Transformers documentation; checked 22 November 2026
  3. Recall score definition — scikit-learn documentation; checked 22 November 2026

Related reading

Read the publishing standards or suggest a correction.

Technical FAQ

Were two embedding models compared?
No. The baseline and candidate rankings are hand-written fixtures independent of the dimensionality illustration. No model or index was run.
What does the macro average include?
It averages exact top-three recall for three questions with nonempty declared relevant sets. A fourth question is retained as unjudged.
Is the byte difference a measured database saving?
No. It is a calculation for 100,000 hypothetical single-precision vector values using the documented type formula, excluding indexes and other overhead.

Ready to architect operational leverage?

Available for fractional executive leadership, enterprise architecture consulting, and board-level technical advisory.

Initiate Dialogue ↗