# Prompt Engineering

## Overview

Prompt engineering is the practice of designing clear and effective instructions or questions for an AI system to improve the quality of its responses. It involves choosing the right words, structure, and context to help the AI better understand what is being asked and provide accurate, relevant answers.

Prompt engineering helps Thunkable AI tools generate more accurate and relevant outputs based on user input. By crafting effective prompts, users can improve app functionality and create more intuitive user experiences.

## Inline AI Generator

There are two ways to access the inline AI generator for both image and text generation.

1. **Omnibar**: In the Design tab, click the AI tools icon <img src="/files/ObTgqkbDz85miiQ7dcGs" alt="" data-size="line"> on the Omnibar and select Edit Image or Edit text.
2. **Component Selection**: Click directly on the relevant component in your app.
   * For generating **text**, use components like **Labels**, click the AI Text Editor icon <img src="/files/SxwILSscC3mn2ou58RrQ" alt="" data-size="line"> and enter your prompt in the pop-up.
   * For generating **images**, click on an **Image** component, click the Generate Image icon <img src="/files/8J0TQXHJvLmOJmS2sX3S" alt="" data-size="line"> and type your prompt in the pop-up that appears.

See the example images below (from left to right): the AI tools on the Omnibar, a Label component example, and an Image component example.

<div><figure><img src="/files/RR2c6mgb6NwzVDX8CUFd" alt="" width="278"><figcaption><p>AI tools Omnibar</p></figcaption></figure> <figure><img src="/files/bis4PvlYsVop62KRhj4E" alt="" width="277"><figcaption><p>Label Component</p></figcaption></figure> <figure><img src="/files/oSnkMxoyAHlpOxVm5ANc" alt="" width="275"><figcaption><p>Image Component</p></figcaption></figure></div>

### Generation

When generating text or images with AI in Thunkable, the more detail you provide, the better the results. You don’t need perfect grammar or full sentences—just focus on clearly describing your idea.

{% tabs %}
{% tab title="Text Generator" %}
Quick, short phrases are key when writing prompts. The better you prompt the AI, the better the results will be. Start with instructions, then context, lastly any special request (for example, if you want it to reply in a certain format or word it in a particular manner).&#x20;
{% endtab %}

{% tab title="Image Generator" %}
Quick, short phrases or keywords are especially important for image generation. Key factors to consider include resolution (e.g., 4K, 1080p, pixel art), level of detail (realistic, cartoon, simplistic, minimalistic), the art style, and a clear description of the image. The more specific information you provide, the better the AI can generate an image that matches your expectations.
{% endtab %}
{% endtabs %}

***

## Project Generation

When generating a project, it's important to have a clear understanding of your app's concept. To get the most out of the AI project generator tool, describe the main purpose of the app in the prompt field, and specify the types of screens you want included—such as a sign-in screen, home screen, or any other key interfaces.

> 📘 For more information on creating a project with AI, see our [AI Project Generator Docs](/getting-started/gen-ai/ai-project-generator.md)


---

# Agent Instructions: 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.thunkable.com/getting-started/gen-ai/prompt-engineering.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.
