liveBook · Manning

Dimension

As explained in Designing AI Systems

Dimensionality is the number of scalar values composing a vector representation.

Embedding dimensionality is the number of floating-point values in each vector. It is an index-level choice: higher dimensions can capture more nuanced semantic relationships, but require more storage and slow similarity calculations. Set the embedding model and dimensions when creating an index; keep its vectors comparable by using a consistent model. section 5.3.6 section 5.2.2

Treat an embedding configuration change as an index migration:

  • Create a new index with the desired configuration and re-ingest documents. section 5.2.2
  • Validate retrieval quality, switch traffic after validation, and retain the old index as a rollback option. section 5.2.2
Listing 5.1 Index configuration dataclass
@dataclass
class IndexConfig:
    name: str    #A
    embedding_model: str = 
➥"text-embedding-3-small"    #B
    embedding_dimensions: int = 1536    #B
    chunking_strategy: str = "fixed"    #C
    chunk_size: int = 512    #C
    chunk_overlap: int = 50    #C
    metadata_schema: Optional[Dict] = None    #D

The index configuration dataclass makes the dimension an explicit setting, with a default of 1536. section 5.2.2

How Designing AI Systems covers it

How deep it goes
Defines dimensionality and its storage and similarity-speed tradeoffs, without quantifying retrieval effects.
Examples
Shows an index configuration with embedding_dimensions set to 1536 and text-embedding-3-small as the default model.
What you can do after
Configure an index’s embedding dimensions and plan model changes through re-ingestion, validation, traffic switching, and rollback.
How it connects
Ties embedding dimensionality to embeddings, index configuration, and similarity search.

Also explained in

Compare how 11 books explain dimension →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.