Arivu provides two distinct human-in-the-loop mechanisms out of the box: Admin Approvals (to protect database integrity) and RLHF (Reinforcement Learning from Human Feedback, to align AI generation quality).Documentation Index
Fetch the complete documentation index at: https://arivu.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Admin Approval Gate
Pauses destructive queries (
UPDATE, DELETE, DROP) until a verified administrator explicitly approves the execution.RLHF Signals
Collects user sentiment and routes it back into the memory node for telemetry tracking and future prompt optimization.
1. The Admin Approval Gate
When theArivu engine is parameterized with mode="user", the internal LangGraph state machine automatically restricts data-modifying SQL queries.
Instead of running blindly, the query_verifier node delegates control to the admin_approval node. The pipeline halts execution, writes the SQL payload to pending memory, and returns early.
Architecture Flow
Pipeline Intervention
The pipeline identifies the destructive intent and outputs a
PipelineResult with pending_approval = True, keeping the user context perfectly preserved.Implementing Approvals via SDK
If you’re building a custom client (or extendingarivu.integrations.BaseIntegration), you manage the pending state manually using Arivu’s Memory singleton:
2. Dynamic RLHF Integration
RLHF ensures your Text-to-SQL logic converges strictly onto your users’ intents over time. If a user corrects the bot (e.g., “No, I meant total gross revenue, not net”), capturing that correction prevents identical hallucinations later.Feeding execution signals
You inject sentiment back into the graph when issuingrun_pipeline(). The rlhf_signal can be a binary sentiment or a comprehensive text explanation.
The
rlhf_feedback LangGraph node executes entirely downstream of the response_generator. Injecting RLHF signals adds zero blocking latency to your conversational UX.
