agents.rag.document_grading.agent¶
Document Grading RAG Agent.
from typing import Any Iterative document grading with structured output. Uses CallableNodeConfig to iterate over retrieved documents.
Classes¶
Agent that iterates over documents and grades each one. |
|
RAG with document grading and filtering. |
|
Grade for a single document. |
Module Contents¶
- class agents.rag.document_grading.agent.DocumentGradingAgent(llm_config=None, **kwargs)¶
Bases:
haive.agents.base.agent.Agent
Agent that iterates over documents and grades each one.
Initialize with LLM config.
- Parameters:
llm_config (haive.core.models.llm.base.LLMConfig | None)
- build_graph()¶
Build graph with document grading using CallableNode iteration.
- Return type:
haive.core.graph.state_graph.base_graph2.BaseGraph
- class agents.rag.document_grading.agent.DocumentGradingRAGAgent(config)¶
Bases:
haive.agents.multi.base.SequentialAgent
RAG with document grading and filtering.
Init .
- Parameters:
config (SequentialAgentConfig) – [TODO: Add description]
- class agents.rag.document_grading.agent.SingleDocumentGrade(/, **data)¶
Bases:
pydantic.BaseModel
Grade for a single document.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)