In docs search, every chunk of documentation is converted into an embedding and stored in a vector index. A user's question is embedded the same way, and the system returns the chunks whose vectors sit closest to the question's.
This is what lets semantic search connect "how do I revoke a token" to a page titled "Deleting API credentials". Exact-word matching can miss that connection. Embeddings help a system find passages with related meaning, although retrieval still needs evaluation.
Embeddings are the retrieval half of RAG, and their usefulness depends on chunking. Embed a whole page and the vector blurs many topics together; a focused section can improve the match, provided it keeps enough context.