haive.agents.rag.hallucination_grading.agent ============================================ .. py:module:: haive.agents.rag.hallucination_grading.agent .. autoapi-nested-parse:: Hallucination Grading Agents. Modular agents for detecting and grading hallucinations in RAG responses. Can be plugged into any workflow with compatible I/O schemas. Classes ------- .. autoapisummary:: haive.agents.rag.hallucination_grading.agent.AdvancedHallucinationGrade haive.agents.rag.hallucination_grading.agent.AdvancedHallucinationGraderAgent haive.agents.rag.hallucination_grading.agent.HallucinationGrade haive.agents.rag.hallucination_grading.agent.HallucinationGraderAgent haive.agents.rag.hallucination_grading.agent.RealtimeHallucinationCheck haive.agents.rag.hallucination_grading.agent.RealtimeHallucinationGraderAgent Functions --------- .. autoapisummary:: haive.agents.rag.hallucination_grading.agent.create_hallucination_grader haive.agents.rag.hallucination_grading.agent.get_hallucination_grader_io_schema Module Contents --------------- .. py:class:: AdvancedHallucinationGrade(/, **data) Bases: :py:obj:`pydantic.BaseModel` Advanced hallucination assessment with detailed analysis. 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. .. py:class:: AdvancedHallucinationGraderAgent Bases: :py:obj:`haive.agents.base.agent.Agent` Advanced hallucination grading with detailed analysis. .. py:method:: build_graph() Build advanced hallucination analysis graph. .. py:class:: HallucinationGrade(/, **data) Bases: :py:obj:`pydantic.BaseModel` Single hallucination 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. .. py:class:: HallucinationGraderAgent Bases: :py:obj:`haive.agents.base.agent.Agent` Basic hallucination grading agent. .. py:method:: build_graph() Build hallucination grading graph. .. py:class:: RealtimeHallucinationCheck(/, **data) Bases: :py:obj:`pydantic.BaseModel` Quick hallucination check for real-time applications. 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. .. py:class:: RealtimeHallucinationGraderAgent Bases: :py:obj:`haive.agents.base.agent.Agent` Fast hallucination checker for real-time applications. .. py:method:: build_graph() Build realtime hallucination check graph. .. py:function:: create_hallucination_grader(grader_type = 'basic', llm_config = None, **kwargs) Create a hallucination grader agent. :param grader_type: Type of grader to create :param llm_config: LLM configuration :param \*\*kwargs: Additional arguments :returns: Configured hallucination grader agent .. py:function:: get_hallucination_grader_io_schema() Get I/O schema for hallucination graders for compatibility checking.