Interface ChatContentFetcher

All Known Implementing Classes:
DefaultChatContentFetcher

public interface ChatContentFetcher
Resolves the content of relevant documents for the LLM answer context.

Implementations decide, per document, whether to use the full content or query-relevant highlighted passages (e.g. based on document size), so that large documents do not crowd out the answer context. The default implementation is DefaultChatContentFetcher; replace the chatContentFetcher DI component to override the behavior.

  • Method Details

    • fetchContent

      List<Map<String,Object>> fetchContent(ChatContentRequest request)
      Resolves the LLM-context content for the given relevant documents.
      Parameters:
      request - the fetch request (doc ids, search results, query)
      Returns:
      document maps in the same order as request.getDocIds(), each with the content field set to the text to send to the LLM