Full-access lesson
Principal Component Analysis
Give a pgvector table a vector(3072) column for OpenAI's text-embedding-3-large, load a few million chunks, and the index from Chapter 7 refuses to build: CREATE INDEX ON chunks USING ivfflat (embedding vector_cosine_ops) WITH (lists = 1000) stops with column cannot have more than 2000 dimensions for ivfflat index. pgvector's documentation (version 0.8.6, as of September 2026) lists the ways out. Store the values as half-precision halfvec, which can be indexed up to 4,000 dimensions. Quantize them to bits. Index a leading slice of each vector, for models trained so that a slice still works. Or reduce the number of dimensions. For a model that was not trained to be sliced, the standard way to do the last is principal component analysis.
The complete curriculum
All 12 volumes, companion resources, interviews, and architecture reviews.
Executable engineering practice
Subscriber-only Python, Java, TypeScript, and SQL labs in the isolated runner.