Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.

As an Alteryx Product Specialist (and enthusiast) and Data Professional with 9 years of experience, I have helped hundreds of users in the Alteryx Community answer their questions and solve their problems.

Lately, there has been a lot of interest in the following question: “How can I get the most value out of Alteryx Copilot?”

 

The truth is that you are probably closer than you think. In this post, I’ll share some of my tried and tested prompts that have been working well for me lately, along with why they work and how you can adapt them to your own workflows and needs.

 

Note: The prompts listed here were primarily tested in a development version of Alteryx Copilot. This past week, the team released a new YXI of Copilot in Public Preview that now includes Data Sampling as a feature. With this opt-in feature, Copilot is able to run your workflow and sample your data to provide more accurate tool configurations, suggestions, and direct insights about your data.  While you may get slightly different results, rest assured, I retried all the prompts multiple times to validate the consistency of their outputs.

 

Before We Begin: 3 Guiding Principles

 

Remember: YOU are the pilot. Copilot works as your assistant. It can make mistakes, propose inefficient solutions, or need a second try.

 

Clear communication wins. Gen AI is getting so intuitive to use that sometimes we can mistake it for being able to read our minds. In moments like this we may omit key details from a prompt, expecting our LLMs to understand, and then become frustrated by unexpected or incorrect results. One of the ways to help ensure clear communication is by cataloging template prompts in a text file that tend to generate consistent, useful outputs that meet your needs.  (Attached is a Text file with the prompt templates listed in this article.)

 

Solve in chunks. If you try to do too much in one go, the added context may confuse the LLM and lead you down the wrong course. When working with Alteryx Copilot, focus on one discrete goal at a time. Similarly, if you have switched to a new workflow or are changing topics, I recommend that you “Restart Copilot” to ensure that nothing else is available to distract it.

 

image001.png

 

Use Case 1: General Workflow Building (Beginner/Intermediate)

 

📌 Prompt Template:

 

1. Identify/Plan how to [state the problem]. 
2. Then take all necessary steps to do so.

 

Why it works: This forces Alteryx Copilot to think first about the problem before adding tools. Since Copilot can’t remove or edit tools just yet, (heads up - this feature will be available very soon!) this is a good safeguard. Applying guiding principle 3 from above, I have seen Alteryx Copilot successfully generate a full solution (to the chunk) about 75% of the time.

 

Example:

 

Survey of Student Stress. Survey Questions were listed as columns in one dataset and a second dataset was a mapping table between Category and Survey Questions.

 

image002.png

 

Notice how we provided a reasonable goal (“Join these datasets”) but also included the constraint that the join criteria (i.e. Questions) are pivoted relative to each other.

 

image003.png

 

With this prompt, Copilot was able to consistently add all three tools after the input!

 

Use Case 2: Complex Formula Generation (Beginner/Intermediate)

 

📌 Prompt Template:

  1. [List relevant column constraints] 
  2. [Desired objective] (using the [Formula/RegEx] Tool), carefully check your work to ensure each formula is correct, before adding tools.

Why it works: By being explicit about your starting point and end goal, your starting point and end goal, you ensure that Copilot has the context needed to provide a thorough response that doesn’t miss anything important to you.  I suggest providing Copilot with your column constraints and a high-level overview of what kind of data you are working with (e.g. all values are comma-separated, phone numbers with or without country codes, etc.).  As always try to be specific to your desired objective. By specifying which tool you want to use (default to Formula if you are unsure of which to pick), you help prevent Copilot from hallucinating features that don’t exist in other tools. Lastly, as you may already be familiar with, from basic prompt engineering with LLM’s such as Chat GPT or Gemini, telling Alteryx Copilot to double-check its work and be more careful seems to provide better outputs than not doing so. With this approach, I achieved a successful formula about 80% of the time. Turning on Data Sampling in Copilot will also help return more accurate formulas or regex! That being said, for more complex expressions, I encourage more intermediate users to review the output and optimize the suggested formula to enhance readability.

 

Example:

 

The dataset has a Date column with three different date formats. My goal is to convert each format to ISO-8601 (YYYY-MM-DD).

 

image004.png

 

Our prompt provides Copilot with an example for each date format in our dataset (Our Column Constraint), followed by our request to convert each value to a date field (Desired Objective). The result: Copilot added a formula tool with the necessary expression!

 

image005.png

 

The Expression above does the job, but Intermediate users may recognize that since the first IF clause always outputs [Date String], they can clean up the formula by removing it.

 

image006.png

 

In my testing, this was one of the “failed runs”, but the expression actually works, Copilot simply missed a space in the column name [Date String]. If you weren’t familiar with the necessary DateTime functions and format specifiers, this would be a good way to learn them.

 

Use Case 3: Debugging Errors (Beginner)

 

📌 Prompt Templates:

  1. How do I fix the following [error/warning]: "[Copy/Paste from Results Pane]"
    1. With Data Sampling on, there is no need to Copy/Paste. Instead, try How do I fix the error/warning in [Tool Name or Tool ID]?    
  2. Why can’t I [describe desired functionality]?

Why it works: For beginners, Copilot can help provide immediate, tailored feedback to any errors/warnings you run into in your workflow. From my testing, for more complex/uncommon errors, Copilot can sometimes struggle to provide accurate answers at this time, which is why I would only currently recommend this to beginners. For common errors, I would estimate that Copilot is successful > 90% of the time.

 

Example:

 

Data Type Mismatch is one of the most common causes of errors in Alteryx.

 

image007.png

 

image008.png

 

In both of these cases, Copilot is able to identify that Data Types are involved and to suggest a valid solution.

 

Use Case 4: Tool Type Overview (All Levels)

 

📌 Prompt Template:

  1. Generate the following sections describing this workflow: 
    # What custom macros are in this workflow? 
    # What Connector Tools are used? 
    # What Other Inputs are used? 
    # What Outputs are used? 
  2. Output the results to each question as a new section as an ordered list. List each type of tool only once as opposed to each Tool ID.

Why it works: When investigating new workflows (especially large/complex workflows), Copilot can be quite helpful in providing an overview of which tools were utilized and whether they are macros, inputs, outputs, or connector tools. This informs us how to proceed with our review of the workflow and allows us to “Ctrl+F” to find anything we’d like to investigate further.  This prompt has been successful for me ~75% of the time using the current Public Preview YXI of Copilot, but 100% successful, using the in-development version of Copilot I got to test, although the formatting was occasionally inconsistent. This is something I’m really excited about with its availability coming soon.

 

Example:


I ran this prompt on a rather large workflow:

 

image009.png

 

image010.png

 

Note: this output was done with the latest in-development version of Copilot.

 

Use Case 5: Workflow Summarization (All Levels)

 

📌 Prompt Templates:

  1. Summarize the function of this workflow in one paragraph.
  2. Then convert that to a numbered list of 5-7 short points that capture the essence of that summary.
  3. This workflow represents a single section in the [beginning/middle/end] of a larger workflow, please summarize the function of this workflow in a single paragraph.
    Here is a summary of the larger workflow for context: "[Insert Summary]"

Why it works: By leveraging these prompts, we can generate a useful short description for an entire workflow or sections of that workflow, that can be used to better understand a new workflow we are reviewing, or to begin documenting our workflows. In Public Preview, this prompt gave me useful information 100% of the time, although the output may require some modification to ensure completeness of the summary. This is my personal favorite for Alteryx Copilot use cases right now.

For the best results with the second prompt above, I recommend copying the section of the workflow that you want a partial summary of and pasting it into a clean canvas. This ensures that no extraneous tools get lumped in by accident to confuse Copilot.

 

Example:


I used this on a large weekly status report workflow for the IT Org:

 

image011.png

 

I cropped out the bullet points for brevity but rest assured that Copilot generated them. This summary is very accurate but does miss the use of AI in this particular workflow. I could easily add that to the summary myself however, leveraging Copilot’s response as a useful starting point.

 

Final Thoughts

 

Regardless of your level of expertise with Alteryx Designer, Alteryx Copilot can help you start building, debugging, and assisting you with documenting faster. The prompts in this blog are a great place to start experimenting, but if you’ve discovered your own go-to prompts and use cases, share them in the comments. We learn best when we learn from each other!

 

If you’d like to see some of these prompts in action, watch the on-demand “Push Past the Basics” webinar I ran earlier this month. You’ll get a walkthrough for the last two use cases I shared above plus a few bonus tips that didn’t make it into this post.

If you haven’t already, download the Public Preview of Copilot for free from the Alteryx Marketplace so that you can try out these prompts for yourself.

 

And, as I mentioned at the start of this blog – the latest version of Alteryx Copilot in Public Preview was just released! It introduces improvements that show you exactly where Copilot is in its thinking and actioning process, and Data Sampling, enabling Copilot to run your workflow and pull your actual data in as added context (with an option to toggle it off if needed)! We’d love to hear what you think if you try it out!

 

image012.png

 

To learn more about Data Sampling – watch this short overview video.

 

Kommentare
abacon
Pulsar

This is really helpful! I was messing around with the Copilot functionality recently and it was able to do some really useful stuff, this information will be helpful for me to further improve my use of Copilot.

 

Bacon

caltang
17 - Castor
17 - Castor

Awesome stuff @Andrew-Merrill-CoG ! I love the prompt engineering on asking the questions about macros etc used in a workflow. Conventional XML reading doesn't do it justice yet!

@Andrew-Merrill-CoG I didn't know the latest Copilot release was able to pull extra information from the data itself, I'm looking forward to using this.

Point 5 is excellent! I find adding a comment per container on workflows can be extremely useful to highlight the start/end goal for each container. Using Copilot to help create these summaries is a great idea. 

EKasminsky
Asteroid

This might be pretty helpful for me. The main issue I've had with copilot is that it doesn't work if you have over a certain number of tools. In these cases, I would probably need Copilots help the most!

Thanks, @abacon! It's definitely a lot of trial and error work to identify the best ways to leverage Copilot to accomplish different tasks. If you've found any other approaches that were successful, please share them!

I appreciate y'all's feedback @caltang & @pilsworth-bulien-com. Hearing from experts is a good way to validate approach.

@EKasminsky, I've definitely noticed the challenge of working with larger workflows. As of right now, it can be helpful to break problems down into smaller pieces and solve them in a new empty workflow, and move your solution into the larger workflow.