haive.agents.reasoning_and_critique.reflexion.models¶

Pydantic models for Reflexion structured output.

Classes¶

AnswerQuestion

Initial answer with self-reflection and follow-up queries.

Reflection

Structured critique of a draft answer.

ReviseAnswer

Revised answer incorporating reflection and references.

Module Contents¶

class haive.agents.reasoning_and_critique.reflexion.models.AnswerQuestion(/, **data)¶

Bases: pydantic.BaseModel

Initial answer with self-reflection and follow-up queries.

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.reasoning_and_critique.reflexion.models.Reflection(/, **data)¶

Bases: pydantic.BaseModel

Structured critique of a draft answer.

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.reasoning_and_critique.reflexion.models.ReviseAnswer(/, **data)¶

Bases: AnswerQuestion

Revised answer incorporating reflection and references.

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)