AI engineering glossary · RAG vector search
What is cosine distance?
Cosine distance: A distance measure defined as 1 minus cosine similarity, so vectors pointing the same way have distance 0. Many vector databases report it instead of similarity, and smaller values mean the items are closer in meaning.
Cosine distance: an example
Two vectors with cosine similarity 0.8 have cosine distance 0.2.
Related terms
More RAG vector search terms
- Dense retrieval
- DiskANN
- Document loader
- Domain adaptation of embeddings
- efConstruction
- efSearch
- Embedding
- Embedding cache
Where you learn it
Cosine distance is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.