gaash.ai

Vector Database

A vector database is a store built to hold embeddings, the numeric vectors that stand for the meaning of a piece of text, and to return the stored vectors closest to a query vector quickly. It is the retrieval layer in most systems that feed a language model documents it did not memorise.

What happens on a lookup

Documents are split into chunks, each chunk is turned into a vector embedding, and the vector is stored alongside the chunk text and some metadata: the source address, the date, the section. A question arriving later is embedded with the same model, and the database returns the chunks whose vectors sit nearest to it, measured by an angle or a distance in that space. Exact nearest-neighbour search over millions of vectors is slow, so production systems use approximate indexes that trade a little recall for a lot of speed. The returned chunks are handed to the model as context, and the model writes from them.

What a page owner should take from it

Retrieval is done per chunk, not per page. A chunk can answer a question only if the answer and the thing it is about both fall inside it, and the chunk boundary is drawn by the system, not by you. A long page gets cut at points you did not choose. A paragraph that names the business, the service and the specific fact in one place survives that cutting; a fact three paragraphs away from the name it belongs to may arrive as an orphan, and an orphaned fact is hard to attribute. This is the same property this site calls citability, seen from the storage side.

A common question

Since the system draws the chunk boundaries, what should a page owner do about it?

Keep a fact and the thing it describes inside the same paragraph. Retrieval happens per chunk rather than per page, and a long page is cut at points its author did not pick. A paragraph naming the business, the service and the specific detail together survives that cutting, while a fact sitting three paragraphs from the name it belongs to can arrive on its own, and an orphaned fact is hard to attribute. It is the same property as citability, seen from the storage side.

Related terms