Class VectorStoreRetriever

java.lang.Object
org.springframework.ai.retriever.impl.VectorStoreRetriever
All Implemented Interfaces:
Retriever

public class VectorStoreRetriever extends Object implements Retriever
  • Constructor Details

    • VectorStoreRetriever

      public VectorStoreRetriever(VectorStore vectorStore)
    • VectorStoreRetriever

      public VectorStoreRetriever(VectorStore vectorStore, int k)
    • VectorStoreRetriever

      public VectorStoreRetriever(VectorStore vectorStore, int k, double threshold)
  • Method Details

    • getVectorStore

      public VectorStore getVectorStore()
    • getK

      public int getK()
    • getThreshold

      public Optional<Double> getThreshold()
    • retrieve

      public List<Document> retrieve(String query)
      Description copied from interface: Retriever
      Retrieves relevant documents however the implementation sees fit.
      Specified by:
      retrieve in interface Retriever
      Parameters:
      query - query string
      Returns:
      relevant documents