Skip to main content

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.

Arivu’s intelligent query resolving utilizes a sophisticated LangGraph pipeline that abstracts schema ingestion, LLM execution, error verification, and memory logging. The system is designed for granular observability and deterministic human feedback.
The pipeline is the core engine that transforms natural language into secure, verified SQL operations.

Pipeline Lifecycle

Query Intake

Capture raw user intent with metadata context (database engines, session memory, user context).

SQL Generation

Convert the parsed intent using LLMs with knowledge of exact relational schemas.

Verification

Evaluate generated SQL for:
  • Syntax validity - Is the SQL correct?
  • Safety checks - Blocks destructive operations (DROP, DELETE, etc.)
  • Schema validation - Prevents hallucinated columns/tables

Execution & Memory

Execute approved queries and sync results to the internal memory system for session context.

Graph Inspection

Arivu compiles the pipeline into a LangGraph for transparent execution tracking. Inspect it locally:
from arivu.pipeline import get_compiled_graph

graph = get_compiled_graph()

# Print ASCII visualization
print(graph.get_graph().draw_ascii())

# Export as Mermaid diagram
print(graph.get_graph().draw_mermaid())

Key Concepts

State Management

The pipeline maintains a shared state dictionary that flows through each node:
  • User query and session context
  • Generated SQL candidates
  • Verification results
  • Final response and metadata
When verification fails, the pipeline:
  1. Captures the error
  2. Provides feedback to the LLM
  3. Automatically attempts correction
  4. Re-verifies the corrected SQL
Every pipeline execution is tracked in your memory backend:
  • Timing metrics for each node
  • Token usage for LLM calls
  • Full state history for debugging
  • User session context preservation
Use the Arivu Dashboard to visualize pipeline execution traces and performance metrics in real-time.