Agentic-RAG-Platform

Failure states — the taxonomy the system can end in

Generated from src/core/failures.py (17 states); a unit test enforces the table stays equal to the enum. Every terminal path in the agent maps to exactly one of these — safe refusals are behaviors, not failures.

State User-safe message (truncated)
no_documents I couldn’t find any documents matching your question.
irrelevant_documents The documents I found don’t seem relevant to your question.
insufficient_evidence I don’t have enough evidence to answer this confidently.
conflicting_sources I found conflicting information in the sources and cannot give a definitive answer.
outdated_sources The only sources I found are outdated.
tool_failure A required tool failed. Please try again.
db_failure The database is temporarily unavailable. Please try again.
embedding_failure I couldn’t process your query. Please rephrase it.
llm_timeout The model is taking too long. Please try again.
rate_limit We’re being rate-limited by the model provider. Please try again in a moment.
malformed_response I received a malformed response from the model. Please try again.
corrupted_document One of the source documents appears corrupted.
retrieval_timeout Retrieval took too long. Please try a simpler query.
agent_loop I’m having trouble reasoning through this. Could you rephrase?
hallucination_detected I generated an answer I cannot verify. Withholding response.
citation_mismatch I couldn’t verify my citations. Withholding response.
unsafe_content I generated a response that may contain unsafe content. Withholding response.