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.
