> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/reference/security/ai-security.md).

# AI security

This article describes how UI Bakery AI works in regards to maintaining data privacy and security principles.

## Overview

* UI Bakery AI only works with data that users already have access to
* Client data is never used to train Large Language Models (LLMs)
* Neither UI Bakery nor LLM providers store PII or client data

## Introducing UI Bakery AI

UI Bakery AI accelerates your workflow to help you:

* Generate production-ready applications with minimal effort
* Debug failed actions with clear insights and error context
* Receive smart code suggestions while building requests
* Get help with technical questions using AI chat's documentation mode

You can read more about the AI features we offer in the following articles:point\_down:

{% content-ref url="/pages/OmipSDRv8A00o7rHBfWw" %}
[Custom App](/build-from-scratch/custom-app.md)
{% endcontent-ref %}

{% content-ref url="/pages/QGHmGMDQd75v4RgQZR2f" %}
[Custom components 2.0](/concepts/custom-components-2.0.md)
{% endcontent-ref %}

{% content-ref url="/pages/KOGN3AH8JUVsHqeCVDzo" %}
[AI Assistant](/reference/ai-assistant.md)
{% endcontent-ref %}

{% content-ref url="/pages/n5USYezr9m2jwqYeROGA" %}
[Build with AI](/build-with-ai.md)
{% endcontent-ref %}

## Behind the scenes

UI Bakery AI provides you with personalized code suggestions using third-party LLMs and the context from your app and organization. When you interact with the AI, it captures your prompt and certain app details (for example, components, data models, etc.) to generate a response. The LLMs then process this data and return suggestions. They don't store any of your information after processing.

## Data privacy

UI Bakery AI is based on the Open AI GPT model and Claude AI. During your interactions with the AI, these models may have access to the following user data:

* The question/prompt posed by the user or the code generation request
* Details about the action currently selected, including its name
* Information regarding the step presently selected within the action, such as:
  * Step name
  * Action code/SQL
  * Action type
  * Any errors resulting from the action
  * The structure of the result, including the key names and their corresponding types
* Names of the components and other used variables
* The payload sent to the data source (including data specified by the user)
* Structure of selected database tables, including columns

{% hint style="warning" %}
Open AI API does not receive any specific user information or actual data from data sources unless this data is included in the action request payload, which is selected during the chat request, for example.
{% 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, and the optional `goal` query parameter:

```
GET https://docs.uibakery.io/reference/security/ai-security.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
