|
| SAS® VIYA® COPILOT
Prompt Library
Ready-to-use prompts for every SAS Viya Copilot-enabled product — what to type and what to expect back.
|
|
Jump to a product
PLATFORM
|
|
BEFORE YOU START
Set the context. Briefly describe your data, business domain, and goal so the copilot’s response fits your environment. Be specific. Name the exact task, metric, node, rule, or deliverable you want — not a generic ask. Work step by step. Start broad, then refine with follow-up prompts. Say who it’s for. Executive summaries, analyst views, and production-ready output each need a different response. Use the right terms. Domain terminology (e.g., AML, SAR, champion-challenger, k-fold) helps the copilot map to the right concepts. Ask for the reasoning. If a recommendation is unexpected, ask why so you can validate it.
|
GOOD TO KNOW
Don’t have access to SAS Viya Copilot? Have your admin activate it with these steps: How to Activate SAS Viya Copilot: An Administrator’s Guide →
Visit the Tips & Tricks page for more setup guidance, demos, and practical examples that show how SAS Viya Copilot supports your workflows.: SAS Viya Copilot Tips & Tricks →
Prompt disclaimer: prompt accuracy and responses can vary depending on the server context, configuration, and underlying data.
|
|
| SAS® Data and AI Studio Viya Copilot for Code Assistance (formerly SAS Studio) Back to top ↑ |
| DEVELOP CODE WITH SAS DATA AND AI STUDIO |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Create simple data manipulation |
| /* Generate a DATA step to read CSV file and create summary statistics */ |
|
Generates the DATA step you described, with comments |
| Document complex procedures |
| ▸ Select PROC SQL code block and request comment generation |
|
Adds inline comments that explain the code |
| Understand inherited programs |
| ▸ Select macro code and request explanation |
|
Describes what the code does in plain English |
| Complex data transformations |
| ▸ Highlight detailed requirements comment block |
|
Generates code from your detailed requirements |
| Parameterized automation |
| /* Create a macro to calculate weighted averages by group with parameters for data set, weight variable, and grouping variable */ |
|
Writes a reusable macro definition |
| Refactor existing logic |
| ▸ Select working DATA step code and request macro conversion |
|
Wraps your code in a macro with parameters |
| Performance improvement |
| /* Review this code for efficiency and suggest optimizations */ |
|
Suggests ways to make the code run faster |
| SAS® Extension for Visual Studio Code Viya Copilot for Code Assistance Back to top ↑ |
| GETTING STARTED IN VS CODE |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Environment setup |
| “How do I connect the SAS Extension to my SAS Viya environment?” |
|
Walks through profile setup and connection steps |
| CODE GENERATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Draft new SAS code |
| /* Generate a DATA step to read CSV file and create summary statistics */ |
|
Generates a DATA step tailored to your description |
| Reusable macro |
| /* Create a macro to calculate weighted averages by group with parameters for data set, weight variable, and grouping variable */ |
|
Writes a reusable macro definition with parameters |
| CODE DOCUMENTATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Add inline comments |
| ▸ Select a PROC SQL block and request comment generation |
|
Adds inline comments that explain the selected code |
| CODE UNDERSTANDING |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Explain unfamiliar code |
| ▸ Select a macro and request an explanation |
|
Describes what the code does in plain English |
| CODE REFACTORING |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Convert code to a macro |
| ▸ Select working DATA step code and request macro conversion |
|
Wraps the code in a macro with parameters |
| Modernize legacy code |
| “Refactor this DATA step to use modern SAS best practices” |
|
Rewrites the code using current SAS conventions |
| PERFORMANCE OPTIMIZATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Improve efficiency |
| /* Review this code for efficiency and suggest optimizations */ |
|
Suggests changes to make the code run faster |
| DEBUGGING |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Resolve errors |
| “Explain this error and suggest a fix” |
|
Interprets the error and offers a corrected snippet |
| QUESTIONS & INFORMATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| ML concepts |
| “What is a predictive model?” |
|
Explains the concept in plain language, with links to documentation. |
| Model Studio terminology |
| “What is a target variable?” |
|
Defines the term in the Model Studio context. |
| Product discovery |
| “What pipeline templates are available?” |
|
Lists available pipeline templates and their typical use. |
| PROJECTS & DATA |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| List projects |
| “List existing projects?” |
|
Lists the projects available to you. |
| Identify data |
| “What in-memory CAS tables are available that I can use to create a project that predicts loan defaults?” |
|
Finds the CAS tables that best match your stated requirements. |
| Create a project |
| “Create project HMEQ Analysis using the table HMEQ. Make the variable BAD the target variable.” |
|
Creates the project. If you don’t specify a project type, Copilot asks whether to create a Data Mining, Text Analytics, or Forecasting project so the right agent is assigned. |
| Create an advanced project |
| “Create project HMEQ Analysis using HMEQ. Make BAD the target. In Pipeline 1, add a Gradient Boosting node and a Decision Tree node after Data, enable Autotuning on both, then run the pipeline.” |
|
Builds the described starter pipeline with Autotuning enabled and runs it. |
| Summarize a project |
| “Summarize project My Project.” |
|
Returns key project details. |
| View variable roles |
| “What are the variable roles for project My Project?” |
|
Summarizes current variable metadata (Input, Target, Rejected, Level). |
| Change variable metadata |
| “Set the role of the variable Income to Input in project My Project.” |
| “Reject the variable Age in project My Project.” |
| “Set the Level of the JOB variable to Nominal.” |
|
Confirms the change, or flags the variable for your review if the assignment is uncertain. |
| View project settings |
| “What are the current settings for project My Project?” |
|
Summarizes Copilot configurable project settings. |
| Change project settings |
| “Change the Class selection statistic to Gini for My Project.” |
| “Set the ROC-based cutoff to 0.70 for My Project.” |
|
Confirms the setting name and new value. |
| Delete a project |
| “Delete project My Project.” |
|
Prompts for confirmation, then permanently deletes the project and all its pipelines and nodes. |
| PIPELINES |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| List pipelines |
| “List the pipelines in this project.” |
|
Lists the pipelines in the specified project. |
| Create a pipeline |
| “Create a new pipeline named Pipeline 2.” |
|
Creates a new pipeline. |
| Run automated creation (MLPA) |
| “Run MLPA for this project.” |
|
Runs Machine Learning Pipeline Automation, which generates and evaluates multiple pipelines to find the best model. Generated pipelines are locked. |
| Get pipeline details |
|
Returns the pipeline structure, nodes, and current state. |
| Run a pipeline |
|
Runs the pipeline and summarizes the outcome when complete. |
| Suggest nodes to add |
| “Do you recommend any additional nodes for Pipeline 1?” |
|
Suggests nodes to add to improve performance. |
| Compare pipelines |
|
Explains the relative performance of the pipelines and identifies the best model. |
| Delete a pipeline |
|
Permanently removes the specified pipeline and all of its nodes. |
| NODES |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Add a specific node |
| “Add a Linear Regression node.” |
|
Adds the node after the selected parent node with default properties. |
| Add a node by intent |
| “Add a node that reduces the number of inputs.” |
|
Adds an appropriate node for the described purpose. |
| Add a node by name and run |
| “Add a Gradient Boosting node to the Data node and run it.” |
|
Adds the node after the named parent and runs it. |
| Suggest the next node |
|
Lists candidate nodes with a button to add the one you choose. Available after an applicable parent node has been run. |
| Suggest a pipeline |
| “Suggest a pipeline for this project.” |
|
Runs trials to find the best pipeline. |
| Get node information |
| “What is the Linear Regression node?” |
|
Describes the node. |
| Get parameter information |
| “What does the Selection Method property do?” |
|
Explains the parameter and its possible values. |
| List node templates |
| “What node templates are available?” |
|
Lists node templates and describes each one’s purpose. |
| Run a node |
| “Run the Decision Tree node.” |
|
Runs the node (and any preceding unrun nodes). Monitor pipeline status to confirm success. |
| Analyze node results |
| “Explain the forest node results.” |
|
Provides an overview, an analysis of key findings, and a conclusion. Prompts you to run the node first if needed. |
| Improve a node |
| “Improve the Linear Regression node.” |
|
Runs an iterative tuning process on supported nodes; progress appears in the Reasoning Steps dropdown. |
| EVALUATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| List / interpret component reports |
| “What reports are available for the Gradient Boosting node?” |
|
Lists available reports or gives a plain-language summary of results, tailored to your audience. |
| Row-level interpretability |
| “Why did the model predict churn for this customer?” |
|
Identifies the factors that most influenced the prediction for that observation. Requires a Model Interpretability method (LIME, HyperSHAP, or ICE) to be enabled. |
| Interpret pipeline comparison |
| “Explain the pipeline comparison results for project My Project.” |
|
Identifies the top-performing pipeline, explains the key differentiating metrics, and notes champion / challenger designations. |
| DEPLOYMENT |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| List publish destinations |
| “What publish destinations are available?” |
|
Lists the destinations to which models can be published. |
| Publish a model |
| “Publish the champion model from Pipeline 1 in project My Project to the <destination>.” |
|
Publishes the registered model to the specified destination. |
| GETTING STARTED IN SAS MODEL MANAGER |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Import models |
|
Shares a list of supported files for import and how to import the files |
| Import models |
| “Can models from Model Studio be registered?” |
|
Shares the steps for registering models from SAS Model Studio |
| Model Card |
| “How can I create a model card?” |
|
Shares the prerequisites for a model card, steps for populating a model card, and where to learn more |
| Score Test |
| “How can I create a score test?” |
|
Shares the steps for creating and running a score test as well as supported score code types |
| Deployments |
| “What publishing destinations are available?” |
|
Shares a list of publishing destinations that can be configured |
| Deployments |
| “What destinations support Python models?” |
|
Shares the list of publishing destinations where Python can be deployed |
| Performance Monitoring |
| “How can I set up performance monitoring for my model?” |
|
Shares the steps for creating a performance monitoring report |
| Workflow |
|
Shares information about SAS Workflow Manager |
| PROJECT & MODEL MANAGEMENT (Available after 2026.08) |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Create a project |
| Create a new project named “Demo Project”. |
|
Creates a new project named “Demo Project”. |
| Update a project’s properties |
| Set the Model Function of “Demo Project” to “Classification”. |
|
Updates the Model Function property of the project named “Demo Project” to be “Classification”. |
| Copy a model into a project |
| Copy the “QS_Reg1” model to the “Demo Project” project? |
|
Copies the “QS_Reg1” model from within somewhere else in SAS Model Manager into the “Demo Project”. |
| Set a model role |
| Set QS_Reg1 to be the champion of the Demo Project. |
|
Sets the model “QS_Reg1” to the champion model role. |
| Search models |
| What models are in “Demo Project”? |
|
Lists the models within “Demo Project”. |
| Search projects |
|
Lists the projects within SAS Model Manager. |
| Delete a model |
| Delete the model QS_Reg1. |
|
After user provides additional confirmation, deletes the model named “QS_Reg1”. |
| Delete a project |
| Delete the project named “Demo Project”. |
|
After user provides additional confirmation, deletes the project named “Demo Project”. |
| MODEL PUBLISHING (Available after 2026.08) |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Get list of publishing destinations |
| What publishing destinations are available? |
|
Lists the available publishing destinations. |
| Publish a model |
| Publish QS_Reg1 to maslocal. |
|
Publishes the model named “QS_Reg1” to the out-of-the-box SAS Micro Analytics Service destination, named maslocal. |
| SAS® Intelligent Decisioning Viya Copilot for Intelligent Decisioning Back to top ↑ |
| SAS® Data Governance Viya Copilot for Data Discovery (formerly SAS Information Governance) Back to top ↑ |
| GETTING STARTED IN SAS DATA GOVERNANCE |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Asset discovery |
| “How do I search for data assets?” |
|
Explains how to search the catalog, filter results, and identify relevant assets |
| SEARCH AND DISCOVERY |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Asset discovery |
| “What search facets are available to find tables, reports, and data flows?” |
|
Describes available search facets, filters, and best practices for locating assets |
| UNDERSTANDING METADATA |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Asset details |
| “What metadata is available for a cataloged data set?” |
|
Explains the types of metadata that can be viewed, such as contacts, tags, business description, and column metadata |
| DATA GOVERNANCE |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Data lineage |
| “How can I determine where a specific asset is used downstream?” |
|
Explains how lineage can be used to identify dependent assets and assess change impact |
| Tagging |
| “How do tags help organize and classify assets?” |
|
Explains how tags can be used to classify assets, improve search results, and provide business context |
| Asset ownership and status |
| “How can I identify contacts and review the status of a data set?” |
|
Describes where ownership information and review status is stored and how to locate responsible contacts |
| CATALOG AGENTS |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Agent creation |
| “How do I create an agent to help users discover and understand data assets?” |
|
Explains agent setup requirements, configuration options, and supported use cases |
| SAS® Visual Analytics Viya Copilot for Visual Analytics Back to top ↑ |
|
PROMPTING BEST PRACTICES FOR SAS VISUAL ANALYTICS
Reference report objects explicitly. Refer to the object by type (e.g., "the bar chart"), or by the object’s name when there are multiple objects. Use exact data item names. If a data item includes special characters, wrap it in a SAS name literal, e.g., "Profit (1M Difference)"n. Number multi-step requests. Break a compound prompt into numbered subtasks, so that the copilot executes them in order. Chain your reasoning. For complex work, ask smaller follow-up questions instead of one big request. Start a new conversation when switching tasks. The copilot uses prior context, so open a fresh chat for an unrelated task.
Adapted from Nithin Ramu’s article Getting Started with SAS Viya Copilot for SAS Visual Analytics.
|
| DATA EXPLORATION AND VISUALIZATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Data exploration |
| “What visualizations work best for this customer data set?” |
|
Suggests the object types that best fit your variables |
| Key driver analysis |
| “What are the key drivers of Loan Status?” |
|
Describes the characteristics of Loan Status and its most related factors |
| DATA PREPARATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Modifying data item properties |
| “Change the formats of Loan Amount and Property value from Numeric to Dollar” |
|
Changes both data items’ format property to Dollar |
| Data transformations |
| “Create a new higher-level grouping based on Job” |
|
Creates a new custom category that groups Job values into higher-level buckets |
| Data transformations |
| “Create a new hierarchy using Application Month and Date” |
|
Creates a new hierarchy that drills down from Application Month to Date |
| Expression generation |
| “Create a percent difference from previous month calculation using Claim Amount and Date” |
|
Creates a new aggregation that calculates month-over-month difference in Claim Amount |
| BUILDING BASIC REPORTS AND DASHBOARDS |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Executive dashboard |
| “Show me monthly sales trends for the past year with regional breakdown” |
|
Builds a time series plot grouped by region |
| Performance analysis |
| “Create a page comparing product performance across regions” |
|
Builds a page with multiple objects that compare products across regions |
| User control |
| “Add date range and category filters to this report” |
|
Adds interactive date and category filters |
| User control |
| “Making this report page interactive” |
|
Creates report actions between objects on the page for dynamic interaction |
| ADVANCED VISUALIZATION TECHNIQUES |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Location analysis |
| “Map customer distribution by state with sales volume” |
|
Builds a geo bubble map with bubbles that are sized by sales volume |
| Forecasting |
| “Create a forecast that projects the Loans in Default using Application Month” |
|
Creates a forecasting object that lets us see projected trends in defaulted loans |
| Identifying correlations |
| “I want to visualize the relationships between Debt-to-Income Ratio, Delinquent Accounts, Property Value, and Loan Status” |
|
Creates a correlation matrix to identify patterns and relationships associated with defaulted loans |
| Joining data |
| “Join the Sales table with Customer table on CUSTOMER_ID” |
|
Creates a joined data source based on Sales and Customer tables |
| INSIGHT GENERATION |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| Chat with your data |
| “What are the top 10 best-selling products in the Southwest territory?” |
|
Answers using the data with an in-chat visual for easy interpretation |
| Chat with your data |
| “Why did sales spike in Q3?” |
|
Suggests next steps to better investigate the “why” |
| SAS® Visual Investigator Viya Copilot in Visual Investigator Back to top ↑ |
| USE CASE |
PROMPT |
EXPECTED OUTPUT |
| View Objects |
| Case summarization |
| “Summarize this person’s notes” |
|
A concise summary of the notes associated with the currently open person object. |
| Change objects |
|
The active view switches to the Mary Smith object or tab. |
| Obtain object information |
| “When was the John Smith object created?” |
|
The creation date or available metadata for the John Smith object. |
| Obtain object information |
| “What is John Smith’s date of birth?” |
|
The requested information from the object record, such as a specific field value or summary. |
| Open objects |
|
The John Smith object opens so the user can review its details. |
| Open related objects |
| “Do any of this person’s family members have any open claims?” |
|
A response identifying whether linked family members have open claims, based on available relationship and claim data. |
| Get Help with SAS Visual Investigator |
| Relationship guidance |
| “How do I create a relationship between objects?” |
|
Step-by-step guidance or documentation-based instructions for completing the task. |
| Understand capabilities |
| “Can all users create relationships?” |
|
An explanation of whether relationship creation is available to all users or depends on user permissions and configuration. |
| Workspace guidance |
| “How do I add objects to a workspace?” |
|
Instructions for adding one or more objects to an existing or new workspace. |
| Search |
| Name-based search |
| “Show me any people with the surname Smith” |
|
A list of matching objects that meet the search criteria. |
| Relationship search |
| “Is John Smith related to anyone under the age of 16?” |
|
A response identifying any related people under the age of 16, based on available relationship and date-of-birth data. |
| Person record search |
| “Do we have any information on a Mary Smith from Washington?” |
|
A list of matching Mary Smith records from Washington or a response indicating that no matching information was found. |
SAS® and SAS® Viya® are registered trademarks of SAS Institute Inc.
|