MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Onboarding UI
First Query

First Query

The First Query page provides an interactive, guided demonstration of the MATIH conversational analytics experience. Users compose their first natural language question, see the AI generate SQL, visualize results, and experience the full query lifecycle in a supported environment.


Page Layout

The First Query page (FirstQueryPage.tsx) is divided into two panels:

PanelContent
Left (guidance)Step-by-step instructions, suggested queries, tips
Right (interactive)Chat interface with embedded results panel

Guided Experience

The page walks users through the query lifecycle in four stages:

Stage 1: Ask a Question

The user types a natural language question in the chat input. Suggested queries are provided based on the connected schema or sample dataset:

PersonaSuggested Queries
Data Analyst"What were our top 10 products by revenue last month?"
Data Engineer"Show me tables with the most null values"
ML Engineer"What features are most correlated with customer churn?"
Executive"How does this quarter compare to last quarter?"
Developer"List all API endpoints and their response times"

Stage 2: Watch the AI Work

The interface shows the agent pipeline processing the query in real-time:

StepDisplay
Intent classification"Understanding your question..."
Schema retrieval"Finding relevant tables..."
SQL generation"Writing SQL query..." with syntax highlighting
Execution"Running query..." with progress indicator
Visualization"Creating visualization..."

Stage 3: Explore Results

Results are displayed with interactive elements:

interface QueryResult {
  sql: string;
  data: {
    columns: string[];
    rows: any[][];
  };
  visualization: {
    type: string;
    config: object;
  };
  insights: string[];
  explanation: string;
}
ElementInteraction
SQL queryExpandable code block with copy button
Data tableSortable columns, pagination
ChartInteractive chart with hover tooltips
InsightsAI-generated observations about the data

Stage 4: Refine and Follow Up

Users are encouraged to try refinement actions:

ActionExample
Modify filter"Show only US customers"
Change chartClick to switch between bar, line, pie
Drill down"Break this down by region"
ExportDownload results as CSV or PNG

Sample Dataset

For users who skipped the connection setup, a sample dataset is provided:

TableRowsDescription
sample.orders10,000E-commerce order data
sample.customers1,000Customer demographics
sample.products200Product catalog
sample.regions50Geographic regions

Progress Indicators

Visual cues guide the user through the experience:

IndicatorPurpose
Step counterShows current step (1 of 4)
CheckmarksCompleted steps are marked
Highlight pulseDraws attention to the next interactive element
Tooltip hintsContextual help on hover

Completion

After completing the first query, the user sees a summary:

  • Congratulations message
  • Recap of what they accomplished
  • Quick links to the main workbench, dashboard builder, and documentation
  • Option to try more queries or proceed to the platform

Analytics

EventDescription
onboarding.first_query.viewUser reached the first query page
onboarding.first_query.suggestedUser selected a suggested query
onboarding.first_query.customUser typed a custom query
onboarding.first_query.completeUser completed the first query
onboarding.first_query.refineUser tried a follow-up refinement