# External AI prompts and versions

Select a versioned external prompt for an AI feature, with caching and fallback instructions when retrieval fails.

*Release 3.3 · admin, developer*

**Settings › AI › Features** · **Settings › AI › Connections**

## What it is

**Prompt** selects instructions maintained in an external prompt service. You can select a remote label or a specific version and preview its text in INSIDE. Caching and local fallback instructions help the feature continue when the prompt service cannot supply a prompt.

## Who uses it and why

Administrators select approved instructions for an AI feature. Developers maintain prompt versions in LangFuse, check the preview and investigate which version a feature used.

## Where to find it

Open **Settings › AI › Features**, edit a supported feature and find its instructions editor. Select **External** to reveal **Connection**, **Prompt**, **Label**, **Version**, **Cache** and **TTL**.

The **Settings** role with **AI** permission, or the **Developer** role, grants configuration access. Powerfront manages the LangFuse connection in **Settings › AI › Connections**.

## How it works

1. Select a **Connection** and **Prompt** for the instructions section you want to use.
2. Choose a **Label** or **Version**. Selecting one clears the other.
3. Review **External Instructions Preview** and supply **Fallback Instructions**.
4. At execution, INSIDE reuses an unexpired cached prompt or attempts to fetch the selected prompt.
5. If refresh fails and a previous successful value is available with caching enabled, INSIDE uses that value. If no usable external value is available, prompt resolution uses the local fallback or the feature's default instructions.

Prompt caching separates websites, connections, prompt names, labels and versions. Where tracing is configured, the resolved prompt name and version can accompany the AI trace.

## Configure it

Ask Powerfront to create the LangFuse connection. Create and publish the prompt in that service, then select it in the feature's **External** instructions editor.

Choose a numbered **Version** when you need a fixed revision, or a **Label** that your prompt-management process maintains. Check the preview, keep suitable **Fallback Instructions** and save the feature. Configure each instructions section that should use an external prompt.

### Settings

| Setting | Where | Applies to | Default | Who can change it | What it does |
|---|---|---|---|---|---|
| Cache | Settings › AI › Features | website | On | Settings role, Developer role | Reuses a successfully fetched prompt and keeps it available if a later refresh fails. |
| TTL | Settings › AI › Features | website | 300 seconds (5 minutes) | Settings role, Developer role | Sets how long to reuse a cached prompt before attempting another fetch. |
| Connection | Settings › AI › Features | website | Not set | Settings role, Developer role | Selects the external prompt connection for this instructions section. With none selected, the feature uses local or default instructions. |
| Prompt | Settings › AI › Features | website | Not set | Settings role, Developer role | Selects the named prompt to fetch from the external service. With none selected, the feature uses local or default instructions. |
| Label | Settings › AI › Features | website | Default | Settings role, Developer role | Selects a remote prompt label instead of an explicit version for this instructions section. |
| Version | Settings › AI › Features | website | Latest | Settings role, Developer role | Selects an explicit remote version instead of a label for this instructions section. |
| Fallback Instructions | Settings › AI › Features | website | Built-in instructions for the selected AI feature | Settings role, Developer role | Supplies local instructions when no usable external or cached prompt is available. An empty fallback uses the feature's built-in instructions where provided. |

### Permissions

| Permission | Lets you |
|---|---|
| AI | With the Settings role, allows editing of AI feature prompt selections. |
| Developer | Allows editing of AI feature prompt selections. |

## Limits and good to know

- External prompt lookup has a five-second deadline.
- **TTL** is measured in seconds. The default of 300 seconds is five minutes.
- A failed refresh can reuse a value older than **TTL**. TTL expiry does not discard the last successful fallback.
- Turning **Cache** off removes this cache-based fallback for that selection.
- Cached fallback is held by the running service. Do not rely on it as a permanent approved copy.
- The **External** choice is available only for supported feature and engine combinations. Voice instructions do not expose it in this editor.

## Depends on and works with

### This feature uses

- **Requires** [Shared AI service connections](AIP-013.md): External prompts need a configured LangFuse connection.
- **Configured in** [AI feature settings and change history](AI-001.md): Each AI feature stores its own prompt selection and fallback instructions.
- **Configured in** [AI instructions and templates](AI-002.md): Prompt ownership and instructions sections determine where the external prompt is used.
- **Works better with** [AI execution tracing with Langfuse](AIP-015.md): Tracing can record the effective prompt name and version.

### Used by

- **Configures** [AI platform execution limits](AIP-024.md): External prompt selections set their own cache duration and fallback instructions.
- **Enhances** [AI instructions and templates](AI-002.md): Managed external prompts can replace local instructions with cached fallback.
- **Enhances** [Reusable AI skills and instructions](AI-020.md): A skill can use a managed external prompt with local fallback and caching.
- **Enhances** [Shared AI service connections](AIP-013.md): LangFuse connections supply managed prompts.
- **Enhances** [AI execution tracing with Langfuse](AIP-015.md): Managed prompts can supply effective prompt identity for trace records.

## FAQ and troubleshooting

### Why can I not see my prompt connection?

Ask Powerfront to confirm that the website has a LangFuse connection. The prompt selector only lists connections that support prompt management.

### Why is the AI still using an older prompt?

Check whether **Version** pins an older revision. With **Cache** on, a change may wait until **TTL** expires; if refresh then fails, the last successful value can continue to be used.

### What happens when LangFuse is unavailable?

INSIDE can reuse a previously successful cached prompt. If none is available, the prompt resolver falls back to local or default instructions. Keep the local fallback suitable for use on its own.

### Can I select a label and a version together?

The editor treats them as alternatives. Selecting a label clears the version selection, and selecting a version clears the label.

### Does the preview prove which prompt a past answer used?

No. It previews the selection now. Where tracing is enabled, check the prompt identity recorded for the relevant execution.
