Vector Store Retrievers

Base vector store index query.

class llama_index.indices.vector_store.retrievers.VectorIndexRetriever(index: GPTVectorStoreIndex, similarity_top_k: int = 2, vector_store_query_mode: str = VectorStoreQueryMode.DEFAULT, alpha: Optional[float] = None, doc_ids: Optional[List[str]] = None, **kwargs: Any)

Base vector store query.

  • embed_model (Optional[BaseEmbedding]) – embedding model

  • similarity_top_k (int) – number of top k results to return

  • vector_store (Optional[VectorStore]) – vector store

retrieve(str_or_query_bundle: Union[str, QueryBundle]) List[NodeWithScore]

Retrieve nodes given query.


str_or_query_bundle (QueryType) – Either a query string or a QueryBundle object.