Skip to main content

Asking Questions

Choose a Mode

On the Home page, you can ask questions or data requests and get AI-generated answers from your data. Wren AI supports two modes that change how you ask questions:

  • Ad-hoc Mode: One-shot execution. Best for well-defined requests. Wren AI generates SQL and returns results directly.

Choose a Mode

  • Interactive Mode: Guided conversation. Wren AI may clarify your intent and confirm steps before running SQL. Choose a Mode

Ad-hoc Mode

Switch to Ad-hoc Mode by selecting the tab on the left of the question box. Enter your question in the question box and click the Send button.

Wren AI classifies your questions into three categories: Data Retrieval Requests, Database Schema Exploration, and Out-of-Scope Queries. This helps you get the most relevant data. If Wren AI is unable to generate a query, it will guide you to refine your question for better results.

Ask Questions

Enter your questions in the question box and click the Ask button. ask

Data Retrieval Requests

These questions are clearly defined and can be directly converted into SQL queries to fetch data. For data retrieval requests, Wren AI will provide:

  • A concise summary of the insights from your data
  • An option to visualize the data where applicable. See Generate Chart for more details about chart options and possible adjustments.
  • An option to view the detailed SQL breakdown and generation process. See Understanding SQL Breakdown for more details.

ask_result

When your question is clear, Wren AI will provide a summarized answer with relevant data insights.

ask_clarification

If your question lacks clarity, Wren AI will ask for further details and suggest alternative questions you might consider.

Database Schema Exploration

This feature allows you to inquire about the database's structure, such as requesting lists of tables, descriptions of table schemas, or explanations of relationships between tables. It provides detailed information to help you understand and navigate the database schema effectively.

Example questions you can ask:

  • "What tables do I have?"
  • "What can I ask?"
  • "Explain the customer table to me."
  • "How many tables do I have?"

ask_data_schema_exploration

These questions assist you in obtaining a list of available tables, comprehending the relationships between them, and acquiring detailed information about specific tables and their columns.

Additionally, Wren AI will offer suggested questions that can be turned into queries to get results.

Out-of-Scope Queries

These inputs are unrelated to the database schema or data retrieval, such as casual greetings or questions beyond the system's intended functionality. In such cases, the system will prompt you to provide more specific information or clarify your intent.

ask_hello

Additionally, Wren AI will provide why it cannot answer your question and also provide a list of recommended questions that might be relevant to your question.

What if I'm asked to clarify my question?

If your question is unclear or not relevant to your data, you may receive a system prompt stating Clarification needed. This means you need to rephrase your question to make it more specific or relevant. Wren AI will provide why it cannot answer your question.

If your question is similar to a previously saved view's query, Wren AI will first search through views you saved, if there is no related SQL based on stored views, it will generate SQL queries based on the context it collects.

Answer Details

After Wren AI generates an answer, you will be redirected to a thread page to view answer details.
See Know your answers to find out what answer contents you will get.

Follow-up Questions

In each thread, you can ask following questions to continuously refine your requests and get more precise results.
See Know your answers for more details.

Interactive Mode

Switch to Interactive Mode by selecting the tab on the left of the question box. Enter your question in the question box and click the Send button.

How Interactive Mode Processes Your Question?

How Interactive Mode Processes Your Question

When you ask a question in Interactive Mode, Wren AI automatically follows several steps to find the most accurate insights for you.

  1. Receive and understand your question

    Wren AI first interprets your natural language question and identifies what you are asking for, such as ranking, comparison, or trend analysis.

  2. Apply relevant instructions

    It checks if there are any predefined instructions or business rules (for example, "exclude canceled or unavailable orders") that should be applied before generating the query.

    See Instructions for more details about how instructions affect query logic, filtering rules, and output behavior.

  3. Recognize user intent

    The system detects the intent behind your question, such as "find top cities by order count," and determines what type of data and logic are needed.

  4. Select candidate tables and models

    Wren AI scans your connected datasets to find the most relevant tables (e.g., orders, customers, products) needed to answer your question.

  5. Build and optimize the query

    It automatically constructs the SQL query:

    • Joins the necessary tables
    • Applies filters and calculations
    • Aggregates and sorts the data
  6. Generate and execute SQL

    Once the query logic is finalized, Wren AI generates the SQL, runs it securely, and fetches the results.

  7. Preview and visualize results

    You can then preview the data, explore insights, and ask follow-up questions directly in the same chat without restarting the conversation.

On the right panel, you can view the corresponding data preview and SQL query generated for your question. Click View Data to open the panel.

Right Panel

Ask Follow-Up Questions

You can click "Recommend few questions to ask next" above the question box to generate more follow-up questions and continue exploring your data naturally.

Ask Follow-Up Questions

If your question is vague and does not specify the metric, table, or context, Wren AI will suggest several related and more specific questions for you to choose from, helping you clarify your intent and find the right insight faster.

Vague Question

Suggested Instructions

When Wren AI detects patterns or best practices in your queries, it automatically provides Suggested Instructions to help you improve accuracy or maintain consistency.

For example, it may suggest adding grouping, filtering, or aggregation logic, such as:

Group by both hotel name and city to show the number of reviews and average score for each hotel individually.

You can choose to:

  • Save to knowledge — store the instruction for future use across similar questions.
  • Ignore — dismiss the suggestion.
  • Edit — adjust the instruction before saving.

This helps your team standardize query behavior and enforce consistent logic without manually configuring every instruction.

Suggested Instructions

Generate and Refine Charts

Click "Generate a chart for me" above the question box, or type a chart-related command directly. Wren AI will create a relevant visualization for your data.

The system automatically determines the most suitable chart type based on the dataset.

Generate a chart for me

You can then refine or adjust the chart through follow-up instructions, for example, changing a bar chart to yellow.

Change color

Click View Chart or View Data to open the panel. A Chart tab will appear on the right side, allowing you to switch between the chart and data preview.

Recommended Questions

In the center of the Home page, we will show recommended questions that are generated by AI based on the data models, including user-defined semantics and relationships. These recommendations are designed to help you explore your data more effectively and discover insights you might not have thought to ask about.