Minimalist 'NLQ' graphic with search bar, network patterns, and Amity Solutions logo.
Touchapon Kraisingkorn
min read
July 5, 2024

Discover the Power of Natural Language Queries (NLQ)

In today's data-driven world, the ability to analyze and interpret data efficiently is crucial for making informed decisions. However, not everyone has the technical expertise to write complex database queries. 

This is where Natural Language Query (NLQ) comes into play. NLQ allows users to ask questions about data using everyday language, making data analysis accessible to a broader audience.

Understanding Natural Language Query (NLQ)

Natural Language Query (NLQ) is a technology that enables users to interact with databases using natural human language, either spoken or typed. Instead of writing complex SQL queries, users can simply ask questions in plain English, such as "What were our sales figures last quarter?" NLQ systems leverage Large Language Models (LLMs) with agentic workflows to transform user queries into SQL queries. 

This involves several prompt engineering techniques that allow the LLM to understand the user's query, the database schema, and the meaning of each database column. The results are then presented in a user-friendly format, such as text, charts, or reports.

Benefits of NLQ


NLQ makes data analysis accessible to a wider audience within an organization, including executives who may not have SQL skills. For example, an executive can use a chat interface to ask, "What is our current revenue?" and receive an immediate response. This accessibility ensures that valuable insights are available to decision-makers at all levels, fostering a culture of informed decision-making.

The Eko model generates results about last-6months revenue
Last-6 months-revenue generated by Eko


NLQ offers a flexible way to query and interact with data. Unlike traditional methods that require setting up charts and dashboards beforehand, NLQ translates user requests into SQL queries on the fly. 

For instance, a sales manager can ask, "Show me the sales trends for the last six months," and then follow up with, "Compare this to the same period last year." The NLQ system can dynamically generate comparative reports, allowing users to explore data in a more intuitive and responsive manner.

Deeper Insights

As a tool of agentic generative AI, NLQ can provide deeper insights by combining query results with further research from other sources. 

For example, a marketing team might ask, "What are the key factors driving customer satisfaction?" The NLQ system can not only provide relevant data but also analyze it using large language models to offer summaries and actionable insights. This capability enhances the depth and quality of information available to users.

Use Cases of NLQ

Retail Sales Management

A sales manager at a retail company can use NLQ to get up-to-date information and analysis from their sales figures. 

For example, they can ask, "What were our top-selling products last month?" and receive an immediate, detailed report. This allows them to make timely decisions about stock levels, promotions, and sales strategies.

The Eko model generates results about top-selling product data
Top-selling product data generated by Eko
The Eko model generates results about top 10-selling products
The top 10-selling products generated by Eko

Executive Decision-Making

Company executives can use NLQ to gain a comprehensive view of their business operations. 

For instance, an executive might ask, "What is our current financial status?" and receive a detailed overview of revenue, expenses, and profit margins. This holistic view enables executives to make strategic decisions based on real-time data.

Customer Relationship Management (CRM)

In the realm of CRM, sales, business development, and customer success teams can use NLQ to quickly query the latest information about their customer base. 

For example, a sales representative might ask, "Which customers have not made a purchase in the last six months?" and receive a list of inactive customers to target for re-engagement campaigns. This capability enhances customer relationship management by providing timely and actionable insights.

A sales data report shows executive summary, and introduction
Sales Data Report generated by Eko
Model Eko generates sales data report including the topic 'top 10 most profitable products
The top 10 Most Profitable Products generated by Eko


Natural Language Query (NLQ) is revolutionizing the way we interact with data. By transforming natural language into database queries, NLQ makes data analysis accessible, flexible, and insightful. 

Whether it's a sales manager analyzing retail performance, an executive making strategic decisions, or a CRM team managing customer relationships, NLQ empowers users to harness the power of data without needing technical expertise. As businesses continue to prioritize data-driven decision-making, the importance of NLQ will only grow