Before inserting into a pgvector column for a municipal corpus, what must the pipeline validate?
Select an answer to reveal the explanation.
Short Explanation
Dimension checks are measuring the suitcase before the overhead bin—if the embedding length doesn’t match the pgvector column, you fix it up front instead of jamming it in mid-flight.
Full Explanation
Before inserting into a pgvector column for a municipal corpus, the pipeline must validate that embedding dimensionality matches the pgvector column definition. Dimension mismatches cause insert failures or corrupt vector operations, so checking length against the column and model contract is mandatory for city ordinance and FAQ corpora. Inserting any length vector and relying on silent truncation without checks risks invalid or misleading vectors in Azure Database for PostgreSQL that later break ANN search for staff and residents. Changing the column dimension on every single row insert to match whatever arrives is operationally chaotic and breaks a stable schema contract for the shared municipal corpus. Storing embeddings as free-text CSV strings with no dimensional typing abandons the pgvector type system and efficient ANN indexing operators. Exam caveat: dimension validation belongs at ingest—especially after model swaps—alongside idempotent upserts and null-vector backfill jobs. Operationally, assert embedding length equals the column dimension in the pipeline, fail fast with clear metrics on mismatch, and block promotion of a new embedding model until the column definition and backfill plan match.