agents.rag.multi_agent_rag.grading_components¶
Grading Components for RAG Workflows.
This module provides reusable grading agents for document relevance, answer quality, and hallucination detection.
Classes¶
Grade for generated answer quality. |
|
Combines multiple grading components for comprehensive evaluation. |
|
Grade for a retrieved document. |
|
Grade for hallucination detection. |
Functions¶
|
Create an answer quality grading agent. |
|
Create a document relevance grading agent. |
|
Create a hallucination detection agent. |
|
Create a document priority ranking agent. |
|
Create a query analysis agent. |
Module Contents¶
- class agents.rag.multi_agent_rag.grading_components.AnswerGrade(/, **data)¶
Bases:
pydantic.BaseModel
Grade for generated answer quality.
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)
- class agents.rag.multi_agent_rag.grading_components.CompositeGradingAgent¶
Combines multiple grading components for comprehensive evaluation.
Init .
- Returns:
Add return description]
- Return type:
[TODO
- class agents.rag.multi_agent_rag.grading_components.DocumentGrade(/, **data)¶
Bases:
pydantic.BaseModel
Grade for a retrieved 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)
- class agents.rag.multi_agent_rag.grading_components.HallucinationGrade(/, **data)¶
Bases:
pydantic.BaseModel
Grade for hallucination detection.
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)
- agents.rag.multi_agent_rag.grading_components.create_answer_grader(name='answer_grader')¶
Create an answer quality grading agent.
- Parameters:
name (str)
- Return type:
haive.agents.simple.SimpleAgent
- agents.rag.multi_agent_rag.grading_components.create_document_grader(name='document_grader')¶
Create a document relevance grading agent.
- Parameters:
name (str)
- Return type:
haive.agents.simple.SimpleAgent
- agents.rag.multi_agent_rag.grading_components.create_hallucination_grader(name='hallucination_grader')¶
Create a hallucination detection agent.
- Parameters:
name (str)
- Return type:
haive.agents.simple.SimpleAgent