Skip to main content

Prism AI Behavioral Modes

Prism AI automatically adapts its behavior based on your request. While you control permissions via the mode selector (Readonly, Approve, Auto), the AI determines the best behavioral approach for your task.

You can guide the AI by mentioning modes in your message: "Switch to Ask Mode" or "Use Agent Mode for this task".


Agent Mode (Default)

Autonomous assistant for multi-step tasks.

Best for:

  • "Optimize this query for cost"
  • "Find tables with customer data"
  • "Fix this syntax error"

Capabilities:

  • Executes multi-step tasks end-to-end
  • Proposes SQL changes with diff preview
  • Asks for approval before modifications

Example:

You: Optimize @Tab 1 for cost

Prism AI:
Current cost: $0.45
Optimizations:
1. Column pruning (SELECT specific columns)
2. Partition filter (last 30 days)
3. Join reordering

New cost: $0.06 (87% savings)
Apply?

Ask Mode

Read-only Q&A without modifications.

Best for:

  • "What does PARTITION BY do?"
  • "Explain this window function"
  • "Is there a more efficient way?"

Does NOT:

  • Run queries
  • Modify SQL
  • Update tabs

Ask Mode can still read schemas and context you provide via @ mentions.

Example:

You: What does this window function do?

Prism AI:
This calculates a running total per user:
- PARTITION BY user_id: separate totals per user
- ORDER BY order_date: accumulate chronologically
- SUM(...): adds amounts from first row to current

Plan Mode

Design-first approach for complex tasks.

Best for:

  • "Plan migration from v1 to v2 schema"
  • "How should I restructure this pipeline?"
  • "Design a rollout plan"

How it works:

  1. Creates step-by-step plan with rationale
  2. Waits for your approval
  3. Executes sequentially after approval

Example:

You: Plan optimization of this 200-line query

Prism AI:
Optimization Plan (7 steps):
1. Profile current query - identify expensive parts
2. Extract repeated scans to CTEs
3. Add partition filters
4. Replace SELECT * with columns
5. Optimize join order
6. Convert subqueries to joins
7. Benchmark before/after

Expected: 70-80% cost reduction

Approve?

Debug Mode

Specialized error diagnosis.

Best for:

  • "Why am I getting 'Column not found'?"
  • "Fix this syntax error"
  • "Why is this returning duplicates?"

Provides:

  • Root cause analysis
  • Corrected SQL
  • Prevention tips

Example:

You: Why am I getting 'No matching signature for +'?

Prism AI:
Diagnosis: Type mismatch
Root cause: '10' is STRING, cannot add to NUMERIC

Fix:
10 + discount_amount -- not '10'

Prevention: Use numbers without quotes

Behavioral Mode Comparison

ModeExecutesModifies SQLBest For
AgentYesWith approvalMulti-step tasks
AskNoNoLearning, explanations
PlanAfter approvalWith approvalComplex migrations
DebugNoSuggests fixesError diagnosis

The AI chooses these behaviors automatically based on your request. Your permission mode (Readonly/Approve/Auto) controls whether the AI can act on its decisions.