> For the complete documentation index, see [llms.txt](https://docs.buildings.ability.abb/collection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildings.ability.abb/collection/english-v14/getting-started/artificial-intelligence-in-abb-buildingpro/nl2sql.md).

# NL2SQL

## Natural Language → SQL (NL2SQL) – the “ChatGPT” for your building data

With our NL2SQL module, you can access **everyday language** to all data in Eliona – with no SQL knowledge at all. A Large Language Model (LLM) translates your questions live into correct SQL queries, executes them, and returns the results immediately.&#x20;

<figure><img src="/files/1d633802cf5f300b7392a6b0ebcd4e8bec0e7fbb" alt=""><figcaption></figcaption></figure>

***

## What is an LLM?

A **Large Language Model** like ChatGPT is a neural network pretrained on huge amounts of text. It understands relationships in language, answers questions, and can – with the right fine-tuning – also generate technical commands like SQL.

### How does NL2SQL work in Eliona?

1. **Enter question**\
   “When do I consume the most energy – and which five consumers are responsible?”
2. **LLM translation**\
   The model turns your request into an optimized SQL query, and through our **Smart Building Ontology** knows all assets and measurement points.
3. **Query & result**\
   You immediately see a table and graphical presentation.

***

## What problems does NL2SQL solve?

* **Data democratization**\
  Energy managers, CFOs, and technicians get **ad hoc** insights, with no BI training required.
* **Alleviating the skills shortage**\
  “Non-experts” handle simple analyses – up to **30% fewer** data engineer tickets.
* **Silo-free organization**\
  Combine site, cost, and emissions data in a single question.
* **Faster ROI**\
  Typical **80% time savings** for standard reports, payback usually under 3 months.

### Practical example

> **Question:** “How high was the peak power consumption in the last quarter, and which five systems contributed the most?”
>
> **Answer:**
>
> 1. Peak load: **310 kW** on May 12, 4:00 PM
> 2. Top 5 consumers: Ventilation Hall A (24%), Cooling Compressor C (18%), …

All results appear as a table plus an integrated bar chart.

***

## Data protection & transparency

* **On-premise LLM** – your data never leaves your network.
* **Chain of Thought**-explanations: Transparent insight into which assets and filters the LLM selected.
* **Safeguards:** If it is a write action or launching an app, the action is always shown to the user first and must be confirmed by them.

{% hint style="success" %}
With NL2SQL, Eliona makes your building data **so easy to access** as ChatGPT – fast, secure, and without lengthy SQL writing.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.buildings.ability.abb/collection/english-v14/getting-started/artificial-intelligence-in-abb-buildingpro/nl2sql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
