haive.agents.rag.common.document_graders.models¶

RAG Structured Output Models.

Pydantic models for structured outputs from RAG evaluation agents.

Classes¶

DocumentBinaryGrading

Binary pass/fail document grading.

DocumentBinaryResponse

Response for binary document grading.

DocumentGrade

Simple document grade for use in corrective RAG.

DocumentGradingResponse

Comprehensive document grading response.

DocumentRelevanceScore

Individual document relevance assessment.

Module Contents¶

class haive.agents.rag.common.document_graders.models.DocumentBinaryGrading(/, **data)¶

Bases: pydantic.BaseModel

Binary 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.BaseModel

Response 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.BaseModel

Simple 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.BaseModel

Comprehensive 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.BaseModel

Individual 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)