Add Hints to Assist Query Building

Add example questions as hints to help the application understand user intent and generate accurate responses.

Add Hints for Query Processing

Hints serve as a reference for the LLM model to construct relevant SQL queries during conversations.

Special Cases

Add Natural Language Input

Enter sample questions in natural language that users may ask while interacting with the application. These inputs help the system understand typical questions and improve query accuracy.

Example: What is the compensation trend for sales employees in the last quarter?

Add SQL Query

Provide the corresponding SQL query for each hint. This acts as a reference for the LLM model to generate structured queries dynamically.

Example:

SELECT compensation, department, region 
FROM employee_data 
WHERE department = 'Sales' 
AND date BETWEEN 'last quarter start' AND 'last quarter end';

Show Hints in Conversations

Each hint row has a checkbox: Use this as a suggestion during conversations.

The top four selected hints will be prioritized and shown to users as suggested questions in the conversation.

Parameterized Queries

This option allows pre-defined SQL queries with parameters to be stored, matched against user questions, and executed with dynamically extracted parameter values. It improves response time by avoiding SQL generation for common queries.

Add Query

Select Add Query option and provide the below details in the Add new query window.

Purpose

Enter the purpose of this query answer. For example: What is the total car unit sales for the Mahindra brand in 2024?This will give the total sum of car unit sales for the Mahindra brand in 2024.

Parameterized Query Name

Provide the Parameterized Query Name. For example: Total car sales in a year for a brand

SQL Query

Provide SQL Query. Use: paramName syntax for parameters

For example:

SELECT car_brand,sum(total_unit_sales)  
from gathr.car_sales where car_brand=':brand' and year=':sale_for_year_yyyy' and ( '' = ':sale_for_month' or month=':sale_for_month')
group by car_brand, year

Top