Interface ContentRetriever

All Known Implementing Classes:
EmbeddingStoreContentRetriever

public interface ContentRetriever
Retrieves Contents from an underlying data source using a given Query.
The goal is to retrieve only relevant Contents in relation to a given Query.
The underlying data source can be virtually anything:
 - Embedding (vector) store (see EmbeddingStoreContentRetriever)
 - Full-text search engine (e.g., Apache Lucene, Elasticsearch, Vespa)
 - Hybrid of keyword and vector search
 - The Web (e.g., Google, Bing)
 - Knowledge graph
 - Relational database
 - etc.
 
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    retrieve(Query query)
    Retrieves relevant Contents using a given Query.
  • Method Details

    • retrieve

      List<Content> retrieve(Query query)
      Retrieves relevant Contents using a given Query. The Contents are sorted by relevance, with the most relevant Contents appearing at the beginning of the returned List<Content>.
      Parameters:
      query - The Query to use for retrieval.
      Returns:
      A list of retrieved Contents.