Interface DocumentRetriever

All Superinterfaces:
Function<Query,List<Document>>
All Known Implementing Classes:
VectorStoreDocumentRetriever

public interface DocumentRetriever extends Function<Query,List<Document>>
Component responsible for retrieving Documents from an underlying data source, such as a search engine, a vector store, a database, or a knowledge graph.
Since:
1.0.0
Author:
Christian Tzolov, Thomas Vitale
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<Document>
    apply(Query query)
     
    retrieve(Query query)
    Retrieves relevant documents from an underlying data source based on the given query.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • retrieve

      List<Document> retrieve(Query query)
      Retrieves relevant documents from an underlying data source based on the given query.
      Parameters:
      query - The query to use for retrieving documents
      Returns:
      The list of relevant documents
    • apply

      default List<Document> apply(Query query)
      Specified by:
      apply in interface Function<Query,List<Document>>