Skip to main content

Page 5 — Prompt Flow & Agents

The Prompt Flow page is the control center for customizing how Intugle's AI agents think, reason, and respond to your questions. This is where you fine-tune the AI to understand your specific business context, terminology, and data.

Admin access required

To edit prompts, concepts, few-shots, and metadata, you must enable the Admin toggle (top-right corner). Without it, you can view but not modify configurations.


Understanding the Prompt Flow System

When you ask Intugle a question, here's what happens behind the scenes:

┌─────────────────────────────────────────────────────────────────────┐
│ YOUR QUESTION │
│ "What were our top products last quarter?" │
└─────────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────────┐
│ ORCHESTRATION AGENT │
│ • Reads your question │
│ • Checks Universal Instructions (global rules) │
│ • Decides which specialist agent(s) to call │
└─────────────────────────────────────────────────────────────────────┘

┌─────────────┼─────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ MetaData │ │ Data │ │ Semantic │
│ Analysis │ │ Analysis │ │ Graph │
└───────────┘ └───────────┘ └───────────┘
│ │ │
└─────────────┼─────────────┘

┌─────────────────────────────────────────────────────────────────────┐
│ AI REFERENCES: │
│ • Analytics Catalog → Business concept definitions │
│ • Few-Shots → Example Q&A pairs for similar questions │
│ • Metadata → Table/column descriptions and relationships │
└─────────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────────┐
│ YOUR ANSWER │
│ "Based on your sales data, the top 5 products by revenue were..." │
└─────────────────────────────────────────────────────────────────────┘

Page Layout

The page has four tabs across the top:

TabPurpose
Agent ConfiguratorEdit the prompts that control how each AI agent behaves
Few-ShotsCreate example Q&A pairs to train the AI
Analytics CatalogDefine business concepts and metric formulas
MetadataView and edit table/column descriptions

Global Controls (Top-Right)

ControlWhat It Does
Subscription toggleSwitch between subscription views
Admin toggleEnable edit mode for all configurations
+ Add LLM ModelConnect additional AI models (GPT-4, Claude, Gemini, etc.)

Tab 1 — Agent Configurator

The Agent Configurator lets you customize the system prompts that control how each AI agent processes your questions.

Agent Configurator tab

Three-Panel Layout

PanelWhat It Shows
Left: CategoriesList of all AI agent types
Center: Subcategories & TasksThe specific tasks within each agent
Right: Prompt EditorView/edit the actual prompt text

Agent Categories Explained

Each agent is a specialist that handles a specific type of task:

AgentRoleWhen It's Called
Orchestration AgentThe "manager" — decides which specialist to callEvery question goes through this first
Semantic Graph AgentNavigates table relationshipsWhen questions involve multiple related tables
MetaData AnalysisUnderstands table structureWhen the AI needs to know what columns exist
Data AnalysisWrites and runs SQL queriesWhen you ask for specific data or metrics
Data TransformationCleans and reshapes dataWhen data needs formatting or aggregation
Link DiscoveryFinds hidden relationshipsWhen discovering new table connections
Document SearchSearches uploaded documentsWhen questions relate to PDFs, Word docs, etc.
Web SearchSearches the internetWhen contextual web information is needed

How to Edit an Agent Prompt

  1. Click an agent category (left panel)
  2. Select a subcategory (center panel)
  3. Choose a task (center panel)
  4. Edit the prompt in the Prompt Editor (right panel)
  5. Click Save — changes take effect immediately

Tab 2 — Few-Shots

Few-Shots are example question-and-answer pairs that teach the AI how to handle specific types of queries for your business.

Few-Shots tab

Why Few-Shots Matter

Without few-shots, the AI might:

  • Use the wrong table for a query
  • Misunderstand business terminology
  • Calculate metrics incorrectly

With few-shots, you show the AI: "When someone asks THIS, here's exactly how to answer."

Few-Shot Card Details

Each card shows:

FieldDescription
NameDescriptive title (e.g., "Customer 360 Query")
Status🟢 Active (AI uses it) or 🔴 Inactive (disabled)
Table TagsWhich data tables this example references
Created ByWho authored this few-shot

Top-Right Actions

ButtonWhat It Does
Find SimilarIdentifies duplicate or overlapping few-shots
Import/ExportBulk import/export few-shots as JSON or CSV
Run AllTests all active few-shots to verify they still work
+ New Few-ShotCreate a new example Q&A pair

Creating a New Few-Shot

  1. Click + New Few-Shot
  2. Enter a question — the type of query users might ask
  3. Enter the ideal answer or SQL query the AI should generate
  4. Select which tables are involved
  5. Set status to Active
  6. Click Save

Tab 3 — Analytics Catalog

The Analytics Catalog is a library of business concepts and metric definitions that the AI references when answering questions.

Analytics Catalog tab

What is a Concept?

A concept is a business term with a defined meaning. For example:

Concept NameDefinition
Customer Churn"Customers who cancelled their subscription in the last 30 days, calculated as cancelled / total active"
Net Revenue Retention"Revenue from existing customers this period / revenue from same customers last period × 100"
Top Products"Products ranked by total order value, excluding returns and refunds"

Why the Catalog Matters

Without catalog entries, asking "What's our churn rate?" might give inconsistent results because the AI doesn't know YOUR specific definition. With a catalog entry, it always uses your formula.

Top-Right Actions

ButtonWhat It Does
Universal InstructionsSet global rules that apply to ALL concepts and AI responses
Find SimilarFind duplicate or overlapping concepts
Import/ExportBulk import/export concepts
+ New ConceptCreate a new business concept definition

Universal Instructions

Click Universal Instructions to open a dialog where you can set global rules that apply to ALL AI interactions:

Universal Instructions dialog

FieldDescription
Instruction ContentGlobal rules the AI follows for every query (e.g., "Always report currency in USD", "Use fiscal year starting April 1")
Change NoteOptional description of what you changed (for version history)
Version History tabView previous versions of the instructions

Creating a New Concept

  1. Click + New Concept
  2. Enter a concept name (e.g., "Monthly Active Users")
  3. Write a description explaining what this metric means and how to calculate it
  4. Set status to Active
  5. Click Save

Tab 4 — Metadata

The Metadata tab provides a spreadsheet-like view of all your data tables, columns, relationships, and descriptions.

Metadata tab

Page Header Summary

Metadata Management
Excel-like view for all column metadata and table relationships
19 tables · 192 columns · 35 links

This tells you exactly how much data the AI has access to.

Three Sub-Tabs

Sub-TabWhat It Shows
Table MetadataAll tables with domain, name, description, row/column counts
Column MetadataEvery column across all tables with types and descriptions
Table RelationshipsForeign-key links between tables

Table Metadata Columns

ColumnDescription
DomainBusiness domain (Marketing, Sales, Products, Support)
Table NameThe actual table name in your database
GlossaryAI-generated description of what the table contains
Table TypeSource = raw data table
Row CountNumber of rows
Column CountNumber of columns

Top-Right Actions

ButtonWhat It Does
Usecase SummaryView a summary of use cases across your data
HistorySee change history of metadata edits
Commit ChangesSave and apply any edits you've made
Profile dropdownSwitch between metadata profile views
Columns dropdownShow/hide columns in the grid

Editing Metadata

Click any cell to edit it directly:

  • Edit Glossary descriptions to help the AI understand table contents
  • Change Domain assignments to re-classify tables
warning

Click Commit Changes (red button) after editing — changes are NOT saved automatically.


How It All Works Together

Here's a complete example of how Prompt Flow components work together:

Scenario: User asks "What's our customer churn this quarter?"

  1. Orchestration Agent receives the question
  2. It checks Universal Instructions for global rules
  3. It routes to MetaData Analysis to find relevant tables
  4. MetaData Analysis checks the Metadata tab and finds customers, subscriptions tables
  5. The system checks the Analytics Catalog and finds a "Customer Churn" concept definition
  6. It checks Few-Shots for similar questions that have been answered before
  7. Data Analysis agent writes a SQL query using:
    • The concept definition (how to calculate churn)
    • The metadata (which tables/columns to use)
    • Any matching few-shot examples
  8. The query runs and returns results
  9. The answer is formatted and returned to the user

Best Practices

For Agent Prompts

  • Keep prompts concise and specific
  • Include examples of expected behavior
  • Test changes with real questions before deploying

For Few-Shots

  • Create few-shots for your most common questions
  • Include variations of how users might ask the same thing
  • Run "Run All" periodically to catch broken examples

For Analytics Catalog

  • Define ALL your key business metrics
  • Be specific about calculation methods
  • Include edge cases (e.g., "exclude returns from revenue calculations")

For Metadata

  • Write clear, business-friendly descriptions for every table
  • Keep descriptions up-to-date when schemas change
  • Use consistent domain classifications