Skip to content

Best practices for prompting Maia๐Ÿ”—

This guide explains how to get the best results from your conversations with Maia, your agentic data team. If you're new to Maia, check out the Maia overview to learn more about what it can do.


Prompting best practices๐Ÿ”—

The quality of Maia's responses depends significantly on how prompts are structured. Following these best practices will help Maia understand your intent and deliver more accurate results.

Be specific and provide context๐Ÿ”—

  • Name resources explicitly: Reference specific tables, columns, pipelines, and components by their exact names rather than using vague descriptions.
  • Include relevant details: Specify data types, expected formats, business rules, or constraints that affect the task.
  • State your goal: Explain what you're trying to achieve, not just what you want Maia to do. This helps Maia make better decisions when multiple approaches exist.
  • Use the @ symbol: Reference specific files in your project using @filename to direct Maia's attention.
  • Use slash commands: Use slash commands like /explain, /fix, /optimize, and /document for common tasks.

The table below gives some examples of less effective prompts, and how to improve them to get the best response from Maia.

Less effective More effective
Join these tables Join the customers and orders tables on customer_id, keeping only customers with at least one order
Filter the data Filter transactions to include only rows where status is completed and amount is greater than 100
Create a pipeline Create an orchestration pipeline that loads data from Salesforce contacts into the staging_contacts table daily
Add a calculation Add a calculator component that creates a profit_margin column calculated as (revenue - cost) / revenue
Clean up the data Remove rows where email is null or doesn't contain an @ symbol, and trim whitespace from the name column
Connect to the API Create a custom connector to extract data from the HubSpot Contacts API using OAuth2 authentication and load it into raw_hubspot_contacts
Fix this pipeline The daily_sales pipeline is failing at the join componentโ€”check why the join keys might not be matching
What does this do? Explain what the weekly_inventory_sync pipeline does, including its data sources and output tables
Why isn't it working? Why is the customer_dedupe transformation returning fewer rows than expected after the join?

Break complex tasks into steps๐Ÿ”—

For multi-step or complex tasks, prompt Maia incrementally rather than requesting everything at once:

  1. Start with the foundation (e.g. "Create a transformation pipeline that reads from the raw_orders table").
  2. Add transformations one at a time (e.g. "Add a filter to keep only orders from the last 30 days").
  3. Validate your pipeline at each step before continuing.

This approach allows you to verify Maia's work progressively and course-correct early if needed.

Use plan mode for complex work๐Ÿ”—

When working on complex pipelines or when you want more control, enable Plan mode using the toggle at the bottom of the chat interface. In plan mode, Maia will:

  • Analyze your request and present a detailed plan before making changes
  • Allow you to review, modify, or approve the plan
  • Only execute changes after you've confirmed the approach

This is particularly useful for large refactors, unfamiliar patterns, or when you want to understand Maia's reasoning.

Iterate and refine๐Ÿ”—

If Maia's response doesn't match your expectations:

  • Provide feedback: Tell Maia what's wrong or what you expected instead.
  • Add constraints: Specify requirements that weren't clear in your original prompt.
  • Rephrase the request: Try explaining the same goal from a different angle.

Troubleshooting tips๐Ÿ”—

If Maia doesn't follow your standards:

  • Check that your context file is in .matillion/maia/rules/ and within the character limit.
  • Check that rules are written as clear directives.
  • Explicitly reference standards in your prompt.

If skills aren't activating:

  • Review the skill description for clarity and relevant keywords.
  • Test with prompts that directly relate to the skill's purpose.

If Maia's responses are inconsistent:

  • Start a new chat to clear potentially conflicting context.
  • Simplify your request and add complexity incrementally.
  • Use plan mode to review Maia's approach before execution.