Embeddings and Vector Search for AI Engineers
Embeddings and vector search turn text into numeric vectors so that passages with similar meaning sit close together, then find the nearest neighbours quickly. Vector databases and extensions such as pgvector store and index those vectors for approximate search. This unit is the retrieval engine underneath RAG on the AI Engineer path.
Stage: Retrieval and Knowledge · Part of the AI Engineer roadmap · Last reviewed 19 November 2026
What to learn in Embeddings and Vector Search
- Generate embeddings for a set of documents and compare them with cosine similarity
- Choose a chunk size and overlap that keeps each passage self-contained
- Create an HNSW or IVF index and explain the recall versus speed trade-off
- Filter vector results by metadata such as tenant or date
- Re-embed a corpus safely when the embedding model changes
Embeddings and Vector Search interview questions
Why can you not mix vectors from two different embedding models in one index?
Each model learns its own vector space, so dimensions and the meaning of each position differ, and distances between vectors from different models are meaningless. When the model changes you must re-embed the whole corpus, usually into a new index, then switch queries over.
What trade-off does an approximate nearest neighbour index such as HNSW make?
It avoids comparing the query with every vector by walking a graph or partitioned structure, giving far lower latency at scale, but it may miss some true nearest neighbours. Parameters such as graph connectivity and search breadth tune recall against speed and memory.
Where Embeddings and Vector Search fits in the AI Engineer roadmap
Embeddings and Vector Search belongs to the Retrieval and Knowledge stage (intermediate level), which takes about 60 hours. Ground answers in your data.
Other units in this stage
Back to the full AI Engineer roadmap