agentic

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package agentic provides agentic orchestration steps for autonomous RAG workflows. These steps handle intent routing, tool execution, reasoning, and multi-turn interactions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentCurrentQuery

func AgentCurrentQuery(state *entity.PipelineState) string

AgentCurrentQuery returns the query text overwritten by TerminationCheckStep for the retrieve action, falling back to the original query if unchanged.

func AgentFinished

func AgentFinished(state *entity.PipelineState) bool

AgentFinished is a helper used by Searcher.Search to check whether TerminationCheckStep has set the finished flag.

func AgentSetIteration

func AgentSetIteration(state *entity.PipelineState, i int)

AgentSetIteration sets the current iteration counter in the state.

func NewActionSelectionStep

func NewActionSelectionStep(selector retrieval.AgentActionSelector, maxIterations int, logger logging.Logger) *actionSelectionStep

NewActionSelectionStep creates a new action-selection step.

func NewIntentRouter

func NewIntentRouter(classifier retrieval.IntentClassifier, logger logging.Logger) *intentRouter

NewIntentRouter creates a new intent router step with logger.

func NewObservationStep

func NewObservationStep(logger logging.Logger) *observationStep

NewObservationStep creates a new observation step.

func NewParallelRetriever

func NewParallelRetriever(retriever retrieval.Retriever, topK int, logger logging.Logger) *parallelRetriever

NewParallelRetriever creates a new parallel retrieval step with logger.

func NewReasoningStep

func NewReasoningStep(reasoner retrieval.AgentReasoner, logger logging.Logger) *reasoningStep

NewReasoningStep creates a new reasoning step with the given reasoner and logger.

func NewTerminationCheckStep

func NewTerminationCheckStep(logger logging.Logger) *terminationCheckStep

NewTerminationCheckStep creates a new termination-check step.

func NewToolExecutor

func NewToolExecutor(llm core.Client, tools []core.Tool, logger logging.Logger) *toolExecutor

NewToolExecutor creates a new tool executor step with injected tools and logger. tools: the tool schemas that will be passed to the LLM. Pass nil or empty to skip tool-calling mode.

Types

type SelfRAGStep

type SelfRAGStep struct {
	// contains filtered or unexported fields
}

SelfRAGStep is an interceptor step that uses an LLM Evaluator to check the generated answer for hallucinations (Faithfulness) before returning it to the user.

func NewSelfRAGStep

func NewSelfRAGStep(judge evaluation.LLMJudge, strictMode bool, threshold float32) *SelfRAGStep

NewSelfRAGStep creates a Self-RAG reflection step.

func (*SelfRAGStep) Execute

func (s *SelfRAGStep) Execute(ctx context.Context, state *entity.PipelineState) error

func (*SelfRAGStep) Name

func (s *SelfRAGStep) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL