haive.core.schema.prebuilt.rag_stateΒΆ
RAG (Retrieval-Augmented Generation) state schema for haive agents.
ClassesΒΆ
State schema for RAG (Retrieval-Augmented Generation) workflows. |
Module ContentsΒΆ
- class haive.core.schema.prebuilt.rag_state.RAGState(/, **data)[source]ΒΆ
Bases:
haive.core.schema.prebuilt.messages_state.MessagesState
State schema for RAG (Retrieval-Augmented Generation) workflows.
This schema extends MessagesState with fields specific to RAG operations: - Document retrieval and storage - Query/question tracking - Context management - Retrieved document scoring and metadata
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)
- add_document(document)[source]ΒΆ
Add a document to the retrieved documents list.
- Parameters:
document (langchain_core.documents.Document)
- Return type:
None