haive.agents.rag.common.document_graders.models¶
RAG Structured Output Models.
Pydantic models for structured outputs from RAG evaluation agents.
Classes¶
Binary pass/fail document grading. |
|
Response for binary document grading. |
|
Simple document grade for use in corrective RAG. |
|
Comprehensive document grading response. |
|
Individual document relevance assessment. |
Module Contents¶
- class haive.agents.rag.common.document_graders.models.DocumentBinaryGrading(/, **data)¶
Bases:
pydantic.BaseModelBinary pass/fail document grading.
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 haive.agents.rag.common.document_graders.models.DocumentBinaryResponse(/, **data)¶
Bases:
pydantic.BaseModelResponse for binary document grading.
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 haive.agents.rag.common.document_graders.models.DocumentGrade(/, **data)¶
Bases:
pydantic.BaseModelSimple document grade for use in corrective RAG.
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 haive.agents.rag.common.document_graders.models.DocumentGradingResponse(/, **data)¶
Bases:
pydantic.BaseModelComprehensive document grading response.
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 haive.agents.rag.common.document_graders.models.DocumentRelevanceScore(/, **data)¶
Bases:
pydantic.BaseModelIndividual document relevance assessment.
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)