liveBook · Manning

Vector database

As explained in Build an Advanced RAG Application (From Scratch)

A vector database stores, indexes, and retrieves numerical vector representations for similarity-based search.

A vector database stores embeddings and retrieves the entries most similar to a query embedding. In semantic hotel search, it replaces a FAISS index as collections grow across cities and languages, returning relevant reviews together with their attached data. section 6.2

Similarity alone can return hotels from every city. Metadata filtering narrows retrieval before results reach the answer generator: a query for a centrally located hotel can be limited to Istanbul through a locality field. This reduces irrelevant context and supports more personalized recommendations. section 6.2 section 6.0

City-filtered hotel retrieval

For “Amazing hotel close to everything,” filter the search to Istanbul, retrieve up to 25 matching reviews, and pass hotel details, locality, review text, and similarity scores into a concise generated response. The resulting answer cites hotels located near attractions and amenities in Istanbul.

In a RAG pipeline, retrieved reviews ground an LLM response in current domain information rather than relying only on generated text. The database therefore connects embedding search to a conversational recommendation answer. section 6.0 section 6.2

How Build an Advanced RAG Application (From Scratch) covers it

How deep it goes
Walks through collection creation, point upload, filtered querying, and answer-context assembly, without detailing database internals.
Examples
Uses hotel-review embeddings, an Istanbul locality filter, and a generated response to “Amazing hotel close to everything.”
What it assumes
Assumes embeddings and semantic search, then grounds vector-database use through an in-memory client and explicit collection operations.
What you can do after
Apply it via Qdrant to store review embeddings, filter by locality, retrieve payloads, and supply RAG context.
How it connects
Connects embeddings, cosine distance, semantic search, metadata filtering, FAISS, Qdrant, and retrieval-augmented generation.

Also explained in

Compare how 34 books explain vector database →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build an Advanced RAG Application (From Scratch). The section links point to the parts of the book it draws on.