Information retrieval finds text chunks relevant to a query by embedding both the query and chunks, then locating the closest points in vector space. Direct retrieval can compare a chunk matrix with the query vector and sort the top results. section 4.5.3
Choose similarity and embedding size with practical tradeoffs in mind:
- Cosine similarity is the standard choice because it ignores vector magnitude; dot product suits encoders trained to produce unit-length vectors. section 4.5.3
- Smaller embeddings are faster and cheaper to store; larger embeddings can preserve more semantic nuance. section 4.5.3
Semantic proximity
A paragraph about quarterly revenue may sit near one about Q3 earnings, while a paragraph about lunch options sits farther away. section 4.5.3
















