liveBook · Manning

Index configuration

As explained in Designing AI Systems

An index configuration is the set of immutable and adjustable parameters that define an index's identity, embedding model, and document chunking behavior.

An index configuration defines an index's identity, embedding space, document chunking, and optional metadata contract. The name identifies the index; embedding model and dimensions are fixed at creation because changing them invalidates stored vectors and can corrupt comparisons. section 5.2.2

Configure the ingestion and retrieval boundaries explicitly:

  • Set chunking_strategy, chunk_size, and chunk_overlap once for consistent document ingestion; different strategies suit different content types. section 5.3.5
  • Use metadata_schema to reject inconsistent keys during ingestion instead of silently losing filtered results later. section 5.2.2
  • Resolve the configuration before searching so the query uses the same embedding model as the indexed chunks. section 5.4.4

Changing embedding models safely

Create a second index with the new embedding model, re-ingest the documents, validate retrieval queries, then switch traffic after validation. Retain the original 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

Inspect the Python dataclass that groups index identity, embedding, chunking, and metadata settings. section 5.2.2

How Designing AI Systems covers it

How deep it goes
Defines fields, immutability rationale, migration procedure, chunking interfaces, and search wiring, while deferring detailed chunking algorithms elsewhere.
Examples
Uses an IndexConfig dataclass, fixed-size chunking with overlap, custom strategy registration, and parallel index migration.
What it assumes
Assumes embedding generation, vector search, and document ingestion, while defining their index-level configuration contract.
What you can do after
Operate/configure indexes, enforce compatible embeddings, standardize metadata, and migrate models through validated traffic swaps.
How it connects
Connects embedding models, vector embeddings, document chunking, metadata schemas, vector stores, and hybrid search.

Also explained in

Compare how 2 books explain index configuration →

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.