> For the complete documentation index, see [llms.txt](https://gdplabs.gitbook.io/glchat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gdplabs.gitbook.io/glchat/application-ui/how-to-guide/chat-input-and-responses/sources.md).

# Sources

You can see the **references or sources** for each response by clicking the Source button at the bottom of the response.

A dialog box on the right sidebar will display a list of sources. You can click each link to verify the information directly from the source.

{% tabs %}
{% tab title="Website" %}

<figure><img src="/files/rb3Gou1fvERChzWMKeH5" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Mobile (iOS/Android)" %}
![](/files/CoFKPt8SEySMTvv4wPgx)
{% endtab %}
{% endtabs %}

## SQL Sources

### Overview

GLChat now supports **SQL Sources** for agents using SQL tools.

This feature helps users easily trace and understand how the agent generates answers from database queries.

Users can now see:

* SQL query sources
* Related database results
* Execution references behind the answer

***

### Benefits

| Feature            | Benefit                                         |
| ------------------ | ----------------------------------------------- |
| Source Visibility  | Easier to trace answers                         |
| Query Transparency | Understand how the answer is generated          |
| Easier Debugging   | Faster investigation when answers are incorrect |
| Better Trust       | Users can validate the returned data            |

***

### How It Works

1. Agent generates a SQL query
2. SQL tool executes the query
3. Database returns the result
4. GLChat displays the answer along with SQL Sources

***

### Example

#### User Prompt

> “Berapa kenaikan produksi dalam perbandingan plan dan actual masing-masing powerplant antara tahun 2023 dan 2024 dan visualisasikan dalam bentuk bar chart?”

#### SQL Sources

Users can inspect:

* Executed SQL query
* Related tables
* Retrieved results

This makes answers more transparent and easier to validate.

<figure><img src="/files/zy3Ch4xrGfiNjTM9KGNd" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/jnvPPCRfQeLLG9Vh2Yx4" alt=""><figcaption></figcaption></figure>
