> For the complete documentation index, see [llms.txt](https://help.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.felt.com/felt-ai/prompting-tips.md).

# Prompting tips

Write clearer prompts for Felt AI. Get examples for the AI assistant, extensions, custom HTML popups, and SQL queries.

Give Felt AI specific names and values, whether you're using the [AI assistant](/felt-ai/ai-assistant.md), building an extension or popup, or writing SQL. For example:

> Filter the "permits" layer to show only records where permit\_type is "residential" and status is "pending".

A less specific prompt leaves Felt AI to guess which layer and attributes you mean:

> Show me the pending residential permits.

## Where you use Felt AI

Felt AI works in two places, and prompts work a little differently in each.

* The [AI assistant](/felt-ai/ai-assistant.md): the **Felt AI** panel on a map. It answers questions and changes the map for you, such as adding data, running analysis, and styling layers. See [Prompts in the AI assistant](#prompts-in-the-ai-assistant).
* The Felt AI editors: a **Felt AI** tab inside the Extension editor, the custom HTML popup editor, and the SQL query editor. There, Felt AI drafts code that you read, edit, and run or save yourself. See [Prompts in the Felt AI editors](#prompts-in-the-felt-ai-editors).

## Tips for every prompt

* Say what to do with missing data, such as "If assessed\_value is null, show Not available."
* Give an example of the format you want, such as "Format dates as March 15, 2025, and currency as $1,250,000."
* Build in small steps so you can check and fix each result before moving on.
* When a result isn't right, ask for changes in the same conversation instead of starting over.

## Prompts in the AI assistant

Give Felt AI your goal and constraints, and let it choose the data, analysis, and styling that fit:

> I'm evaluating flood exposure for our Houston portfolio. Add FEMA flood zones, identify which of our properties fall in high-risk zones, and style the result so risk levels are obvious at a glance.

* Enter **@** in the prompt box to pick the exact layer or source you mean.
* Select a feature, an annotation, or a polygon you drew, and refer to it as "the selected area".
* For a chart or filter, name the layer, the component, and the attribute: "On the permits layer, add a bar chart of permit\_type and a filter for status."
* Refine the result as you'd direct a colleague: "Make the high-risk zones more prominent and mute everything else."
* Ask Felt AI to explain what it did: "Which data source did that layer come from?"
* Click **New chat** when you switch to an unrelated task. A focused conversation gets better results.

### Learn as you go

Ask Felt AI to teach you Felt while you work:

* "Help me make my first map"
* "How do I change these colors?"
* "Explain what you just did"
* "What does this layer show?"
* "Explain the process before you run it"
* "Ask me questions as you go"

## Prompts in the Felt AI editors

{% hint style="success" %}
Available on the Business and Enterprise plans. [Compare plans](https://felt.com/pricing#compare)
{% endhint %}

The Felt AI editors draft code that you can read, edit, and run.

### Extensions

In the **Felt AI** tab of the **Extension editor**, Felt AI drafts JavaScript SDK code for an [extension](/developers/extensions.md), an interactive tool on your map. Describe what starts the extension, which layers it uses, what it shows, and how to clear results. If the extension needs to do several things, number the requirements:

> Create an interactive tool where I can click any school to find nearby parcels. When I click a school:
>
> 1. Draw a 500-meter buffer around it.
> 2. Filter the parcels within that radius.
> 3. Show a panel with the school name, the count of nearby parcels, and each parcel's zoning type and assessed value.
> 4. Clear previous results when I click a different school.

To get advice instead of code, add "don't write code" to your prompt. To fix a problem, test each part and ask for a specific change, such as "The count isn't updating when I change the filter."

<figure><img src="https://217108486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmRfGitkyjOEMvVsEyGWN%2Fuploads%2Fgit-blob-4a04d60530d225cc800075a28ed11d07bdf6172e%2Fextension-editor-ai-assistant.png?alt=media" alt="Extension editor with the Felt AI tab open, suggested prompts, a typed prompt to zoom to the highest-income county, and the map preview."><figcaption></figcaption></figure>

### Custom HTML popups

For [custom HTML popups](/styling/popups.md#custom-html-popups), Felt AI drafts the HTML, CSS, and JavaScript. Name the attributes to show and how to format each one. Specify any colors, icons, links, or images:

> Create a popup showing the address as a bold heading, the price as currency, bedrooms and bathrooms as "3 bd | 2 ba", and a "View listing" link that uses the listing\_url attribute.

Preview the popup in the desktop and mobile layouts before you save.

### SQL queries

For [SQL queries](/upload-anything/sql-queries.md) on a database source, Felt AI writes SQL you can inspect, edit, and run. The results become a layer. Name the tables to query, the filters to apply, and the attributes to return. Describe the spatial relationship, such as intersecting an area or being within a distance:

> Find all fire stations within 2 miles of areas where response times exceeded 10 minutes last year. Join with the incidents table and show the count of slow responses per station.

If you're not sure what's in your database, ask first: "What tables do I have related to emergency response?" If a query is slow or returns too much data, ask Felt AI to optimize it or add a limit.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.felt.com/felt-ai/prompting-tips.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
