Prompts

The Prompts dashboard turns every LLM trace into a managed prompt template. Discover prompts from production traffic, edit them with {{variable}} substitution, run LLM-as-judge evaluations in the playground, then promote them to named environments so your SDK can fetch the right version at runtime — with no redeploy required.

Dashboard workflow

  1. Discover — the Prompts page surfaces every LLM call from your traces as a row. Click any row to open it in the evaluation playground alongside its full trace tree.
  2. Edit — refine the template in the editor. Add {{variable}} placeholders; the UI detects them and renders input fields for test values.
  3. Evaluate — run LLM-as-judge metrics (hallucination, faithfulness, relevance …) on the template + response pair. Results appear inline as scored cards.
  4. Save — give the prompt a name and a unique slug. Every subsequent edit creates a version snapshot so you can restore any previous state.
  5. Promote — deploy to development, staging, and production independently. Each environment stores a full snapshot of the template at promote time, so rolling back is one click.

Template variables

Wrap any dynamic value in double curly braces. Variable names must start with a letter or underscore and contain only alphanumeric characters and underscores.

Python
# Prompt template stored in the dashboard:
You are a helpful assistant for {{company}}.
Answer the following question in {{language}}: {{question}}

The playground detects variables automatically and renders a labeled input for each one so you can test substitutions before promoting.

Environment-based deployment

Each named environment stores an independent snapshot — promoting to staging never touches production. The typical promotion flow:

EnvironmentBadgeIntended useSDK call
developmentdevLocal iteration and unit testsfetch_prompt(slug, env="development")
stagingstgIntegration and regression testingfetch_prompt(slug, env="staging")
productionprodLive traffic — the defaultfetch_prompt(slug)

SDK fetch

Call fluiq.fetch_prompt() anywhere in your application to retrieve the deployed template for an environment. The call is authenticated with your API key and returns the snapshot that was promoted — not the current editor draft.

Python
import fluiq

fluiq.instrument(api_key="fl_...")

# Fetch the production snapshot (default):
prompt = fluiq.fetch_prompt("customer-support-reply")

# Fetch a specific environment:
prompt = fluiq.fetch_prompt("customer-support-reply", env="staging")

# Fill template variables and call your LLM:
filled = prompt.render(
    company="Acme Corp",
    language="French",
    question=user_input,
)
response = client.chat.completions.create(
    model=prompt.model or "gpt-4o",
    messages=[{"role": "user", "content": filled}],
)

The returned object exposes:

AttributeTypeDescription
slugstrUnique identifier used to fetch the prompt
namestrHuman-readable display name
templatestrRaw template string with {{variable}} placeholders
modelstr | NoneSuggested model saved with the prompt, if any
variableslist[str]Detected variable names in the template
versionintVersion number of this environment's snapshot
environmentstrEnvironment this snapshot was fetched from
deployed_atstrISO timestamp of when this version was promoted

Version history

Every time you save an edited template, the previous version is automatically snapshotted. Open the History panel on any saved prompt to browse past versions — each shows its version number, the template preview, the model, and when it was saved. Click Restore to roll back; the current state is snapshotted first so no work is ever lost.

Environments pin to their snapshot independently — restoring v3 to the head does not change what production is serving until you explicitly re-promote.

Decoupled from your deploy pipeline

Because fluiq.fetch_prompt() fetches at runtime, you can update a production prompt — fix a hallucination-prone instruction, add a guardrail, tweak tone — in the dashboard without touching your codebase or triggering a new deployment. The change is live the next time your SDK calls fetch_prompt().