The problem: the data is there, but nobody uses it #
Every company has valuable data in its databases: orders, customers, production, inventory, accounting. But extracting useful information requires someone who can write SQL — and in most European SMEs, that person is one of a kind (if they exist at all).
The data bottleneck #
The typical cycle in SMEs:
- The sales manager has a question: “Which products had a negative margin in Q1?”
- They ask IT or the analyst to write a query
- The analyst has other priorities — they respond in 2–3 days
- The answer arrives but raises new questions
- The cycle starts over
Result: decisions are made without data, or with data that is weeks old. According to McKinsey, data-driven companies are 23% more likely to acquire customers and 19% more profitable. But being data-driven requires that everyone can access the data — not just those who can write SQL.
What is Natural Language to SQL #
Natural Language to SQL (NL2SQL or text-to-SQL) is a technology that uses AI models to convert natural language questions into SQL queries.
How it works #
- The user asks a question in natural language: “How many orders did we receive in February from customers in the Veneto region?”
- The AI model analyzes the question, mapping it to the database schema (tables, columns, relationships)
- It generates an equivalent SQL query:
SELECT COUNT(*) FROM ordini JOIN clienti ON ... WHERE data >= '2026-02-01' AND regione = 'Veneto' - It executes the query on the database and returns the results in a readable format (table, chart, text)
The process takes seconds. The user never sees the SQL code (unless they want to).
The evolution of text-to-SQL models #
NL2SQL technology has been around for years, but the latest generation of models has transformed its performance:
| Generation | Accuracy | Limitations |
|---|---|---|
| Rule-based (2015–2019) | ~50% | Simple queries only, fixed schema |
| Transformer fine-tuned (2020–2023) | ~70% | Requires schema-specific training |
| General-purpose LLM (GPT-4, 2023–2024) | ~80% | High cost, data sent to cloud |
| Optimized LLM + RAG (2025–2026) | 85–92% | Requires dedicated infrastructure |
Today’s models handle complex joins, subqueries, aggregations, and schemas with dozens of tables — cases that just two years ago required an expert SQL analyst.
The privacy risk: why the cloud is a problem #
Most text-to-SQL solutions on the market work like this: you send the database schema (table names, columns, relationships) and the question to a cloud server, the model generates the query, and sends it back.
What ends up in the cloud #
- Database schema: the complete structure of your data — table names like
employee_salaries,product_margins,delinquent_customers - The questions: “Which employees earn more than 50,000 euros?” reveals sensitive information even without accessing the actual data
- The results: if the service executes the query for you, the actual data transits through the provider’s servers
Under GDPR, a database schema can contain personal data (table and column names that identify individuals). And the question itself can reveal confidential information about business strategy.
38.4% of AI solutions fail to protect data #
According to an HTX study, 38.4% of enterprise AI implementations do not implement adequate data protections. In text-to-SQL the risk is amplified: you are not sending a document, you are giving access to the structure of your data.
MANTA: private and secure text-to-SQL #
MANTA is the text-to-SQL solution by HTX. It runs entirely within your infrastructure — no data, no schema, no query ever leaves your perimeter.
How MANTA works #
- Connect your existing databases — PostgreSQL, SQL Server, MariaDB, BigQuery, Snowflake, and more. Setup in 5 minutes, no migration needed
- Ask in natural language. MANTA generates the SQL query, validates it, and executes it
- Get answers with tables, charts, and the underlying SQL query — everything is verifiable
Performance: on par with ChatGPT-5 #
Thanks to custom models, targeted fine-tuning, and built-in evaluation, MANTA achieves text-to-SQL performance on par with or better than ChatGPT-5 and Gemini 2.5 Pro — even on complex schemas with dozens of tables.
The difference: your data never leaves your infrastructure.
Built-in security #
Every query generated by MANTA is:
- Validated syntactically before execution
- Sanitized against SQL injection and destructive queries
- Verified with a confidence score
- Logged in the audit trail for compliance
Comparison with alternatives #
| Feature | ChatGPT + SQL | SaaS Solutions | MANTA |
|---|---|---|---|
| Where data resides | US servers | Cloud provider | Your infrastructure |
| Schema sent to cloud | Yes | Yes | No |
| Supported databases | Generic | Limited | 8+ (PostgreSQL, SQL Server, BigQuery…) |
| Fine-tuning on schema | No | Partial | Yes |
| SQL injection protection | No | Variable | Built-in |
| Confidence score | No | Rare | Yes |
| GDPR compliant | No | Depends | Yes, by design |
| Cost | Per token | Per user/month | Per infrastructure |
Real-world use cases #
ChemoMaker — Drug preparation #
MANTA is integrated with the ChemoMaker robot for oncological drug preparation, in collaboration with Biovalley Investments and Trieste Valley.
Pharmacists can query the preparation database in natural language: “Which drugs have preparation times above the average?” — without writing SQL, without involving IT.
Business intelligence for SMEs #
A manufacturing company with 3 separate databases (ERP, CRM, warehouse) was using Excel for monthly reports. The process required 3 days of analyst work.
With MANTA:
- Real-time reports: the manager asks the question and gets the answer in seconds
- Cross-database: MANTA queries all databases through a single interface
- Autonomy: the sales team no longer depends on IT for data
- Time reduction: from 3 days to a few minutes per report
Who should use text-to-SQL #
NL2SQL is not for everyone. Here is when it makes sense:
Yes, if:
- You have relational databases with structured data
- Multiple people in the company need data but cannot write SQL
- The analyst is a bottleneck
- You want to democratize data access without training everyone on SQL
- You handle sensitive data that you do not want to send to the cloud
No, if:
- Your data is in Excel spreadsheets (a traditional BI tool is a better fit)
- You have a single simple database with few tables
- You already have a dedicated and non-overloaded analyst team
How to get started #
The path to bringing text-to-SQL into your company:
- Assessment (1 day): we analyze your databases, schema, and use cases
- Connection (1 day): we connect MANTA to your databases — no migration needed
- Calibration (1–2 weeks): fine-tuning the model on your specific schema
- Rollout (1 week): user training and production deployment
We connect MANTA to your databases in 30 minutes. Contact us.
This article was written by the HTX team — Human Technology eXcellence. MANTA is based on open-source components from the Dataherald project v 1.0.3 (Apache License 2.0), with proprietary modifications and developments.
Frequently asked questions #
What is Natural Language to SQL?
Natural Language to SQL (NL2SQL or text-to-SQL) is an AI technology that converts natural language questions into SQL queries. Instead of writing code, you ask 'Which customers ordered more than 10,000 euros in Q1?' and the system generates and runs the query on your database.
Is NL2SQL safe for enterprise data?
It depends on the solution. Cloud services send your schema and data to the provider's servers. MANTA by HTX runs on-premise: no data ever leaves your infrastructure. Every generated query is validated and sanitized against SQL injection.
Which databases does MANTA support?
MANTA supports PostgreSQL, MySQL, SQL Server, MariaDB, BigQuery, Snowflake, Databricks, ClickHouse, and AWS Athena. A single interface for all your databases, with no code changes needed.
How accurate is text-to-SQL compared to a human analyst?
State-of-the-art text-to-SQL models achieve accuracies above 85% on standard benchmarks. Thanks to targeted fine-tuning and built-in evaluation, MANTA reaches performance on par with or better than ChatGPT-5 and Gemini 2.5 Pro on complex schemas.
Do I need a technical team to use MANTA?
No. MANTA is designed for non-technical users. Initial setup takes 5 minutes to connect a database. After that, anyone can ask questions in plain language and get answers with tables and charts.