Skip to content

Prompts

Prompts in Catalyst are reusable templates that combine AI instructions with data from your databases and external tools. They help you build consistent, data-driven AI workflows.

  1. Navigate to Prompts from the sidebar menu
  2. Click New Prompt
  3. Give your prompt a name and description

The template editor uses Jinja2 syntax for dynamic content. You can include:

Use double curly braces for variables:

Hello {{ name }}, here is your report for {{ date }}.

Variables are automatically detected and shown in the Parameters panel.

Include query results directly in your prompts:

Based on this data:
{{ sql_results }}
Please provide insights on the sales trends.
{% if include_summary %}
## Summary
{{ summary_text }}
{% endif %}
{% for item in items %}
- {{ item.name }}: {{ item.value }}
{% endfor %}

Connect your prompt to a data source to fetch live data:

  1. Select a Data Source from the dropdown
  2. Write your SQL query in the SQL panel
  3. Use parameters in your query with :param_name syntax:
    SELECT * FROM sales WHERE region = :region
  4. Parameters appear in the panel for you to fill in
  5. Query results are available as variables in your template

SQL parameters support different placeholder styles depending on your database:

  • :name - Named parameters (PostgreSQL, Oracle)
  • ? - Positional parameters (SQLite, MySQL)
  • %(name)s - Python format (MySQL)
  • $1, $2 - Dollar parameters (PostgreSQL)

Integrate external tools via the Model Context Protocol:

  1. Click Add MCP Tool in the tools panel
  2. Select from available tools on your connected MCP servers
  3. Tool metadata is available in your template

See MCP Servers for setting up MCP integrations.

The preview panel shows your rendered template in real-time:

  • Fill in parameter values
  • See SQL query results
  • View the final prompt that will be sent to the AI

Click Execute to run the template and see results.

Prompts can include Python code blocks that execute in an isolated environment:

  • Access query results as DataFrames
  • Perform calculations and transformations
  • Generate visualizations
  • Results display in the preview panel
  1. Open a chat session
  2. Click the Prompts button in the input area
  3. Select a prompt from your list
  4. Fill in any required parameters
  5. The rendered prompt is inserted into your message

Make prompts available to others:

  1. Open the prompt editor
  2. Toggle Public in the properties panel
  3. Share the prompt URL

Public prompts are read-only for other users.

  • Keep prompts focused on a single task
  • Use descriptive variable names
  • Document expected parameter values
  • Test with different data before sharing
  • Use SQL parameters to prevent injection