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 ¶
- func AgentCurrentQuery(state *entity.PipelineState) string
- func AgentFinished(state *entity.PipelineState) bool
- func AgentSetIteration(state *entity.PipelineState, i int)
- func NewActionSelectionStep(selector retrieval.AgentActionSelector, maxIterations int, ...) *actionSelectionStep
- func NewIntentRouter(classifier retrieval.IntentClassifier, logger logging.Logger) *intentRouter
- func NewObservationStep(logger logging.Logger) *observationStep
- func NewParallelRetriever(retriever retrieval.Retriever, topK int, logger logging.Logger) *parallelRetriever
- func NewReasoningStep(reasoner retrieval.AgentReasoner, logger logging.Logger) *reasoningStep
- func NewTerminationCheckStep(logger logging.Logger) *terminationCheckStep
- func NewToolExecutor(llm core.Client, tools []core.Tool, logger logging.Logger) *toolExecutor
- type SelfRAGStep
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 ¶
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 ¶
NewTerminationCheckStep creates a new termination-check step.
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