00-START-HERE · 01-READING-ROUTES · 16_compression_and_index_economics · 18_classical_ir_you_are_expected_to_know This chapter prepares you to operate the retrieval layer of a Retrieval-Augmented Generation (RAG) system under deletion, growth, metadata, filtering, and natural-language constraints.
TL;DR
- HNSW supports online insertion. Deletion must preserve result exclusion and a usable search structure; tombstones plus a later rebuild are a common design, not the only possible implementation.
- Optimize rebuild cadence against comparable work costs, measured latency, and the applicable completion obligation. Include build, validation, propagation and concurrent-update catch-up time; inspect deleted nodes encountered during search, not only the already-clean result list.
- Sharding addresses per-node capacity, replication supplies additional serving copies, and key partitioning can reduce fan-out. Throughput and availability gains depend on load balance, routing and failure policy.
- Choose the database around durability, filtering, topology, writes, tenancy and operations. ANN is a small term in the worked latency scenario, not in every production workload.
- Hard filtering can exclude relevant evidence irrecoverably within that retrieval path. A product of metadata coverage and accuracy is a bound only under the stated query-conditioned equality-gate assumptions, not from global metadata averages alone.
- Choose filtering from matching-set size, actual ranked-candidate survival, concurrency and measured costs. The exact-scan and post-filter thresholds below belong to explicit models, not universal selectivity regimes.
- Validate model-extracted constraints without silently changing the user's intent. A fallback must restore relevant query terms, retain authorization, and be evaluated independently. Trusted tenant and ACL enforcement remains outside model control.
The story
Imagine a vast public library whose books are arranged by a walking map rather than by shelf number. The walking map is the vector index. Nearby books discuss similar ideas, and the librarian follows links from one shelf to the next to reach a useful answer. Adding a new book is manageable. The librarian walks the existing map, finds nearby shelves, and draws new links. Removing a book is harder because that book may be the bridge between two wings. The library can put a red sticker on a withdrawn book. That tombstone prevents the book from being handed to a reader while its search representation may still guide the librarian's route. The sticker does not erase the book or its copies. The library can build a clean map beside the old one, but must budget temporary capacity, validate it, and replay intervening changes before switching. When the collection outgrows one building, the director separates three decisions. Sharding distributes books; a broad question may still visit every building. Replication creates extra serving copies, with additional storage and synchronization. Partitioning uses a key such as tenant or region to skip buildings, provided the key is correct and the resulting traffic is balanced. Choosing the library building is not a race for the fastest hallway. The director must ask whether records survive a crash, whether catalog rules run before retrieval, whether the building is in the right region, and who answers the alarm at night. The hallway walk can be less than one millisecond, while a remote building or a reranking desk consumes tens or hundreds of milliseconds. The catalog has three kinds of labels. The registrar supplies system-of-record fields such as owner and permission. The document processor recovers structural fields such as heading and page. A model generates labels such as document type or summary. None is automatically complete or correct. A soft label can push the right book out of the final result list; a hard rule can exclude it before ranking even begins. Filtering is the gate at the reading room. A tiny admitted set can make a complete exact scan attractive. A broad predicate may leave enough results after global retrieval, but only if enough highly ranked items actually pass. Between those cases, filter-aware traversal can help avoid paths broken by masking. A preference such as recency should not silently become a validity rule; permissions remain mandatory. A reader may ask for last quarter's board deck without filling out a catalog form. An intake clerk can split the request into topic words and a proposed date-and-type predicate using the real schema, authorized value catalog, reference date, timezone and calendar convention. An absent value may mean a bad alias, a stale catalog, or a legitimate empty answer—not necessarily an extraction error. The clerk clarifies or makes an explicit, logged broadening fallback when appropriate. The library enforces permission independently on every path.
Decoder table
| Technical term | Plain-English meaning | Why it matters |
|---|---|---|
| Vector | A numeric representation of a chunk | The index searches these numbers rather than raw prose |
| Embedding | The process or model that maps content into a vector | Similar content should land near similar content |
| Vector store | A system that keeps vectors, metadata, and a search index | It surrounds ANN search with persistence, filtering, updates, and operations |
| Approximate nearest-neighbor (ANN) search | A fast search that may miss the exact nearest item | It trades some recall for lower latency and less work |
| Exact scan | Exhaustive scoring of all admitted vectors under a specified metric and precision | It can recover exact neighbors inside that set, not a semantically excluded answer; overhead still needs benchmarking |
| for a nonempty gold set | Query hit rate is instead ; they coincide for one gold item | |
| Precision | The useful share among returned or admitted items | A bad proxy can admit stale or irrelevant material |
| Ground truth | An exact or labeled answer set used for evaluation | It reveals misses that approximate search and filters can hide |
| Fixed live-vector count in the replacement model; the indexed population is stated separately | Resident nodes grow to only under the no-recycling, constant-live-population assumptions | |
| Embedding dimension | It sets vector bytes and exact-scan work | |
| Hierarchical Navigable Small World (HNSW) | A layered proximity graph used for ANN search | Its graph structure explains insertion, deletion, filtering, and sharding behavior |
| Inverted file product quantization (IVF-PQ) | A partitioned and compressed vector index | Its deletion and drift behavior differs from HNSW |
| Product quantization (PQ) codebook | Learned prototypes used to compress vector blocks | Distribution drift can make old codebooks stale |
| Coarse quantizer | The IVF model that assigns vectors to coarse cells | Cell imbalance and drift raise the probes needed for recall |
| The number of IVF cells searched per query | Drift can force this value upward | |
| HNSW’s configured neighbor count on upper layers | It controls graph memory and connectivity | |
| Allocated base-layer neighbor-slot limit, set to here | Outgoing slot limits do not cap incoming degree or search distance evaluations | |
| Retained candidate-width parameter used during graph construction | It is not an expansion count, work identity or distance-evaluation cap | |
| Retained candidate-width parameter used during graph search | Its relationship to recall, visited nodes and latency is implementation- and workload-dependent | |
| Clean candidate-pool width in the illustrative aging model | The width-compensation model preserves an expected live count, not certified recall | |
| Select-neighbors heuristic | A graph-link selection rule favoring diverse directions | It can retain useful bridges, but is not a guarantee of reachability after arbitrary local updates |
| Out-edge | A link recorded on the node where the link starts | HNSW stores these directly |
| In-neighbor | A node with an outgoing reference to another node | A reverse map can find these efficiently; scanning outgoing edges is an alternative and indegree is not capped by |
| Reverse-edge index | An added map of incoming references | The toy extra four-byte identifiers add ; a complete map also needs actual degrees and overhead |
| Bridge edge | A link that connects otherwise distant graph regions | Deleting its endpoint can make a whole region unreachable |
| Tombstone | A marker excluding an identifier from results while navigation state may remain | Logical serving exclusion is not physical removal of vectors, payloads or copies |
| Deleted-identifier bitmap | One bit per identifier marking logical deletion | It makes result suppression cheap in bytes |
| Beam | A retained candidate set in graph search | Live-result heaps and traversed nodes differ; deleted-node behavior depends on the implementation |
| Effective beam | Expected live count in the stipulated pre-exclusion candidate pool | assumes representative deletion within that pool |
| Churn rate | The fraction of the live corpus replaced per day | It controls index growth and rebuild frequency |
| Tombstone fraction | Deleted share of resident nodes; measures local search exposure | Global fraction need not describe a query's visited neighborhood |
| Query rate | Queries served per day | Higher traffic makes stale-index query work more expensive |
| Clean query cost | Stipulated clean work proxy, distance evaluations | It is not the work automatically implied by |
| Rebuild cost | Fixed rebuild work in the cycle model, expressed in the same currency as query work | Real builds need cost conversion, scratch space, drift and lead-time accounting |
| Cost-optimal period | The rebuild interval that minimizes build plus query work | It is only one of three cadence limits |
| Days since rebuild or the selected rebuild period | It drives tombstone accumulation and beam inflation | |
| Daily rebuild plus stale-query cost | Its minimum gives the economic rebuild period | |
| Derivative of the daily cost with respect to rebuild period | Setting it to zero yields the economic optimum | |
| and | Measured latency and applicable completion ceilings in an idealized model | A trigger must leave build/validation/propagation time; a calendar month is not a fixed days |
| Service-level objective (SLO) | A latency or reliability target the service promises | Beam growth can force a rebuild before the cost optimum |
| Erasure deadline | The applicable completion obligation for the data and systems in scope | The source's legal response window is not a universal, exception-free physical-erasure deadline |
| Blue-green rebuild | Build and validate a new generation, synchronize changes, then switch | Two expected-slot copies need approximately here before scratch and payloads, not zero query impact |
| Slot recycling | Reusing a tombstoned graph slot for a new vector | It controls growth but can inherit links chosen for a different point |
| Streaming merge | Folding updates into new immutable index segments over time | It avoids a single monolithic rebuild but adds update machinery |
| Shard | One disjoint slice of the corpus | It reduces memory per node but requires scatter-gather for broad queries |
| and | Shard count versus post-filter survivor count | Separate subscripts prevent machine counts from being mistaken for result counts |
| and | Replica count versus retrieval score | Replication factor and recall have different units and meanings |
| , and | Partition count , predicate and extractor parameter count | Use context-specific notation rather than one overloaded letter |
| and | Keyed-query fraction versus extracted Boolean predicate | One prices routing; the other selects a corpus subset |
| Partition key | The attribute used to route a query | Partitioning only wins when the query reliably carries it |
| Scatter-gather | Send a broad query to shards and merge local candidates | Exact local top- sets can recover exact global top- under the stated metric, tie and snapshot conditions |
| Fan-out | Number of branches touched by one request | A request waits for the maximum branch latency plus network/merge work; correlation matters |
| Top- | The highest-scoring results requested | Shards each return local candidates that must be merged globally |
| Tail latency | Delay in the slowest portion of the request distribution | Fan-out turns rare slow machines into common slow queries |
| and | The 95th and 99th percentile latencies | They expose delay that a mean hides |
| Hash sharding | Assign identifiers to shards with a suitable hash | Expected identifier balance is not a guarantee of balanced bytes, hot-key traffic or compute |
| Attribute partitioning | Placing items together by tenant, region, type, or date | It routes keyed queries without broadcast |
| Skew | Uneven data or query load across partitions | A large tenant can make pure attribute partitioning fail |
| Hybrid partitioning | Routing small tenants directly while sub-sharding large tenants | It preserves routing gains while containing whales |
| Tenant | One customer or isolation domain in a shared system | Tenant size and permissions shape routing and filtering |
| Pareto frontier | Configurations not dominated on the chosen objectives | Architectural class labels and qualitative ratings do not establish a measured frontier |
| Refractive index of silica in the network example | It converts light speed into a physical round-trip floor | |
| Vacuum light speed in the propagation example | The subscript distinguishes it from daily churn and metadata coverage | |
| Round-trip propagation or measured round-trip delay, as specified | A hop consumes part of a target; it does not exceed that target alone | |
| Durability | The ability to preserve data across crashes | It often adds write logging and synchronization cost |
| Write-ahead log | A durable record written before applying an update | It supports recovery but fights minimum in-memory latency |
| fsync | An operating-system call that forces buffered writes to durable storage | It improves durability and adds write latency |
| Single instruction, multiple data (SIMD) | Hardware execution of one operation across many values | Different implementations gain constant-factor speed from layout and vectorization |
| Structured Query Language (SQL) extension | Vector search added to a relational database | It gains joins and familiar operations but shares resources with transactions |
| Online transaction processing (OLTP) | The application’s regular transactional database workload | A large vector index can compete with its buffer pool |
| B-tree | An ordered database index for scalar fields | A query planner can combine it with vector search for metadata predicates |
| Virtual private cloud (VPC) | An isolated cloud network boundary | Same-VPC placement can make the store hop small |
| Graphics processing unit (GPU) | A throughput-oriented accelerator | Large batches help throughput but can fight per-query tail latency |
| Field-programmable gate array (FPGA) | Reconfigurable search acceleration hardware | It is one database-selection axis named by the source |
| Reranker | A model that rescores retrieved candidates | It often costs far more latency than ANN search |
| Cross-encoder | A reranker that jointly reads a query and passage | It improves ranking at substantial compute cost |
| Floating-point operation (FLOP) | One arithmetic operation used to price model compute | It makes reranker and prefill costs comparable |
| -bit floating point (fp32) | Four-byte storage for each vector coordinate | It sets vector memory and scan bandwidth |
| Brain floating point 16 (bf16) | A two-byte model-weight format | It sets the extractor’s weight-read floor |
| Byte units | Decimal , , and ; binary when explicit | Vendor labels such as KB need version-specific interpretation |
| Time units | Millisecond () and microsecond () | They make network, model, and search latency directly comparable |
| Random-access memory (RAM) | Main memory used for the resident index | Index size divided by usable RAM sets minimum shard count |
| High Bandwidth Memory (HBM) | Accelerator memory with very high transfer bandwidth | Autoregressive decoding repeatedly reads model weights from it |
| Matryoshka representation learning | An embedding design that retains usefulness after dimension truncation | It can reduce vector memory without training a separate full pipeline |
| Metadata | Fields stored beside a vector | Predicates can remove candidates before similarity scoring |
| Descriptive metadata | Fields supplied by a system of record | Their defined semantics can be authoritative while synchronization, freshness or coverage still fails |
| Structural metadata | Fields recovered by a parser or layout model | Both missing and erroneous values need auditing by format and query cohort |
| Generated metadata | Fields synthesized by a model at ingestion | Coverage need not be ; hard-label errors and soft-ranking changes can both reduce retrieval recall |
| System of record | The authoritative source for a field | Hard security and ownership predicates need this provenance |
| Multipurpose Internet Mail Extensions (MIME) type | A standard content-type label | It is an example of descriptive metadata |
| Access-control list (ACL) | The authoritative list of who may access an item | It must never be generated by the query model |
| Coverage | Global fraction with a populated field; is the corresponding query-gold probability | A global average alone is not a query-level recall bound |
| Accuracy | Correct fraction among populated values; conditions on present query-gold fields | Class confusion, relevance weighting and gate semantics determine the recall effect |
| Hard predicate | A Boolean rule that excludes nonmatching chunks | Anything excluded cannot be recovered downstream |
| Soft signal | A feature used for embedding or ranking rather than direct exclusion | It avoids a particular hard gate but can still push a gold item out of the top- |
| Null-tolerant predicate | Also admit items whose field is missing | It removes one missing-value exclusion under stated assumptions, not every retrieval failure |
| Cardinality | The count of distinct values or matching rows for a field | It guides planners, value catalogs, and selectivity estimates |
| Prompt hash | A compact identifier for an exact generation prompt | It supports targeted metadata backfills after prompt changes |
| Optical character recognition (OCR) | Text recovery from scanned page images | OCR without layout can lose headings and structural fields |
| Selectivity | Corpus fraction admitted by a predicate | Its pass rate among ranked ANN candidates may differ and may be correlated across candidates |
| Pre-filtering | Resolving the predicate before vector scoring | It can enforce access and make tiny candidate sets cheap |
| Inverted index | A map from metadata values or terms to matching identifiers | It resolves a predicate before vector scoring |
| Post-filtering | Retrieve globally, then discard predicate failures | It may produce short lists unless ranked survival and over-fetch are sufficient |
| Binomial distribution | for IID candidate passes of known probability | Exact tail calculations apply to this model, not automatically to ANN rankings |
| , and | , and the exact binomial survivor tail for | Uniform sampling without replacement instead gives a hypergeometric model |
| Normal approximation | A rough bell-curve approximation to a count tail | The source's is not an exact reliability bound |
| Over-fetch | Number of global candidates before filtering | For small , the Poisson approximation is for top- at probability ; use the exact model tail for integer requirements |
| Filter-aware ANN | A traversal or structure designed to improve search under predicates | It needs tested recall and latency for the actual predicate combinations |
| Induced subgraph | The graph left after masking all nonmatching nodes | It can be disconnected even when the original graph was navigable |
| Multi-hop expansion | Explore paths through otherwise masked intermediate nodes | It may improve filtered reachability at extra work; arbitrary-predicate connectivity is not automatic |
| Label-aware edge | A graph link added to preserve paths within a filter category | It moves filtered-connectivity work into index construction |
| Over-filtering | Applying a valid hard rule that is wrong for the user’s intent | Metrics over the already-filtered set cannot detect it |
| Expected survivor count under the IID model | The Poisson and rough normal approximations use this mean; neither automatically describes ANN rankings | |
| Self-querying | Model-based conversion of one utterance into semantic text and a predicate | It lets natural language express filters without a form |
| and | The original user request and its semantic residual | Retain the original terms so a permitted predicate fallback can restore the intended retrieval query |
| A query that carries a partition key | It can route to one partition instead of broadcasting | |
| and | Full corpus and the subset admitted by predicate | Retrieval searches after extraction and validation |
| Semantic channel | The residual words sent to the embedding model | It carries topical meaning |
| Predicate channel | The Boolean constraints extracted from the utterance | It carries order, membership, and conjunction |
| Field schema | The allowed metadata names and types | It constrains what the extractor may emit |
| Value catalog | Allowed or observed values with tenant scope, aliases and a version | An absent value can mean an error, a stale catalog or a legitimate zero-match request |
| Finite-state grammar | Restricts output token transitions to a structured language | A completed valid output can be syntactically correct while semantically wrong; failures still require handling |
| Text-to-SQL semantic parsing | Converting natural language into a structured database query | It frames self-querying as a smaller known-hard extraction task |
| Constrained decoding | Decode within a specified grammar or schema | Syntax constraints do not certify intent, authorization or referential correctness |
| Referential validity | Whether a predicate names values that actually exist | Syntax alone does not provide it |
| Detectable extraction error | Probability of an actual extraction error caught by validation | The fallback has its own conditional recall; dropping a predicate alone need not recover the baseline |
| Undetectable extraction error | Probability of an error that passes implemented validation | Real but wrong values require labeled intent tests; monitoring alone is not a recall guarantee |
| Probability of correct extraction on the target workload | The break-even holds only in the zero-recall-wrong-branch toy model | |
| and | Correct-branch retrieval score and ordinary authorized baseline in the toy example | Baseline performance on the validation-triggering subset may differ from its global average |
| Outcome-weighted expected retrieval score | Use actual conditional branch scores; needs restored-query and zero-undetected-recall assumptions | |
| and | System authorization and model-extracted predicates | Their conjunction lets the model narrow access but never widen it |
| Fail open | An explicitly permitted broadening fallback for non-security constraints | Preserve intent or clarify, restore original terms, log the relaxation and keep authorization unchanged |
| Fail closed | Return nothing and raise when authorization cannot be enforced | Permission failure must not widen access |
| Session filter | Trusted tenant and ACL predicate, compiled independently of model output | Enforce its conjunction on every path; a string append is not an access-control proof |
| Reference date | System-supplied date with timezone and calendar convention | Resolve relative intervals explicitly and version cache keys at period boundaries |
| Query planner | Logic that chooses an execution path from data statistics and predicates | It switches among exact scan, filtered ANN, and post-filtering |
Core mechanics
Mathematical conventions
Storage is decimal unless a binary unit is named: , , , , and . A configuration label written as KB needs its implementation-specific unit checked. Retain full precision until reporting; round required integer resources upward, but round a capacity limit downward. In the lifecycle model, is the fixed live population, is its replacement fraction per day, is in days, and is queries per day. Resident population can exceed . and control retained candidate widths; neither equals a guaranteed expansion count or a distance-evaluation cap. Products of beam width and degree below are explicitly stipulated work proxies, not HNSW complexity identities. Build and query work must be converted to a common cost currency before comparing them economically. For HNSW memory, use the chapter-16 allocation model: four-byte neighbor identifiers, base-layer slots, upper-layer slots, and for . Expected allocated link bytes are . At this is approximately . These are expected slot budgets, not populated degree counts or complete resident-memory measurements; identifiers, level records, allocators, payloads, caches and build scratch space are additional. counts shards, counts replicas per shard, counts key partitions, and counts post-filter survivors. denotes a retrieval score, not a replication factor. For gold set and returned set , when , whereas . They coincide for one gold item. Metadata bounds and extraction examples state which population and metric they use. A multiply-accumulate (MAC) counts as two nominal FLOPs here. Bandwidth and FLOP calculations omit filtering, gathers, heaps, memory hierarchy, network, contention and queueing unless stated. Component estimates do not add up to an end-to-end guarantee. Empirical source results remain reported inputs, not results proved by the arithmetic.
17.1 Static index, dynamic corpus: tombstones and re-indexing
Static assumptions and online insertion
- What changes: skip-list occupancy and HNSW height have distributional models, with characteristic height on the order of under the usual level law. They do not require an immutable corpus. HNSW supports insertion; IVF cells and PQ codebooks instead need their training distribution and drift monitored as the corpus changes.
- Online insertion: search using , select diverse neighbors, and update links. The parameter controls a candidate width, not a fixed number of visited nodes.
- Deletion latency: in the source's example, a request at 10:00 followed only by a midnight rebuild leaves without immediate serving exclusion. A read-time deletion check can close that serving gap without claiming physical erasure.
- Worked proxy: take , fp32, , and . Stipulate expansion-equivalents at tested neighbors each, so one insert is budgeted as distance evaluations. This is a planning proxy, not a bound implied by .
- With , replacing live vectors daily gives insert-proxy evaluations per day. Charging the same proxy to all insertions gives rebuild work evaluations, so daily insert work is of that proxy rebuild. Upper layers, edge pruning, writes and scheduling are omitted.
Structural deletion: costs and connectivity risks
- Structural deletion removes a node and updates the references needed for a usable remaining graph. Logical exclusion, physical byte removal, and preservation of search quality are separate requirements.
- HNSW normally records outgoing adjacency. A reverse-edge index can locate incoming references quickly; without it they can be found by scanning outgoing edges, at potentially work. Reverse storage is an efficiency choice, not a logical prerequisite for deletion.
- A toy budget of incoming base-layer identifiers at each adds , or at . Adding this to the expected forward-slot budget gives approximately rather than . Incoming degree is not capped by the outgoing-slot limit; complete reverse maps need actual edge counts, upper layers and map overhead.
- For a repair scenario with affected in-neighbors and one -evaluation proxy search per repair, work is evaluations per deletion.
- At deletions per day, that scenario costs evaluations, exactly of the stipulated rebuild work. It is not a universal complexity law for supported deletion algorithms.
- Connectivity risk: diverse links can bridge regions. A local repair that misses the necessary replacement can disconnect useful routes or reduce ANN recall without an exception. This motivates verification of the chosen update algorithm; it does not prove that every in-place deletion must fail.
Tombstones and beam inflation
- A dense deleted-identifier bitmap suppresses marked identifiers while a tombstoned vector and its graph links may remain for navigation. Every serving path, replica and relevant cache must enforce the deletion state.
- At identifiers, the bitmap payload is , approximately of the scoped clean index. Bitmap size grows with retained identifiers unless slots are recycled.
- Candidate model: if a pre-exclusion candidate pool of width samples deleted nodes representatively with share , its expected live count is . Search implementations that retain only live results can still traverse deleted nodes; their behavior is not described by simply subtracting dead slots from the final heap.
- Under that candidate-pool model, a planning width is . Preserving an expectation does not guarantee recall, and is not a work cap.
- Churn model: hold the live population fixed, replace vectors per day, append replacements, retain deleted nodes, and do not recycle slots. Then after days,
- With representative deletion, the continuous width proxy is . Stipulate clean work distance evaluations and the linear aging proxy . This is a work scenario, not a measured latency or recall law.
Rebuild economics and hard ceilings
- Model: rebuild work is constant, cleanup is instantaneous at cycle boundaries, and are constant, and build/query evaluations have the same cost. Constant clean-query and daily-insertion costs do not change the minimizing period under these assumptions.
- Integrating the excess query work over a cycle gives
- For , , so this is the unique continuous optimum. If or , this stale-query term supplies no finite economic optimum. Different per-evaluation costs require conversion to a common currency first.
- At , and . At that optimum and .
- At , and . A hundredfold traffic increase shortens this modeled optimum tenfold.
- Continuous work cap: gives and . The boundary work is , not a certified integer operation count or latency percentile.
- Integer-width version: if the rule instead requires , then . With , the cap becomes and . Rounding to would allow width inflation.
- Deployment: an instantaneous-cleanup model can take the minimum of economic, measured-SLO and applicable completion ceilings. Real triggers must leave time for building, validation, propagation and replay of changes since the snapshot. The work cap is not itself a measured or ceiling.
- Legal scope: the source cites GDPR Article 17 and Article 12(3). One calendar month is a response-window provision, not a fixed -day, exception-free physical-erasure clock. The example's days are a stipulated policy window; determine the applicable obligation separately.
- Illustrative binding choices: before other constraints and build lead time, low traffic is limited to days by the continuous work model, or days by the strict integer-width version. High traffic is limited to approximately days by modeled cost. Tombstones alone do not erase vectors, text, replicas or backups.
Operational checks and exceptions
- Rebuild read proxy: evaluations charged one vector read each imply . At a sustained this traffic takes , or approximately of a six-day cycle. Cache reuse can reduce these DRAM reads; random accesses, graph work, writes and contention add costs. This is not a universal build floor or a measured rebuild duration.
- Feasibility: an hourly rebuild schedule cannot complete this particular read proxy serially within one hour. Parallel construction, another index/update design or lower build work may help, but changing requires quality validation.
- Correlated deletion: global can coexist with a visited neighborhood at deletion. Measure deleted nodes encountered, traversal work, live-candidate yield and recall by query cohort; the final returned list should already contain no tombstones.
- Event triggers can supplement a calendar when churn is bursty. Use measured recall/latency and local deletion exposure, not an assumed global fraction alone.
- Tombstone-and-rebuild is one common HNSW pattern. Slot recycling and streaming-merge designs have different correctness, quality and capacity trade-offs. The source cites FreshDiskANN-style maintenance from Singh et al. (2021); the existence of a supported update path does not make arbitrary link inheritance safe.
- IVF-PQ deletion is implementation-dependent: finding an identifier may scan a posting list, while a maintained direct map and swap-delete can support constant-time entry removal. Batch compaction can cost more. Watch coarse-cell imbalance and codebook drift; a few-times-mean cell rule is a heuristic to validate.
- Blue-green capacity: the expected-slot budget is approximately for the live index and for two copies, before scratch space and payloads. Two copies do not fit in decimal GB. A separate builder, additional shards or rolling segments need explicit extra capacity.
- Cutover: replay inserts and deletions since the build snapshot, enforce tombstones on both generations, validate quality and authorization, then switch with a supported atomic mechanism. A pointer swap does not eliminate cache warmup or contention.
- Search dial: is a candidate-width heuristic under the stated churn model. Benchmark the actual search implementation and rebuild before the measured SLO or completion deadline is violated.
- Tight-deadline scenario: scaling the same read proxy from million to million vectors gives , not from rounding the smaller run to one hour. A stipulated -hour physical-removal obligation needs a different supported workflow if this rebuild cannot meet it.
- Removing payload bytes and failing closed on lookup can prevent their return, but deleting a vector while leaving a graph node is not automatically navigation-safe: search may need that representation for distances. Reconnect, bypass, replace or rebuild using an algorithm that preserves the required invariant, and handle replicas, caches, logs and backups under the applicable policy.
- Source software examples: Lucene merge thresholds and hnswlib/FAISS deletion APIs are version- and configuration-specific. Numerical proximity between a reported merge default and the toy tombstone cap does not validate the model or an SLO. Verify current behavior before deploying.
17.2 Sharding, replication, partitioning
Three distinct scaling axes
- Sharding distributes vectors over disjoint shards. Balanced data gives approximately vectors per shard; broad queries scatter to all of them.
- This addresses per-node memory and can parallelize work. If each shard's service capacity stays fixed and every query visits every shard, adding shards does not multiply user QPS. Smaller graphs, cache behavior and parallel execution can change the service point, so flat throughput is an assumption, not a scaling theorem.
- The characteristic-depth ratio at and is . That is approximately an height reduction, not an guarantee for query time.
- For independent, identically distributed branch latencies with CDF , . If each branch exceeds a chosen threshold with probability , the fan-out event probability is , approximately at . Correlated branch delays change this result; a union bound remains available without independence.
- Replication creates serving copies per shard. Balanced routing to unchanged replicas can multiply capacity by and multiplies index storage by that factor. Synchronization, failure domains and service policy determine actual availability.
- Replication does not fix an oversized shard or make an individual search intrinsically faster. Hedging can reduce some tails while consuming extra capacity.
- Key partitioning routes a query to the matching corpus partition and can avoid branches. Its benefit depends on correct keys, data balance and query balance. Missing keys may require broadcast; an incorrect routing key can exclude relevant authorized data.
Hashing, attributes, and hybrids
- A suitable hash gives expected identifier-count balance under its randomness assumptions. It is not skew-free: unequal item weights, hot keys, popular documents and uneven query distributions can still overload nodes.
- Hashing identifiers generally discards tenant locality. If each tenant spans all three shards, even a workload with tenant-keyed queries still needs fan-out unless another routing or filtering structure prunes shards.
- Attribute partitioning can reduce partitions touched, but can worsen data or traffic imbalance. Neither scheme universally minimizes load variance or query cost.
- In the source's staff scenario, one tenant owns of data and generates of queries. A hybrid can route small tenants directly and sub-shard the large tenant with separately provisioned serving copies.
- Budget the two routing paths, migrations, write synchronization and rebalancing when a small tenant becomes large. Measure weighted work and tail latency, not only vector counts.
Worked capacity example
- Corpus: , fp32, HNSW and usable RAM per node.
- Vector payload is . Base-layer slots add ; expected upper-layer slots add approximately .
- The scoped expected index budget is approximately . Steady-state capacity alone gives shards, before non-index overhead and skew.
- Balanced thirds contain or vectors, approximately per shard. If each node must hold old and new copies together, the corresponding capacity-only lower bound is shards. A separate temporary builder is an alternative with its own capacity bill.
- Service scenario: continuously occupied query slots at an mean service time imply shard-QPS by the service-point model. This is not a measured tail-safe capacity guarantee.
- With and , aggregate shard-QPS divided by fan-out gives user QPS if work is balanced. Independent identical branches need CDF probability at least at their allocated deadline for a maximum-branch success rate; allow network and merge time separately.
- With and , nine machines can supply user QPS under the same assumptions, at approximately of index copies. Fan-out remains .
- Three balanced key partitions, one copy each and fan-out , can supply keyed user QPS using approximately . Routing skew, cross-partition requests and other overhead can reduce this.
- Let be the fraction routed to one partition and let all other requests touch all partitions. Then . Under balanced per-node work, the aggregate capacity proxy is .
- For and , gives fan-out and user QPS; gives fan-out and QPS. Without balance, the bottleneck bound is for positive touch probabilities, rather than the aggregate ratio alone.
Operating rules
- Treat as a capacity-only lower bound, not a universal optimal shard count. Add payloads, scratch space, cache, skew, failure and rebuild headroom. Smaller shards can also help recovery, parallelism or hotspots.
- For eight independent identical branches, the CDF probability needed at the branch deadline is , or approximately the th percentile. Merely adding component values or using a rounded-down branch percentile does not establish whole-query .
- Consolidation, key routing or carefully budgeted hedged requests may help tail latency. Each changes capacity and must be tested under load.
- Choose replica count from the failure model, read/write quorum policy, zones, durability and recovery requirements. leaves one copy after one failure; can leave two while one is rebuilding. Neither number alone proves service availability or write safety.
- Shipping a common built segment simplifies replica agreement. Independently maintained replicas can also be correct with suitable ordered logs, consensus or reconciliation; deletion state must reach every serving path.
- Measure keyed share and per-partition traffic before partitioning. A keyed share is a workload heuristic, not a mathematical break-even point.
- Apply mandatory filters correctly within each shard and before an identifier is exposed. Merge candidates with compatible score semantics; differently calibrated compressed scores may require common rescoring.
- Sharding need not lose exact top-: with a common metric and tie policy, consistent snapshot, all branches complete and each shard returning its exact local top-, their union contains the exact global top-. ANN misses, inappropriate local truncation, filters or timeouts can break that guarantee. A smaller graph alone does not prove higher ANN recall.
17.3 Choosing a vector database: no winner on all axes
Separate index choice from database choice
- Index choice selects an algorithm and representation for a measured recall, work, latency and memory point.
- Database choice adds durability, filters, updates, deletion, tenancy, network placement and operational ownership.
- Some public benchmarks isolate static index behavior; others include more of the system. Inspect the actual benchmark rather than assuming all measure only the index.
- Matching and is not enough to match recall or work. Build order, randomization, pruning rules, precision, normalization, filters, stopping rules, data distribution and load all matter.
- SIMD, layout and runtime can change performance substantially. A reported –-fold implementation difference is not a universal upper bound, and algorithm labels alone do not establish dominance.
Attribute the entire latency budget
- Target: end-to-end retrieval before generation prefill. The following components are stipulated serial point estimates, not jointly measured percentiles.
- Take embedding , ANN at vectors, and a top- cross-encoder using million parameters and processed tokens per passage.
- The forward-pass proxy is . At a stipulated sustained it gives . Attention effects, actual batching, hardware utilization and serving overhead require measurement.
- With vacuum light speed and refractive index , propagation speed is approximately . A one-way path gives a round-trip propagation time of approximately ; multiplying distance by gives approximately . Actual route, equipment and queueing determine measured RTT.
- Use a separately stipulated same-region hop or cross-region hop. The unrounded serial proxies are and . The second proxy exceeds the target, but neither sum establishes a measured .
- ANN is approximately of the same-region proxy. Doubling its speed saves , or of the target. Moving from the to the hop adds , or of that target; a hop alone does not exceed .
- Tail-budget discipline: choose component bounds with and . Then by a union bound, without an independence assumption. Include queueing, retries, network and merge work. Summing several component values does not supply this guarantee.
Trade-offs and Pareto comparisons
- Durability can add logging and synchronization; group commit and storage design change the latency trade-off.
- Horizontal scaling adds distributed routing and coordination. It does not inherently prevent exact global top-; the local-exact merge conditions above are sufficient.
- GPU batching can trade throughput against waiting time. Low-latency behavior depends on the implementation and offered load.
- Managed services shift operational ownership, while placement, network and parameter visibility remain product-specific.
- Libraries, embedded stores, SQL extensions, search engines, distributed stores and fully managed services are useful architectural categories, not performance certificates.
- A Pareto-nondominated configuration is one for which no compared configuration is at least as good on every chosen objective and strictly better on one. Class labels and qualitative ratings do not by themselves establish a Pareto frontier.
- A static, unfiltered benchmark is insufficient evidence for dynamic filtered tenancy. Equally, an existing relational database is not automatically the wrong choice: measure memory headroom, transaction interference and the actual query planner.
Worked product example
- Workload: million chunks, , tenants, , a retrieval target and daily replacement.
- In-process scenario: removing the network term gives a serial proxy of . Expected HNSW vector-plus-slot bytes at are approximately , or total, before payloads and overhead.
- Equal-sized tenants would average chunks, a corpus share . This average does not describe a skewed tenant distribution or the pass probability among highly ranked candidates.
- Under an IID candidate-pass model, global top- gives and . The modeled empty rate is approximately ; semantic correlation can change it.
- A different-region service has a serial proxy with the stipulated hop. Index tuning cannot change physical distance, but the actual service must be benchmarked before declaring an SLO miss.
- A same-VPC SQL extension with a stipulated hop gives using the same ANN estimate. A B-tree-assisted selective path has its own search cost and need not retain the global ANN term. Co-resident payloads and operational familiarity do not remove index memory or OLTP interference.
- Truncating a suitable Matryoshka embedding to halves vector bytes, not graph bytes. The scoped expected budget becomes approximately and . Only embeddings trained for this behavior should be treated as candidates for such truncation, and quality still needs evaluation.
- Daily insert proxy: evaluations. Daily clean-query proxy: evaluations.
- Their ratio is approximately . This compares stipulated distance-work units, not measured CPU utilization, write latency or the fraction of total operating cost. Deletes, pruning, persistence and rebuild work are additional.
Selection rules
- Keep an existing system when it meets measured workload and operational constraints, not merely because it is familiar.
- With fp32 and the expected slot budget, decimal GB holds at most vectors by this capacity arithmetic alone; same-node old-plus-new copies halve that to . Actual safe limits are lower after payloads, random level variation, scratch space and headroom. The rough -million-vector boundary does not mean million fits.
- Co-locate services when appropriate; data-residency obligations and failure-domain design may constrain placement.
- Check distance function, precision, dimension limits, filter semantics and update/delete behavior before comparing speed.
- Benchmark the actual corpus, tenant skew, filters, concurrency and background writes/rebuilds. A -query exact-ground-truth comparison is a useful sample, not a universal recall or tail-latency certification. Use the authorized relevant universe and define ties and precision.
- Prefer managed operations when the team cannot safely own a stateful service; assess portability and migration paths separately. Choose a configuration against constraints before treating vendor rankings as answers.
17.4 Metadata: descriptive, structural, generated
Provenance determines failure
- Source vignette: a 2025 migration re-stamped of the corpus. A predicate on after the migration could admit a 2019 template as recently ingested. The source's eleven-month description belongs to that vignette, not to today's date. Ingestion date is not authorship or effective date.
- Descriptive fields come from a system of record: owner, path, MIME type, ACL and ingest timestamp. They are authoritative for their defined meaning when synchronization and validation are correct—not automatically complete, current or error-free.
- A correct ingest timestamp can be the wrong recency proxy. Marginal LLM-generation cost may be zero, but ingestion, storage, synchronization and auditing still cost work.
- Structural fields such as headings, pages, parent identifiers and reading order come from parsers or layout models. Both missing and wrong values occur; OCR without layout can leave a systematically undercovered slice.
- Generated fields such as type, entities, summary and context prefix come from a model. A wrong hard label can exclude relevant material and admit irrelevant material. Models can also abstain, fail or produce missing values; coverage is not automatically .
- One call per chunk is the worked cost model, not a required implementation. Batching, shared document context and caching change costs; model, prompt and chunking changes require versioning and possible backfills.
Recall bounds require query-conditioned coverage
- For a query , let be its relevant authorized gold set and the set admitted by the metadata predicate. Any result set drawn only from satisfies
- This is a set-recall bound. For multi-gold queries, can still equal when only one of several relevant chunks survives. Do not substitute query hit rate for the fraction of gold chunks admitted.
- Special equality model: assume one gold item per answerable query, a truly applicable single-value equality constraint, missing values rejected, and incorrect values unable to match that equality. Define and . Then and .
- Global chunk coverage and accuracy need not equal and . Relevance, class, tenant, format and query weighting can be correlated with errors. A corpus with field coverage can have all queried gold items inside that covered slice or all outside it.
- Two equality gates with query-conditioned admission probabilities and multiply only under independence on the relevant population. Generally their joint admission lies between and . These are admission bounds, not a lower bound on retrieval recall.
- Range predicates, null-tolerant rules and multi-valued fields need their own gate analysis; a wrong value can sometimes still pass.
- A reranker cannot recover an item already excluded from its candidate universe. A soft label avoids that particular hard exclusion but can still push a relevant item out of the final top- or change ANN retrieval.
- A globally -accurate classifier therefore does not impose exactly an loss on every filtered query. Measure query-conditioned confusion, coverage and end-to-end retrieval. Keep authorization tied to its trusted source regardless of its relevance effect.
Worked metadata example
- Corpus: documents and chunks at tokens each give tokens.
- Worked assumptions: of chunks, not merely documents, have correctly parsed headings; the other have null headings. Take heading values uniformly distributed among populated chunks. Gold-item coverage matches these proportions. Without these assumptions, the following counts and gates need not hold.
- A generated document-type audit of IID chunks with correct gives and plug-in standard error . The nominal Wald half-width is approximately percentage points at ; the Wilson interval with is approximately . Correlated chunks from the same documents require an appropriate clustered design.
- Strict heading equality admits , or chunks. In the single-gold representative-coverage model its admission probability is , an upper bound on hit rate rather than a measured recall.
- Admitting the chosen heading or a null admits , or chunks. It removes the missing-heading exclusion in this idealized model, raising the admission probability to , not guaranteeing retrieval recall . The search space is times larger.
- If correct heading coverage rises to , the strict filter admits , or chunks, with gold admission under the same assumptions.
- If a hard document-type gate has gold admission and is independent of the original heading gate, joint admission is and of gold items are excluded. Without that independence, the joint admission is bounded by ; a global classifier accuracy alone supplies neither result.
- Tagging chunks at input and output tokens gives input and output tokens. At and per million respectively, the bill is .
- Embedding source tokens at per million costs ; the stipulated tagging bill is times as large.
- The cited contextual-retrieval writeup reports per million document tokens, or at this scale. The numerical ratio is . Different prompts, rates, models, token denominators and caching prevent that ratio alone from proving why the bills differ.
- The same writeup reports a relative reduction in top- retrieval failure for its contextual embedding plus contextual BM25 setup. This is a scoped reported result, not a -percentage-point recall gain or a guarantee for this corpus.
Operating rules
- Store ingestion, authorship and effective dates separately when the application needs them. Correct source semantics matter as much as population accuracy.
- Audit field coverage, class confusion, freshness and query-conditioned gold admission by tenant, format and query cohort before using a hard filter.
- Here a -item IID audit has a nominal Wald half-width near points. Increasing to is not a compliance certificate. Even zero observed errors in IID trials leaves a one-sided binomial error-rate upper bound of .
- Compare parser/layout improvements with model generation on the actual formats; do not assume either eliminates all errors.
- Source tenant and ACL fields from the permission system and verify synchronization. A hypothetical error over chunks is mislabeled chunks; classifier accuracy is not an authorization design.
- Version generated metadata by model, prompt hash, schema and chunking policy. Make backfills and query behavior explicit while versions coexist.
17.5 Pre-filtering, post-filtering, and the over-filtering risk
Selectivity and placement
- Corpus selectivity is . Its cardinality guides planners, but it need not equal the pass probability among the highest-scoring ANN candidates.
- Correctness first: enforce tenant, user and classification constraints on every path before exposing nonmatching identifiers or payloads. Internal graph navigation and safe result eligibility are different mechanisms.
- Recency and popularity are often preferences, but explicit date bounds and validity rules can be mandatory user constraints. Do not silently soften them or confuse them with access control.
Post-filtering arithmetic
- Post-filtering retrieves global candidates and removes predicate failures. Its success depends on the predicate's relationship to semantic rank, not only on corpus selectivity.
- IID model: if each of those candidates passes independently with known probability , then , and . Actual ANN rankings need not satisfy either assumption.
- Exact model requirement for at least survivors with probability is
- This is a probability conditional on known model parameters, not a confidence interval for an unknown pass rate. Enough surviving candidates also does not by itself prove semantic recall.
- For small , a Poisson approximation with mean gives at approximately . Thus is a small- approximation, not a certified integer bound.
- The source's normal shortcut has boundary . It is a rough, uncorrected tail approximation at a small expected count, not the exact condition.
- Exact binomial evaluation gives minimum at , and at , for and target . Each immediately smaller integer fails that model target.
- With a stipulated output-candidate budget , define by . Then , or approximately . The old boundary was a normal-approximation heuristic, not a phase transition.
- Candidate count and search effort are distinct. HNSW APIs commonly require or arrange , but the width is not a distance-evaluation bound. Larger candidate budgets can rescue the survivor probability at additional cost; they are not mathematically impossible below .
- Alternative model: uniform sampling without replacement from a fixed corpus with exactly matching items gives and variance . This is not the binomial model or a guarantee about semantic ANN candidates.
Exact pre-filtering arithmetic
- Resolve the predicate using a suitable index or bitmap, then score all admitted vectors. Exhaustive scoring can recover the exact nearest neighbors within that admitted set under a specified metric, precision and tie policy; it does not guarantee semantic relevance or recover a wrongly excluded gold item.
- With fp32 payload, a one-pass read proxy is bytes. A allocation at sustained moves .
- For , , so the payload-only capacity bound is vectors for one query.
- With ten simultaneous queries receiving equal bandwidth shares, the corresponding bound is vectors per query.
- At , this means for the stated payload-read bound. Rounding that upward to would admit counts that exceed it.
- These are necessary read-budget checks under the stated streaming/fair-share model, not sufficient latency guarantees. Predicate evaluation, scattered gathers, scoring, top- selection and contention also need time.
The filter-aware middle
- Under the stated payload and IID survivor models, is a useful planning gap between two particular budget checks. It is not a universal optimality interval for filtered ANN.
- Naively refusing to traverse every nonmatching HNSW node restricts the search to an induced subgraph. That subgraph can be disconnected even when the original graph had useful routes.
- Filter-aware designs may use category-aware links, traversal through ineligible nodes, or multi-hop expansion to improve reachability while checking result eligibility separately.
- The source cites Filtered-DiskANN from Gollapudi et al. (2023), ACORN from Patel et al. (2024), and Qdrant payload-aware links as different construction/traversal patterns. Their precise algorithms and guarantees have conditions; do not infer navigability for every arbitrary predicate.
- Known-label edge construction shifts work to ingestion and maintenance. Multi-hop expansion adds query work and remains implementation- and predicate-dependent. Benchmark recall, candidate yield and tail latency for actual filter combinations.
Over-filtering and worked example
- Over-filtering applies a syntactically valid predicate to the wrong relevant universe: for example, may exclude a still-valid 2021 policy.
- Exact-neighbor recall evaluated only inside the admitted set cannot detect that semantic exclusion. Compare against labeled authorized relevant evidence, as well as exact search within the filtered set. Never drop ACL or tenant requirements to construct an evaluation baseline.
- Tenant scenario: and equal-sized tenants give chunks each. Assume the year clause passes within this tenant, leaving chunks and ; a global year prevalence alone would not establish that conditional count.
- IID post-filter model with : mean survivors are and . The corresponding empty rate is approximately .
- For top- and probability at least , exact binomial evaluation requires minimum , or of the corpus and approximately times the -candidate budget. Under the different uniform-without-replacement model with exactly matches, the minimum is . Neither count is a guarantee for ranked ANN output.
- Exact dot-product work for vectors is MACs, or nominal FLOPs, and of vector reads.
- At and an isolated share, compute and payload reads each take in their separate proxies; adding them without overlap gives before omitted overhead. At a ten-way equal bandwidth share, the read term alone becomes . Do not mix isolated and concurrent bandwidth assumptions.
- An HNSW scenario with expansion-equivalents and neighbor tests each has a -distance work proxy. The parameter does not impose that upper bound. The exact scan's smaller stipulated work motivates a benchmark, not a universal latency comparison.
- At , exact reads of vectors are and take at isolated . The IID post-filter requirement is , approximately times .
- A configuration label of KB must have its version-specific unit checked. If it means , it budgets vectors, approximately above . If it means , it budgets . Numerical proximity to a planner default does not validate the latency model.
- For the cited -million-vector IVF-PQ configuration, mean lists out of with code bytes per item give of mean code traffic. The full-vector read is times as large. These are differently scoped traffic estimates, not matched-quality latency or compression guarantees.
- A -vector tenant has of fp32 payload and a isolated read proxy at . This exceeds the scan allocation, not necessarily the entire retrieval target.
- Tenant-aware routing can retain authorization while using ANN inside the eligible subset. Five thousand tenants do not require five thousand physical graphs: shared filtered indexes, logical partitions and hybrid routing are alternatives with their own costs.
- The source's FunnelRAG comparison uses approximately -token clusters, document-scale dense retrieval and approximately -token passage ranking. Its reported roughly speed improvement is workload-specific; without a defined time-versus-rate metric it should not be restated as a latency reduction.
17.6 Self-querying: LLM-extracted filter constraints
Split semantic text from predicates
- Self-querying proposes a semantic residual and Boolean predicate from the original request .
- A similarity score can encode associations with dates or categories, but does not itself enforce exact order, membership or conjunction. Cosine similarity is not a chronological comparator.
- The eligible search set is . A correct constraint can focus retrieval; an incorrect one can remove the answer.
- Keep the original request. If extraction strips date or type words out of , subsequently dropping only the predicate does not restore the original-query retrieval baseline.
- Dates written into embedded text can help topical retrieval, but are not substitutes for an enforced ordered condition when the user explicitly requires one.
Extractor inputs and validation
- Use a separately prompted, evaluated extractor when model-based predicate generation is appropriate. A small instruction-tuned model is a candidate, not an automatic accuracy guarantee.
- Inputs include an allowlisted field schema with types, authorized values or aliases where useful, the original request, and a system-supplied reference date for relative time.
- Specify timezone, fiscal-versus-calendar periods and inclusive/exclusive endpoints. A query mentioning last quarter cannot be resolved safely from the model's remembered date.
- A correct grammar and decoder can restrict a completed output to valid syntax. Truncation, transport failure and schema mismatch still require validation and a defined error path.
- Syntax is not intent: may parse while the catalog uses . Conversely, an absent catalog value can represent a legitimate zero-match request or stale catalog, not necessarily a wrong extraction.
- Validate fields, operators, types, bounds, catalog/alias evidence and intent on labeled examples. Do not silently replace a hard user constraint just to avoid an empty result.
- The source references LangChain's self-query pattern, text-to-SQL semantic parsing, Spider from Yu et al. (2018), and grammar-guided generation from Willard and Louf (2023). These identify implementation/research patterns rather than proving correctness of this deployment.
Recall arithmetic and fallback
- Partition extraction outcomes into correct, wrong-and-detectable, and wrong-but-undetected, with probabilities , and , so . These must be estimated on the intended workload.
- For a fixed retrieval metric such as single-gold , the general law is
- In a deliberately pessimistic toy model, correct extraction gives and every executed wrong predicate gives zero. Blind execution then has . Wrong predicates need not give zero in reality.
- If the ordinary authorized baseline is and , this toy model beats that baseline only when . For and , the boundary is , approximately , not a universal extraction requirement.
- A validated fallback gives , where and are the conditional recalls of the actual fallback and undetected-error paths. The overall baseline need not equal on the harder subset that triggers validation.
- Only if fallback restores the original-query authorized search with conditional score , and undetected errors still have , does this simplify to .
- Validation can route detectable failures to a safer path; it does not improve extraction intelligence or guarantee baseline recovery. Real but wrong values and legitimate empty constraints require labeled intent tests and appropriate clarification.
Authorization composition
- Compile authorization from trusted session state, independently of model text. With typed predicate trees, enforce and forbid model writes to security fields.
- The session predicate carries tenant and ACL constraints. Do not ask the extractor to generate it or trust a model-produced substitute. Scope schemas, value catalogs and caches to prevent cross-tenant disclosure.
- A trusted AST compiler and execution layer must enforce the conjunction on normal, fallback, cache, fetch, rescore and result-return paths. Appending a string is not a proof against parsing or Boolean-precedence bugs.
- Ordinary unresolved constraints are not all preferences. Clarify explicit requirements, recognize legitimate zero matches, or use an explicit logged broadening fallback when product policy permits. Restore dropped constraint terms to the semantic query and retain all authorization.
- If authorization cannot be established or enforced, fail closed, return no unauthorized data and raise an operational error.
- Retrieved instructions must not modify trusted authorization. Keeping it outside the model is necessary but does not by itself certify the implementation or eliminate every side channel.
Worked self-querying example
- Corpus scenario: chunks, , five years, with document type, department, year and quarter. The source gives types and departments; these counts do not establish statistical independence or uniform frequencies.
- Assume board decks are , giving chunks, and are uniformly distributed over quarters. One quarter then has chunks and . Actual catalog counts should replace that uniformity assumption.
- Reading all fp32 vectors requires . At an isolated sustained , the payload-read proxy is , not complete exact-search latency.
- Treat the labeled queries as answerable and equally weighted in the toy calculation. Fractions , and correspond to , and cases. These are finite-sample estimates, not known population probabilities.
- With the toy branch scores above, blind expected recall is . Restored-query fallback with conditional score gives , a gain of , or percentage points. This is a modeled score, not an independently measured evaluation result.
- The remaining gap to is . Different branch recalls or correlated query difficulty change this decomposition.
- A -parameter extractor in bf16 has of weight payload, excluding cache, activations and runtime.
- Conditional unbatched read model: each sequential decode pass streams the entire weight payload from HBM at , with no effective weight sharing or reuse. Its read time is .
- A -token prefill has nominal work and a compute proxy of approximately at .
- Token accounting: if the first generated token comes from prefill, output tokens require subsequent decode passes. The read proxy is approximately and the serial prefill-plus-read proxy is approximately . A conservative convention charging separate decode passes instead gives approximately .
- These are conditional hardware models, not universal floors or measured extraction latency. Batch sharing, effective bandwidth, caching, KV attention, compute, network, queues and grammar handling change the result. The earlier graph-walk figure is itself a proxy, so dividing by it does not establish a real -, - or -fold system speed difference.
- Likewise, dividing the graph proxy by the payload-read proxy gives approximately , not a measured exact-versus-ANN speedup. Search preparation, filtering and selection are omitted from the latter.
- Include actual values when their size and sensitivity permit. The source's roughly -value threshold is a prompt-budget heuristic. For larger vocabularies, retrieve candidate values or use approved aliases with validation and clarification; blindly snapping to the nearest embedded value can turn a detectable bad alias into a plausible wrong constraint.
- Cache with schema, model/prompt and catalog versions, original-query semantics, tenant/authorization scope, reference date, timezone and calendar convention as needed. Relative-time entries must resolve the correct interval at period boundaries.
- Monitor zero matches, short results, per-field cardinality and extraction/fallback outcomes. A successful empty call can mean a legitimate empty answer, over-filtering, stale metadata or an extraction error; the response policy must distinguish them.
Diagrams
Figure 17.1
Diagram description and source
flowchart LR
q((q)) --> a1((a1))
a1 --> a2((a2))
a1 --> a4((a4))
a1 -. local repair .-> a3((local node))
a2 --> a4
a3 -. local repair .-> a4
a4 -. lost edge .-> v((deleted bridge v))
v -. lost edge .-> r1((right cluster))
r1 --> r2((right node))
r1 --> r3((right node))
r2 --> gold((true nearest))
r3 --> gold
a4 --- halt["greedy halts at a4, no neighbor is closer to q"]
Panel (b), continuous work proxy between instantaneous cleanups:
Figure : (a) The schematic illustrates a possible failure of local bridge repair, not a proof that every supported deletion method fails. If removing leaves no route to the right cluster, search from the left cannot find that region. (b) The linear work scenario resets at each instantaneous cleanup; actual work need not follow that curve. The continuous cap gives days, whereas a strict integer-width cap gives days. The economic optimum must be combined with measured latency, completion obligations and real build lead time. Tombstoning excludes results but does not erase retained navigation data.
Figure 17.2
Diagram description and source
flowchart TB
subgraph Shard["Sharding: disjoint corpus slices"]
sq((query)) --> s1["shard one: one third of corpus"]
sq --> s2["shard two: one third of corpus"]
sq --> s3["shard three: one third of corpus"]
sb["Broad query touches all three; capacity depends on each node's service rate"]
end
subgraph Replicate["Replication: additional serving copies"]
rq((query)) --> router["choose a replica"]
router --> r1["copy one"]
router -. alternative .-> r2["copy two"]
router -. alternative .-> r3["copy three"]
rb["Three copies cost three index payloads; ideal balanced capacity can triple"]
end
subgraph Partition["Key partitioning: skip irrelevant partitions"]
pq((keyed query)) --> p1["matching partition"]
p2["other partition: skipped"]
p3["other partition: skipped"]
pb["One branch only when routing is valid; load balance remains necessary"]
end
Figure : Sharding reduces per-node storage but broad queries still fan out. Replication adds serving copies and synchronization/storage cost. Key routing can skip partitions. The example's threefold throughput ratios assume unchanged per-node service rates, balanced work and no additional bottleneck; they are not universal scaling or availability guarantees.
Figure 17.3
Panel (a):
| Placement | Embed | Network | ANN search | Rerank | Serial proxy total | End-to-end target |
|---|---|---|---|---|---|---|
| Same region | ||||||
| Cross-region |
Panel (b):
| Architectural class | recall/QPS | filtered search | txns & joins | horizontal scale | low ops burden | cost & portability |
|---|---|---|---|---|---|---|
| Library | Implementation-dependent | Often application-managed | Application-managed | Application-managed | Team owns integration | Local control; integration cost |
| Embedded | Implementation-dependent | Product-dependent | Product-dependent | Often externally coordinated | Integrated, but still operated | Deployment-dependent |
| SQL extension | Index/planner-dependent | Relational predicates available | Relational integration | Database-architecture-dependent | Existing skills may help | License/deployment-dependent |
| Search engine | Index/workload-dependent | Search-filter integration | Product-dependent | Distribution often built in | Stateful service to operate | Product/deployment-dependent |
| Distributed store | Index/routing-dependent | Product-dependent | Product-dependent | Distribution is a core concern | Stateful service to operate | Product/deployment-dependent |
| Fully managed | Service/configuration-dependent | Service-dependent | Service-dependent | Service-dependent | Provider owns much infrastructure | Pricing, egress and portability vary |
Figure : (a) Using unrounded work proxies, ANN contributes to the same-region serial sum. Replacing a hop with adds and gives a proxy. The hop alone does not exceed , and component sums are not measured end-to-end . (b) The matrix lists evaluation questions and common integration tendencies, not verified vendor ratings or proof of a Pareto frontier. Benchmark a specific configuration, workload and objective set.
Table 17.1
Table : Metadata provenance helps identify likely failure modes and maintenance costs, but does not automatically certify coverage, accuracy or safe hard-filter use. Audit semantics, freshness, authorization and query-conditioned gold admission.
| Property | Descriptive | Structural | Generated |
|---|---|---|---|
| Origin | system of record | parser / layout model | model run at index time |
| Fields | owner, path, acl, ingested_at | section_heading, page, parent_id | doc_type, entities, summary, context prefix |
| Marginal cost | No LLM-generation charge; synchronization/audits still cost work | Parse/layout and validation work | Model generation, possible caching/batching and backfills |
| Coverage | Measure missing/stale source fields | Measure by format and cohort | Measure abstentions, failures and missing values |
| Accuracy | Validate semantics and synchronization | Validate values, not only presence | Measure class confusion and query-conditioned errors |
| Fails toward | Wrong proxy, stale permissions or other data errors | Missing and wrong structure | Missing or wrong labels and ranking changes |
| Safe as | Trusted authorization only when enforced; other gates need valid semantics | Hard gate only with justified intent and measured exclusion | Often a soft signal; hard constraints require validated semantics and uncertainty handling |
Figure 17.4
Diagram description and source
flowchart TB
sor["system of record"] --> parser["parser and layout"]
parser --> chunker["chunker"]
chunker --> tagger["model tagger"]
tagger --> store["vectors and versioned fields"]
sor --> desc["descriptive: meaning and synchronization must be validated"]
parser -.-> struct["structural: audit missing and wrong values by format"]
tagger -.-> gen["generated: audit coverage, class confusion and freshness"]
store --> hard["hard predicate: excluded evidence cannot reach the reranker"]
store --> soft["soft feature: can still change retrieval and final rank"]
hard --> gate["measure admission of authorized relevant gold items"]
gate --> bound["equality-gate product needs query-conditioned probabilities"]
Figure : Provenance identifies how to audit a field; it does not make system-of-record or generated fields automatically complete. In the single-gold equality model, hit rate is bounded by gold admission . The worked and gates yield joint admission only if independent on that gold population; otherwise the joint admission lies in . Soft metadata avoids direct Boolean exclusion but can still reduce top- recall.
Figure 17.5
Panel (a):
| Selectivity | Matching count when | Strategy |
|---|---|---|
| Up to | Exact scan passes only the stated ten-way payload-read budget check; measure remaining costs | |
| Above and below approximately | Compare filter-aware ANN or another supported plan; the two budget models leave a planning gap | |
| , | At least for integer matching counts | Post-filtering can meet the IID survivor target with ; ranked survival and recall still need validation |
Panel (b):
Diagram description and source
flowchart LR
entry((entry)) --> pass1((eligible node))
pass1 -. traversable intermediary .-> mask((ineligible node))
mask -. original graph edge .-> gold((eligible gold))
pass1 == "two-hop exploration through the intermediary" ==> gold
pass1 --> stall["Strict masking blocks that route"]
Figure : (a) These are model-specific budget checks, not a universal fastest-strategy partition. The lower count uses a payload-read allocation shared equally by ten queries at . The upper boundary solves the exact IID binomial condition for ; it says nothing automatic about ranked-candidate pass rates or semantic recall. (b) The original path from the eligible node through one ineligible intermediary to the gold item has two edges. Strict masking loses it; a supported two-hop traversal may explore it while still excluding the intermediary from results. This schematic does not prove connectivity for arbitrary predicates.
Figure 17.6
Diagram description and source
flowchart TB
q["user query: pricing decisions in last quarter's board deck"]
q --> original["retain original request"]
q --> ext["dedicated schema-constrained extractor"]
inputs["authorized schema/catalog, reference date, timezone and calendar"] --> ext
ext --> sem["semantic residual: pricing decisions"]
ext --> cand["candidate type and resolved date interval"]
cand --> val["validate typed predicate, aliases, values and intent"]
val -->|accepted| fext["ordinary extracted constraint"]
val -->|unresolved| review["distinguish bad extraction, stale catalog and legitimate empty request"]
review --> clarify["clarify or return an honest zero-match response"]
review -->|explicitly permitted broadening| fallback["restore original constraint terms; log relaxation"]
original --> fallback
trusted["trusted session authorization, never model-generated"] --> auth["compile mandatory authorization on every path"]
fext --> auth
fallback --> auth
sem --> search["eligible-set search with a supported plan"]
fallback --> search
auth --> search
search --> topk["authorize fetch and result return"]
Figure : Syntax and catalog validation do not establish user intent. An absent value is not automatically an error to erase; it may be a valid empty request. A permitted fallback restores the original query terms and measures its own conditional recall, rather than assuming recovery of global . Trusted authorization is compiled and enforced outside model control on normal, fallback and result-return paths. An unenforceable permission condition fails closed.
Whiteboard pack
What to draw
- Draw a graph with a bridge and show a possible local-repair failure, not a theorem that every deletion fails.
- Distinguish immediate result exclusion, physical removal and search navigability.
- Draw the replacement model and .
- Label the work proxy and the continuous optimum .
- Show that build lead time, measured SLOs and completion obligations can require an earlier trigger.
- Separate shard count , replica count and routed partitions .
- Write balanced-work and independent-tail assumptions beside any throughput or maximum-branch formula.
- Draw serial proxy bars: embedding , network or , ANN , rerank . Do not label the sums as measured .
- Define gold admission before writing the single-gold equality bound .
- Mark the payload-only count and the IID post-filter root as model-specific checks, not universal strategy boundaries.
- Draw a two-edge route through one ineligible node; distinguish traversal eligibility from result eligibility.
- Split the user request into semantic text and a proposed predicate, while retaining the original request.
- Give the extractor an authorized schema/catalog and an explicit temporal reference.
- Branch to clarification, a legitimate empty response or a permitted restored-query fallback.
- Compile and enforce tenant/ACL conditions independently on every execution and return path.
Spoken script
Start with lifecycle guarantees: serving exclusion, byte removal and search quality are separate. Tombstones can preserve navigation while a clean generation is built, but every copy and read path must honor deletion state. Optimize comparable work costs, then leave time for the measured SLO and applicable completion obligation. Separate capacity sharding, serving replication and key routing, and state balance and tail assumptions. Choose the database around real operations and joint latency, not an index-only ranking. Audit metadata against relevant authorized gold items; global coverage and accuracy are not automatic query-recall bounds. Compare filtering plans using measured selectivity and ranked survival. Validate model constraints without silently changing intent, restore query terms on any permitted fallback, and keep authorization outside model control.
Interview traps
1. Why not delete an HNSW node and repair its neighbors in place?
An outgoing adjacency list does not directly enumerate incoming references. A reverse map can make that lookup efficient; scanning all outgoing edges is another, potentially expensive, method. The chapter's -neighbor, -evaluation repair scenario costs evaluations per deletion and of its stipulated rebuild work per day. Those are scenario costs, not a universal deletion lower bound. A poor bridge repair can lose routes, so use a supported update method and verify search quality, serving exclusion and physical-removal obligations separately.
2. Do sharding, replication, and partitioning all scale queries the same way?
No. Sharding distributes storage but broad queries may still touch every shard. Replication adds serving copies and storage, with capacity and availability depending on routing and failure policy. Key partitioning can reduce fan-out when the key is correct and work is balanced. Smaller graphs can change node capacity, so flat QPS under sharding and linear QPS under replication are assumptions to test, not universal laws.
3. Which vector database is fastest?
Measure the relevant workload. The worked serial proxies give ANN , reranking and a same-region total of . Replacing the hop with adds ; these sums do not prove end-to-end . Compare durability, filters, locality, precision, update/delete behavior, tenancy and operating burden, then benchmark specific implementations at matched quality and load.
4. When should filtering happen before, during, or after ANN search?
The chapter's -vector exact-scan count is a payload-only budget check at ten-way equal bandwidth sharing, not proof that exact search always wins. Its upper post-filter root solves the IID , top-, probability- survivor model; ranked candidates may have a different pass rate. Benchmark supported filtered ANN between or outside those checks. Strictly masking traversal can disconnect paths, and permission enforcement remains mandatory before exposing results regardless of the chosen plan.
5. Should a self-querying extractor fail open or fail closed?
Authorization fails closed whenever it cannot be enforced. An ordinary unresolved constraint needs a different decision: a missing catalog value may be a legitimate empty request, and an explicit date or type requirement must not be silently discarded. Clarify, report zero matches honestly, or use a permitted logged broadening fallback that restores the original query terms and retains trusted authorization. Its conditional recall must be measured; it is not automatically the global baseline .
Key numbers
| Area | Number or formula | Meaning |
|---|---|---|
| HNSW corpus | , fp32 | Fixed live population in the no-recycling replacement scenario |
| HNSW graph | , | Allocated outgoing slots; incoming degree and visited work are not capped by these values |
| HNSW beams | , | Candidate widths, not guaranteed expansion counts |
| Resident index | Approximately | Vectors plus expected forward-link slots; overhead and payloads excluded |
| One insert | proxy evaluations | Stipulates expansion-equivalents; not an identity for |
| Delete timing example | 10:00 request, to midnight | Source timing vignette; read-time exclusion and physical erasure are different guarantees |
| Daily churn | , replacements per day | Holds live constant while deleted resident nodes accumulate |
| Daily insert work | proxy evaluations per day | Exactly of the stipulated rebuild work |
| Full build | proxy evaluations | Assumes the same insertion proxy for every vector |
| Reverse edges | , at | Toy incoming base-layer identifiers; complete reverse storage needs actual degrees and overhead |
| Graph bytes | Approximately to | Expected forward slots plus the toy reverse-base budget |
| One deletion-repair scenario | proxy evaluations | A repair scenario, not a universal deletion lower bound |
| Daily delete repair | proxy evaluations | Exactly of the stipulated full build |
| Tombstone bitmap | , approximately | Fraction of the scoped clean index; logical exclusion does not remove its bytes |
| Tombstone relation | Fixed live population, appended replacements, deleted nodes retained, no slot recycling | |
| Beam inflation | Preserves expected live pool width only under representative deletion; not recall or work guarantees | |
| Clean layer- work | Explicit work proxy, not an bound | |
| Continuous work cap | Continuous cap , | A work-growth boundary, not a measured latency ceiling |
| Daily rebuild objective | Comparable work currency, constant rates and instantaneous cleanup | |
| Cost optimum | Unique continuous minimum for positive | |
| Low traffic | , , | Before SLO, work, capacity and completion limits |
| Low-traffic square root | Approximately , not an equality from a rounded radicand | |
| Low-traffic rot | , | At the unrounded low-traffic continuous optimum |
| High traffic | , | under the same model |
| High-traffic square root | Hundredfold traffic shortens the continuous optimum tenfold | |
| Work-growth limits | Continuous ; strict integer width | The second uses ; neither is a measured SLO without validation |
| Completion-policy example | stipulated policy | Not equivalent to one calendar month or a universal physical-erasure deadline; include completion lead time |
| Rebuild I/O | charged at | One full vector read per proxy evaluation; cache reuse and other work change real traffic |
| Rebuild time | Read proxy; approximately of a six-day cycle, not a measured build | |
| Local deletion skew | Global , local is possible | Inspect visited/pre-exclusion nodes; final results must already exclude deleted identifiers |
| Lucene comparison | Reported merge threshold versus toy cap | Version/configuration-dependent; numerical similarity does not validate a latency model |
| Tight legal case | million vectors, read proxy, stipulated completion window | Needs another supported workflow if the rebuild cannot complete in time |
| Blue-green memory | Approximately live and for two copies | Excludes scratch/payloads; two copies do not fit in decimal GB |
| HNSW traversal sharding | Characteristic-height ratio, not a query-time scaling theorem | |
| Tail fan-out | Requires independent branches each slow with probability | |
| Hundred-way tail | Approximately at | Correlated branch delays require a different joint analysis |
| Three-way | Required branch CDF at its allocated deadline under independent identical branches; merge/network budget additional | |
| Eight-way | Approximately the th branch percentile, not rounded-down as a guarantee | |
| Sharding corpus | , fp32 | Capacity example with |
| Raw vector memory | ||
| Link memory | base slots plus approximately upper slots | Expected allocation model, not all-in graph metadata |
| Resident total | Approximately | Vectors plus expected neighbor slots, excluding additional resident costs |
| Node tier | usable: steady lower bound shards; same-node two-copy lower bound | Both are capacity-only bounds before overhead and skew |
| Per shard | or vectors; approximately | Three balanced shards; expected-slot memory |
| Per-machine service | shard-QPS | Service-point proxy with occupied slots and mean; not a tail-safe measured capacity |
| Opening tail drift | Source vignette: rises from to | A diagnostic symptom, not a consequence proved by the depth ratio |
| Shard only | machines, user-QPS proxy | aggregate shard-QPS divided by fan-out , assuming balance |
| Shard and replicate | machines, user-QPS proxy, approximately | , under unchanged balanced node capacity |
| Tenant partition | machines, keyed-QPS proxy, approximately | Fan-out with balanced valid routing; not a skew-proof guarantee |
| Keyed share | , user-QPS proxy | Assumes balanced per-node work and full broadcast on unkeyed queries |
| Hash locality loss | keyed requests may still need fan-out | When tenant vectors are spread across all three identifier-hashed shards |
| Keyed share | , user-QPS proxy | No universal partitioning break-even at this keyed share |
| Default replicas | leaves one copy after one failure; leaves two during one rebuild | Availability depends on quorums, zones, routing and recovery, not copy count alone |
| Retrieval budget | end-to-end target | Serial point estimates below do not certify this percentile |
| Embedding | stipulated component | Actual latency distribution and queueing must be measured |
| ANN | at vectors | Approximately of the same-region serial proxy |
| Rerank workload | parameters, processed tokens per passage, passages | Forward compute proxy; real attention and batching costs additional |
| Rerank compute | at | idealized compute proxy |
| Fiber physics | , | Uses |
| Virginia to Ireland | one way: propagation RTT; at path stretch | Actual measured RTT includes route/equipment effects; example separately stipulates |
| Measured region band | Source reports approximately – | Scoped reported input, not a new measurement or proof of a fixed stretch factor |
| Same-region path | serial proxy | Below the numerical target; no end-to-end guarantee |
| Cross-region path | serial proxy | Exceeds that numerical target in the scenario, not proof of a measured percentile |
| Twice-faster ANN | saved, of the target | Cross-region versus same-region hop difference is , or |
| Latency diagnosis probe | overrun; removing recovers approximately of that gap | A stipulated serial-budget illustration, not subtraction of component percentiles |
| Business product workload | million chunks, tenants, | Worked store-selection scenario |
| HNSW bytes | Approximately and | Expected forward slots plus fp32 payload; overhead excluded |
| Tenant share | chunks, | Equal-size or average tenant; does not imply ranked-candidate pass rate |
| Global top- | Mean survivors ; probability of any approximately | Approximately empty under IID candidate passes |
| Same-VPC hop | , giving with the other fixed serial proxies | A selective SQL plan has its own search cost; not an end-to-end percentile |
| Truncated vectors | : approximately , | Vector bytes halve, links do not; suitable training and quality validation required |
| Daily store writes | inserts, proxy evaluations | Stipulated daily replacement and insertion work |
| Daily store queries | proxy evaluations | |
| Maintenance tax | Write/query work ratio approximately | Not measured CPU utilization or total operating-cost share |
| Ground-truth sample | queries suggested by the source | Sample and cohort design determine uncertainty; not a universal certification |
| Metadata corpus | documents, chunks, tokens | Assumes tokens per chunk |
| Migration proxy failure | re-stamped in the source's 2025 vignette | A recently ingested 2019 template need not be recently authored; eleven-month wording is historical to that vignette |
| Format coverage | populated headings, null | Worked chunk-level coverage with correct populated fields; document percentages alone are insufficient |
| Heading values | , assumed uniform among populated chunks | A modeling assumption to replace with actual counts |
| Generated audit | IID chunk accuracy estimate, not necessarily query-gold gate accuracy | |
| Audit uncertainty | ; Wilson interval approximately | Wald half-width approximately points; clustering changes uncertainty |
| Strict heading filter | , chunks; gold admission | Applies to the representative single-gold, correct-populated-heading model |
| Null-tolerant filter | , chunks; approximately times larger | Missing-heading admission becomes in the model, not retrieval recall |
| Repaired coverage | , , chunks | Correct parsed headings and representative gold assumption; gold admission |
| Two hard fields | only under gold-gate independence | Otherwise joint admission lies in ; global accuracy does not establish either gate |
| Tag input | input tokens | |
| Tag output | output tokens | |
| Tag price | Stipulated per million input and per million output tokens | |
| Embedding price | million source tokens at per million | |
| Tag multiple | Ratio of the stipulated tagging and embedding bills | |
| Context cost | Reported per million document tokens, at this scale | Tag/context ratio approximately does not by itself identify a caching effect |
| Soft retrieval gain | Reported relative reduction in top- failure | Scoped contextual embedding plus contextual BM25 result, not a -point recall gain |
| Security mislabels | Hypothetical error count; generated classifiers are not an authorization source | |
| Post-filter reliability | Evaluate | IID known-pass model; small- Poisson approximation , not an integer guarantee |
| Post-filter boundary | for | Exact binomial root; corpus selectivity need not equal ranked survival |
| Candidate-budget example | gives minimum | Exceeds this candidate budget, not mathematical impossibility or an work bound |
| Exact-scan budget | at isolated gives | Payload-only allocation, before predicate/scoring/selection overhead |
| Exact-scan capacity | vectors isolated, with ten-way equal bandwidth | Floors of payload budgets divided by |
| Pre-filter boundary | at | Ten-way payload-budget condition, not a sufficient latency or optimality guarantee |
| Average tenant filter | chunks, | Equal-sized tenants and a within-tenant year pass rate assumed |
| Post-filter | Mean ; probability of any approximately | Empty probability approximately under IID candidate passes |
| Reliable tenant | minimum in the IID binomial model | of corpus, approximately times ; without-replacement minimum under its different model |
| Tenant exact scan | MACs, FLOPs, | Isolated serial compute/read proxy ; ten-way read term before overhead |
| HNSW comparison | proxy distances | Assumed expansion-equivalents; not an upper bound from |
| Middle-band example | , vectors, , | Isolated payload-read proxy exceeds the scan allocation |
| Middle post-filter | Minimum in the IID model | Approximately times the -candidate budget |
| Planner default | gives vectors; gives | Check implementation/version units; binary count is approximately above the derived payload limit |
| PQ comparison | mean code traffic; payload ratio | Differently scoped IVF-PQ and fp32 reads, not a matched-quality speedup |
| Large tenant | vectors, , | Isolated read proxy exceeds the scan slice, not automatically a retrieval target |
| Tenant partition cost | tenants need not mean physical indexes | Shared filtering, logical partitions and hybrid routing have different build/serving costs |
| FunnelRAG | Reported approximately -token clusters, -token passages and roughly speed improvement | Workload-specific; do not equate an unspecified rate improvement with a time reduction |
| Self-query corpus | chunks, five years, four fields | Worked extraction scenario |
| Value counts | types and departments | Cardinalities do not establish uniformity or independence |
| Board-deck share | gives chunks | Stipulated fraction |
| Quarter subset | chunks, | Assumes board decks uniform over quarters |
| Quarter scan | at isolated gives | Payload-read proxy, not total exact-search time |
| Blind break-even | Correct branch fixed at , all wrong executed branches zero; not a general theorem about extraction | |
| Labeled outcomes | queries: correct, detected errors, undetected errors | Finite-sample estimates , , |
| Blind expected recall | Modeled branch-weighted score, not a measured evaluation result | |
| Validated expected recall | Needs restored-query fallback with conditional recall and zero undetected-branch recall | |
| Validator gain | , or percentage points | Toy fallback gain, not an automatic catalog-lookup benefit |
| Remaining gap | Undetected-error plus detected-fallback gaps under the stipulated conditional scores | |
| Extractor weights | bf16 parameters, | Weight payload only; cache, activations and runtime omitted |
| HBM rate | gives approximately | Assumes every unbatched sequential decode pass streams the entire weight payload |
| Decode | output tokens: subsequent passes, approximately read proxy | First token produced by prefill; charging decode passes instead gives |
| Prefill | tokens, , approximately | Compute proxy at |
| Extractor total | Approximately ; if charging decode passes | Conditional serial hardware proxies, not universal floors or measured -, • or -fold system differences |
| Scan comparison | read proxy versus graph proxy, ratio approximately | Unlike cost scopes; does not prove an end-to-end exact-scan speedup |
| Value-catalog prompt limit | Roughly values in the source's heuristic | Prompt-budget guidance, not a universal limit; validate aliases/candidates rather than blindly snapping to the nearest value |
00-START-HERE · 01-READING-ROUTES · 16_compression_and_index_economics · 18_classical_ir_you_are_expected_to_know