Enum Class RAGMode

java.lang.Object
java.lang.Enum<RAGMode>
io.agentscope.core.rag.RAGMode
所有已实现的接口:
Serializable, Comparable<RAGMode>, Constable

public enum RAGMode extends Enum<RAGMode>
RAG (Retrieval-Augmented Generation) mode enumeration.

Defines how knowledge retrieval is integrated with the agent:

  • GENERIC: Knowledge is automatically retrieved and injected before each reasoning step via Hook
  • AGENTIC: Agent actively decides when to retrieve knowledge via Tool
  • NONE: No RAG functionality enabled
  • 枚举常量详细资料

    • GENERIC

      public static final RAGMode GENERIC
      Generic mode: Knowledge is automatically retrieved and injected before each reasoning step via Hook.

      In this mode, the system automatically retrieves relevant knowledge based on user queries and injects it into the prompt context.

    • AGENTIC

      public static final RAGMode AGENTIC
      Agentic mode: Agent decides when to retrieve knowledge via Tool.

      In this mode, the agent has a tool to retrieve knowledge and actively decides when to use it based on the conversation context.

    • NONE

      public static final RAGMode NONE
      Disabled mode: No RAG functionality.

      Knowledge retrieval is not enabled for this agent.

  • 方法详细资料

    • values

      public static RAGMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RAGMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值