类 RetrieveConfig

java.lang.Object
io.agentscope.core.rag.model.RetrieveConfig

public class RetrieveConfig extends Object
Configuration for document retrieval operations.

This class uses the builder pattern to configure retrieval parameters such as the maximum number of results, the minimum similarity score threshold, and optional conversation history for context-aware retrieval.

  • 方法详细资料

    • getLimit

      public int getLimit()
      Gets the maximum number of documents to retrieve.
      返回:
      the limit
    • getScoreThreshold

      public double getScoreThreshold()
      Gets the minimum similarity score threshold.
      返回:
      the score threshold
    • getVectorName

      public String getVectorName()
      Gets the vector name for retrieval.
      返回:
      the vector name, or null if not set
    • getConversationHistory

      public List<Msg> getConversationHistory()
      Gets the conversation history for context-aware retrieval.

      This is an optional field used by knowledge bases that support multi-turn conversation context (e.g., Bailian Knowledge Base with query rewriting).

      返回:
      the conversation history, or null if not set
    • mutate

      public RetrieveConfig.Builder mutate()
      Mutate the current instance to a new builder.
      返回:
      a new builder with the same values of this instance
    • builder

      public static RetrieveConfig.Builder builder()
      Creates a new builder instance.
      返回:
      a new builder