babylon.intelligence.rag.exceptions

Custom exceptions for the RAG system.

Defines RAG-specific exceptions that integrate with the main Babylon error hierarchy. All RAG errors inherit from ObserverError, making them non-fatal to the simulation.

Error Code Ranges: - RAG_001 to RAG_099: General RAG system errors - RAG_100 to RAG_199: Lifecycle management errors - RAG_200 to RAG_299: Embedding errors - RAG_300 to RAG_399: Query/retrieval errors - RAG_400 to RAG_499: Pre-embeddings errors - RAG_500 to RAG_599: Context window errors

Exceptions

CacheError

ChunkingError

CorruptStateError

InvalidObjectError

LifecycleError

PreEmbeddingError

PreprocessingError

RagError(message[, error_code, details])

Unified exception class for all RAG system errors.

StateTransitionError

exception babylon.intelligence.rag.exceptions.RagError(message, error_code='RAG_001', details=None)[source]

Bases: ObserverError

Unified exception class for all RAG system errors.

Use error_code to distinguish between different error types: - RAG_001-099: General errors - RAG_1XX: Lifecycle errors (invalid objects, state transitions) - RAG_2XX: Embedding errors (API failures, batch errors) - RAG_3XX: Query/retrieval errors - RAG_4XX: Pre-embedding errors (chunking, preprocessing) - RAG_5XX: Context window errors (capacity, optimization)

Parameters:
Return type:

None

__init__(message, error_code='RAG_001', details=None)[source]
Parameters:
Return type:

None

babylon.intelligence.rag.exceptions.LifecycleError

alias of RagError

babylon.intelligence.rag.exceptions.InvalidObjectError

alias of RagError

babylon.intelligence.rag.exceptions.StateTransitionError

alias of RagError

babylon.intelligence.rag.exceptions.CorruptStateError

alias of RagError

babylon.intelligence.rag.exceptions.PreEmbeddingError

alias of RagError

babylon.intelligence.rag.exceptions.PreprocessingError

alias of RagError

babylon.intelligence.rag.exceptions.ChunkingError

alias of RagError

babylon.intelligence.rag.exceptions.CacheError

alias of RagError