An open source Flask chatbot sample uses Automated Reasoning checks findings to rewrite LLM answers in a loop, ask clarifying questions, and keep an audit log of validity proofs.
Who it is for
Teams building Bedrock chatbots in regulated settings that need verifiable, auditable answers to yes/no questions.
Key points
Sample is in the Bedrock Samples repository and needs an Automated Reasoning policy created in Bedrock first.
Findings are prioritized: TRANSLATION_AMBIGUOUS, IMPOSSIBLE, INVALID, SATISFIABLE, VALID; the loop accepts only VALID answers.
Audit log records VALID_RESPONSE and MAX_ITERATIONS_REACHED events with prompts, responses, model ID and findings.
AI:Adjudicated Query pattern: a chat agent in AWS Quick calls six bounded MCP tools over a deterministic rules engine, so pass/fail decisions stay non-AI while Bedrock is used only for exploratory clause search.
AI:Bedrock Knowledge Bases metadata filters applied before vector search, plus document-level metadata added to chunks, raised correct answers on a contract question in AWS's CUAD test.
AI:Bedrock AgentCore now underpins a sample multi-agent M&A due diligence system with four specialist agents, a knowledge base, memory, and a citation-check evaluator, deployable with one command.