01. The Baseline: VectorStoreIndex + Query Engine
The simplest search setup uses a vector store index and a query engine. Under the hood, it converts your query into an embedding. That embedding is a list of numbers that captures the meaning of your words. The engine then finds the closest matching chunks in the stored index by measuring cosine similarity. This is fast and requires no extra steps. For many collections of text, it is genuinely enough.
But this simplicity hides a trade-off. Embeddings capture topic, not exact tokens. If you search for an error code like err underscore conn underscore reset, the embedding treats it as some error-ish thing. It finds chunks about errors, but not the specific string you need. Cosine similarity happily returns twenty neighbors that are about the right subject and none of them about the right string. So dense retrieval fails on rare, exact identifiers.
That is why this setup matters as a baseline. Every later improvement, like hybrid search or reranking, must beat the plain vector score. Measurements like hit rate and mean reciprocal rank are compared against this starting point. The entire justification for adding more steps is a measurable lift over this simple method. If the baseline already works well, you may not need anything else.
The vector store plus query engine is the bottom rung of the ladder. It is what you build on top of. Everything downstream inherits whatever this stage hands it. So getting this first step right is crucial. You can later add hybrid search, which combines dense and lexical retrieval. You can add reranking to reorder the results. But you always come back to this baseline.
A common mistake is to blame the index when retrieval fails. Often the index is fine, and the question itself is broken. Simple vector search can still fail if the question uses different vocabulary than the corpus. But for many corpora, especially those with clear topic structure, the simple setup works well. It is fast, cheap, and easy to set up.
When you evaluate your retrieval, you compare against this baseline. Build your evaluation set first. Measure retrieval in isolation. Then you can see if an extra hop actually improves hit rate and mean reciprocal rank. If it does not, you saved yourself the complexity. If it does, you know the upgrade is worth it.
So remember: the vector store index and query engine are your starting point. They give you a clear number to beat. They handle topic matching well. They struggle with exact tokens. That is their strength and their weakness. And that is why you need to know them before you reach for anything fancier.