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.
Creating a Prompt
Section titled “Creating a Prompt”- Navigate to Prompts from the sidebar menu
- Click New Prompt
- Give your prompt a name and description
Template Editor
Section titled “Template Editor”The template editor uses Jinja2 syntax for dynamic content. You can include:
Variables
Section titled “Variables”Use double curly braces for variables:
Hello {{ name }}, here is your report for {{ date }}.Variables are automatically detected and shown in the Parameters panel.
SQL Data
Section titled “SQL Data”Include query results directly in your prompts:
Based on this data:{{ sql_results }}
Please provide insights on the sales trends.Conditionals
Section titled “Conditionals”{% if include_summary %}## Summary{{ summary_text }}{% endif %}{% for item in items %}- {{ item.name }}: {{ item.value }}{% endfor %}SQL Integration
Section titled “SQL Integration”Connect your prompt to a data source to fetch live data:
- Select a Data Source from the dropdown
- Write your SQL query in the SQL panel
- Use parameters in your query with
:param_namesyntax:SELECT * FROM sales WHERE region = :region - Parameters appear in the panel for you to fill in
- Query results are available as variables in your template
Parameter Types
Section titled “Parameter Types”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)
MCP Tools
Section titled “MCP Tools”Integrate external tools via the Model Context Protocol:
- Click Add MCP Tool in the tools panel
- Select from available tools on your connected MCP servers
- Tool metadata is available in your template
See MCP Servers for setting up MCP integrations.
Preview Panel
Section titled “Preview Panel”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.
Code Execution
Section titled “Code Execution”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
Using Prompts in Chat
Section titled “Using Prompts in Chat”- Open a chat session
- Click the Prompts button in the input area
- Select a prompt from your list
- Fill in any required parameters
- The rendered prompt is inserted into your message
Sharing Prompts
Section titled “Sharing Prompts”Make prompts available to others:
- Open the prompt editor
- Toggle Public in the properties panel
- Share the prompt URL
Public prompts are read-only for other users.
Best Practices
Section titled “Best Practices”- 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