Skip to content

Query Modes

Tursio allows users to query data in two modes: (1) auto-prompting and (2) research.

Auto Prompting

Auto-prompting mode is a guided search experience that helps users build natural language questions fragment by fragment. Instead of typing a full query at once, the system breaks it down into manageable fragments and guides the user through constructing questions that are valid and generate 100% accurate responses.

This mode is best when users are non-experts, new to the dataset, or unsure what questions to ask. Auto-prompting guides them step by step in building a query based on the underlying semantic model. Think of it as a vibe coding assistant that constructs the right question to get the right data — without needing to know the details.

How It Works

  1. Choose the Question Type: Start by selecting the kind of question to ask:
    • List — Retrieve specific records.
    • Show — Display aggregated values.
    • Compare — Compare measures across categories.
    • Trend — Explore changes over time.
    • And others as well.
  2. Select a Table:
    • Based on the question type (e.g., List), the system guides users to choose the relevant table from their connected database.
  3. Pick Measures and Columns:
    • Depending on the flow, users will be prompted to select:
      • Measures (numeric columns such as sales, revenue, counts) — either pre-computed or dynamically aggregated.
    • Levels (categorical columns such as region, category, product).
  4. Apply Filters (Optional): Users can refine results using guided filters such as:
    • Include / Exclude values.
    • Greater than / Less than conditions.
    • Specific dates or ranges.
    • Custom values on the fly.
  5. Aggregation Options (for numeric data): For Compare or Show type questions, the system suggests possible aggregations:
    • Minimum (MIN), Maximum (MAX), Average (AVG), Total (SUM)
  6. Level of Grouping (Optional):
    • For questions like Show, users can further refine results by grouping (e.g., "Show total sales by Region").

Screenshot

Examples

  • Compare Question
    • Step 1: Select Compare.
    • Step 2: Choose a measure column (e.g., Revenue).
    • Step 3: Apply aggregation (e.g., Average Revenue).
    • Step 4: Select another column to compare (e.g., Region).
  • Show Question
    • Step 1: Select Show.
    • Step 2: Pick a numeric column (e.g., Sales).
    • Step 3: Choose aggregation (e.g., Total Sales).
    • Step 4: Group by a categorical column (e.g., Product Category).

Benefits

  • Eliminates guesswork when forming queries.
  • Provides a guided, interactive way to ask natural language questions.
  • Ensures consistency in how queries are structured.
  • Makes it easier for non-technical users to explore data.
  • Allows controlling what kinds of queries users and roles can ask.

Research

Research mode allows users to type their question in free-form natural language, and Tursio immediately processes it to provide an answer.

This mode is best when users prefer asking questions as they would naturally speak. Tursio interprets the questions and generates backend queries. The responses are probabilistic but deterministic — the same question will always produce the same answer.

Query Cache

When a user enters a question, Tursio first checks if the exact or a similar query was asked before. If found in the query cache, the cached results are returned instantly. This makes answering common or repeated questions much faster.

Query Processing

If the question is new and not in the cache, Tursio performs an intelligent multi-step process to understand and answer it:

  1. Identify Relevant Data Models. Tursio infers all the data tables and datasets involved based on the question's context.
  2. Detect Operators. Different parts of the question — such as filters ("last month"), aggregates ("total sales"), groupings ("by city"), and ordering ("top 10") — are recognized and extracted.
  3. Consolidate for SQL Generation. The recognized tables, operators, and conditions are combined to form a coherent query plan and the corresponding SQL that reflects the natural language question.

Query Hints

  • Tursio provides hints and suggestions for filters and aggregates it has inferred, highlighting these parts in the question. These fragments are highlighted in blue.
  • Uninterpreted Fragments: Parts of the question that are relevant but could not be interpreted are underlined in red.
  • This helps users see how Tursio understands their intent and adjust the question if needed for better results.

Screenshot

Semantic Reasoning

When Tursio cannot directly answer a question due to missing or incomplete information in the user query, it automatically switches to semantic reasoning mode. This mode provides additional explanation and guidance based on the available information and context.

Screenshot

What Happens in Semantic Reasoning Mode?

  • Contextual Analysis: Instead of providing a direct answer, Tursio analyzes the question and current dataset to explain what data is missing or why the answer cannot be generated precisely.
  • Column and Data Review: The system lists which columns or fields exist in the dataset and highlights the absence of attributes needed to address the question.
  • Rephrasing and Suggestions: Where possible, Tursio provides a rephrased version of the question that better matches the available data, helping users adjust their query or recognize what additional information is needed.
  • Transparency: By detailing gaps or limitations in the data, semantic reasoning mode ensures users understand not only what can be answered but also why certain requests cannot be fulfilled.

When Is This Useful?

Semantic reasoning mode appears when questions require data that is not present or not explicitly tracked in the dataset (for example, delivery status, timelines, or performance metrics). Tursio guides users to rephrase or rethink their analysis using available columns and indicates if additional or refined query inputs are required.