In this post
What is an embedding?
A model turns a piece of content into a vector so that similar meanings sit close together. A search for “refund policy” can then find a passage titled “returns and money back” without sharing any words.
How does the search work?
The query is turned into a vector, and the database returns the nearest stored vectors. For large collections it uses approximate nearest-neighbour indexes, which trade a little recall for much better speed.
Do you always need a dedicated vector database?
Not always. For small or moderate collections, a vector extension in a database you already run can be enough, and it keeps data and permissions in one place. A dedicated system makes sense when scale, latency or filtering needs outgrow that.
What else matters besides the database?
How documents are split into chunks changes what can be found, and metadata filters limit results by owner, date or access rights. Hybrid search combines keyword and vector matching, and content must be re-indexed when it changes.
How do permissions work?
Retrieved text must respect who may see it. Store access rights with each chunk and filter on them at query time, or a user could be shown passages from documents they are not allowed to open.
How do you judge quality?
Build a small set of real questions with known good passages, and measure whether retrieval finds them. See RAG explained for how retrieval fits into a full system.
Sources and further reading
- pgvector. github.com/pgvector/pgvector (an example of a vector extension for an existing database).
- Lewis et al. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. arXiv:2005.11401.
IICTP is an independent technical credentialing body.