Skip to content

AutoRetrieveCapability

Converts auto-retrieve from a pipeline stage to an on-demand search_knowledge_base tool. The LLM decides when to call it; the result flows back as a tool result for the LLM to use.

new AutoRetrieveCapability(config): AutoRetrieveCapability;
Parameter Type

config

AutoRetrieveCapabilityConfig

AutoRetrieveCapability

getPromptSections(): CapabilityPromptSection[];

What does this capability contribute to the system prompt?

CapabilityPromptSection[]

Capability.getPromptSections


getTools(): ToolDeclaration<unknown, unknown>[];

What tools does this capability expose for the current state?

ToolDeclaration<unknown, unknown>[]

Capability.getTools


processToolResult(
_toolName,
_args,
_result): CapabilityAction | null;

A tool was called and executed. Does this capability handle the result?

Parameter Type

_toolName

string

_args

unknown

_result

unknown

CapabilityAction | null

An action telling the host what to do, or null if this capability doesn’t handle this tool.

Capability.processToolResult