All Products
Search
Document Center

Alibaba Cloud Model Studio:Custom Prompt Templates

Last Updated:Mar 15, 2026

Custom prompt templates save structured, reusable prompts -- define the logic once and apply it consistently across text and image generation workflows.

Important

This topic is applicable only to the International Edition (Singapore region).

Model Studio supports two template types:

Template type Use case
Text generation Content creation, knowledge-based Q&A, code generation, and chat interactions
Image generation Controlling image content and style through positive and negative prompts

Create a text generation template

Text generation templates support two input modes:

Input mode Best for
Custom Creation Converting an existing prompt into an optimized template
Create Based on Prompt Framework Building structured prompts for complex tasks using ICIO, CRISPE, or RASCEF frameworks

Option A: Custom creation

Paste an existing prompt and Model Studio optimizes it automatically.

  1. Go to the Prompts page. Click Create Prompt. Then configure the following information.

    1. Template Name: Enter a custom name.

    2. Basic Information: Set to Text Generation.

    3. Input Mode: Set to Custom Creation.

      Custom Creation configuration

    4. Enter your prompt in the text box and click Optimize Prompt.

      Model Studio refines your prompt for clarity, structure, and quality.

      Example: Enter Write a 100-word sales data analysis report.
      Before optimization After optimization
      Before optimization After optimization
  2. Review the optimized prompt and click Save. Your template now appears on the Prompts page.

    Save the template

Option B: Prompt framework

Build structured prompts by filling in framework-specific fields. This approach works well for complex tasks requiring explicit instructions, context, and output requirements.

  1. Go to the Prompts page. Click Create Prompt. Then configure the following information:

    1. Template Name: Enter a name for your template.

    2. Basic Information: Select Text Generation.

    3. Input Mode: Select Create Based on Prompt Framework.

  2. Select a Prompt Optimization Method. Each framework targets different task complexity levels. See Prompt engineering frameworks for details.

  3. Fill in the fields for the selected framework.

    Example: Select the ICIO framework. Fill in the following content.

    • Instruction: Write a blog post about sustainable energy. The post should be approximately 1000 words and suitable for an intermediate-level audience.

    • Context: The world is facing an energy crisis, and interest in environmentally friendly energy solutions is growing. The article should cover the basic concepts of sustainable energy, its main types, and how these types help reduce carbon footprints.

    • Input Data: As the world confronts an energy crisis, interest in sustainable energy solutions is growing. This article covers the fundamental concepts of sustainable energy, its primary types, and how they help reduce carbon footprints.

    • Output Indicator: The article must be well-structured with an introduction, body, and conclusion. Use easy-to-understand language and avoid excessive technical jargon. Ensure that the article includes factual data and references to enhance its persuasiveness.

    ICIO framework input fields

  4. Click Optimize Prompt. Model Studio refines and enhances your input.

    Before optimization After optimization
    Before optimization After optimization
  1. Review the optimized prompt and click Save. The template is saved and appears on the Prompts page.

    Save the template

Create an image generation template

Image generation templates use positive and negative prompts to control what to include or exclude.

  1. Go to the Prompts page. Click Create Prompt. Then configure the following information:

    1. Template Name: Enter a name for your template.

    2. Basic Information: Select Image Generation.

  2. Enter the Positive Prompt and Negative Prompt.

    • Positive Prompt: What to include -- subjects, colors, mood, style.

    • Negative Prompt: What to exclude -- unwanted elements, colors, qualities.

    Example:

    • Positive Prompt: Generate a brightly colored night sky, with stars twinkling and meteors streaking across. The background is a serene lake surface, where the water reflects the radiance of the stars. The scene gives people a sense of tranquility and dreams.

    • Negative Prompt: Do not generate any dark or blurry backgrounds. Avoid using black or dark gray. There should be no urban buildings, withered trees or any elements that seem depressing in the picture. Make sure the overall atmosphere is bright and pleasant.

    Image generation prompts

  3. Click Save. The template is ready to use on the Prompts page.

    Save the template

Prompt engineering frameworks

Model Studio provides three prompt engineering frameworks, each suited to different task complexities.

Framework Best for Components
ICIO Straightforward tasks like data analysis, content generation, and text summarization Instruction, Context, Input Data, Output Indicator
CRISPE Role-based interactions like chatbots, creative writing, and interview simulations Capacity and Role, Insight, Statement, Personality, Experiment
RASCEF Multi-step business processes like project planning, strategic analysis, and process design Role, Action, Script, Context, Example, Format

Appendix 1: Text Generation Prompt Framework Details

ICIO

ICIO breaks prompts into four parts: task, background, input data, and output format.

Component Purpose Example
Instruction Define the task Write a blog post about sustainable energy. The post should be approximately 1000 words and suitable for an intermediate-level audience.
Context Provide background information The world is facing an energy crisis, and interest in environmentally friendly energy solutions is growing. The article should cover the basic concepts of sustainable energy, its main types, and how they help reduce carbon footprints.
Input Data Specify data the model should consider Consider the following data points: the latest developments in solar and wind energy, government support for sustainable energy projects, and the potential impact of sustainable energy on reducing greenhouse gas emissions.
Output Indicator Define format, content, and quality standards The article must be well-structured with an introduction, body, and conclusion. Use easy-to-understand language and avoid excessive technical jargon. Ensure that the article includes factual data and references to enhance its persuasiveness.

CRISPE

CRISPE assigns the model a specific role and persona, providing context and task instructions within that role.

Component Purpose Example
Capacity and Role Define the role the model assumes You are a professional negotiation consultant helping a company attract a candidate without exceeding its budget.
Insight Provide background for the role The candidate currently has other job offers and expects a higher salary. However, our company has a fixed salary budget but can offer other benefits, such as flexible work hours, stock options, and career development opportunities.
Statement State the task Simulate a negotiation conversation in which the candidate tries to negotiate a higher salary, and you present the company's other benefits to attract them.
Personality Set response style and tone In the negotiation, be professional and firm, but also show understanding and consideration to better communicate with the candidate.
Experiment Request multiple variations Generate two different versions of the negotiation dialogue. One version should focus on rational analysis and data support, and the other should focus on emotional connection and personal development.

RASCEF

RASCEF provides the most structure with explicit steps, examples, and output formats -- ideal for multi-step workflows.

Component Purpose Example
Role Define the model's role You are a market strategist responsible for creating a comprehensive go-to-market plan.
Action Specify the task Develop a strategy that includes market analysis, target audience, and promotional activities.
Script Outline the steps to follow 1. Start with market research. 2. Identify key audience segments. 3. Select marketing channels. 4. Plan the different phases of the campaign.
Context Provide background information The product is a technological innovation designed to improve home security.
Example Show desired tone and style Refer to successful launch cases in the tech industry for inspiration.
Format Set the output format Present the strategy in a structured document, with a section for each key area.

Appendix 2: Text Generation Prompt Framework Optimization Examples

Optimization examples

These examples show how Model Studio enhances prompts in each framework.

ICIO optimization example

Component Before optimization After optimization
Instruction Please conduct an in-depth analysis of this sales data. Conduct a comprehensive analysis of the provided sales data to uncover sales dynamics, identify challenges, and discover optimization opportunities.
Context We want to analyze sales data to understand sales trends, find problems, and identify potential improvement opportunities. This will help us optimize our sales strategy and improve performance. Our core objective is to use data analysis to track product sales trajectories, understand seasonal fluctuation patterns, and investigate factors that hinder or boost sales effectiveness. The analysis results will inform sales strategy adjustments and market performance improvements.
Input Data The provided sales data file, which includes information such as date, product, sales quantity, and sales amount. Sales data document covering transaction details: date, product category, sales volume, and total sales amount.
Output Indicator 1. Sales trends for each product. 2. Best-selling and worst-selling products. 3. Seasonal sales variations. 4. Comparison of sales amount and sales quantity. 5. Identification of factors that may affect sales. 1. Product sales trend overview: Map sales evolution of each product over time. 2. Star and potential product identification: Identify top performers and those needing attention for targeted strategy adjustments. 3. Seasonal sales fluctuation analysis: Explore periodic patterns to capture seasonal peaks and troughs. 4. Sales amount and volume correlation: Compare and analyze the interaction between sales amount and volume to reveal pricing or demand elasticity. 5. Key sales performance drivers: Identify internal and external variables significantly impacting sales performance (market competition, pricing strategies, marketing effectiveness).

CRISPE optimization example

Component Before optimization After optimization
Capacity and Role In this interaction, you will act as a poet. You will embody a brilliant poet, weaving moving verses with your wisdom and inspiration.
Insight As a poet, you are skilled at creating poems on various themes, whether describing the beauty of nature, expressing emotions, or depicting abstract concepts. As a poet, you transform delicate emotions, nature's scenery, and philosophical thoughts into beautiful verses with profound meaning and imagination.
Statement Please help me write a poem. You can decide on the most suitable theme. Please create a poem. The theme and style are up to you -- whether praising nature, celebrating love, or exploring life's meaning. I look forward to your unique perspective.
Personality Your response should be full of poetry and rhythm. Pay attention to using beautiful words and imagery. Use rich rhetorical devices (personification, hyperbole, metaphor) to make every word spark with poetic fire, leading readers into beauty and philosophical thought.
Experiment Please provide three poems of different styles and themes so I can choose the most suitable one. Please provide three poems of different styles: a pastoral poem depicting summer fields, a love poem about parting, and a philosophical poem exploring the universe's mysteries. This way, I can appreciate your creative talent and choose the most compelling one.

RASCEF optimization example

Component Before optimization After optimization
Role Email marketer. Email marketer.
Action Write an email to invite customers to a new product launch event. Write an email to invite customers to a new product launch event.
Script 1. Greet the customer and thank them for their support and cooperation. 2. Briefly introduce the theme and importance of the new product launch event. 3. Provide the specific date, time, and location of the launch event. 4. Explain the benefits or special offers for customers who attend the launch event. 5. Provide a way to sign up or reply so customers can confirm their attendance. 6. End the email by expressing your anticipation of meeting the customer and provide contact information. 1. Start with a personalized greeting and express gratitude for the customer's long-term support. 2. Outline the launch event's core theme and importance to the company and customers. 3. Provide the exact date, time, and location. 4. Highlight unique benefits or offers customers will enjoy by attending. 5. Clearly indicate the registration process or reply method to confirm attendance. 6. End with enthusiasm about meeting the customer and provide detailed contact information.
Context Our company is about to launch a new product. We hope to showcase its advantages and features to customers through a launch event, while also strengthening customer relationships and promoting sales growth. The upcoming product is the culmination of our company's innovation. Through the launch event, we aim to showcase the product's unique value, deepen customer connections, and drive business growth.
Example Dear [Customer Name], Thank you for your continued support and love for our company. We are pleased to announce that we will be holding a new product launch event on [Date] at [Location] to showcase our latest product, [Product Name]. This is an excellent opportunity for you to be the first to learn about this product's innovative features and significant advantages. In addition, customers who attend the launch event will enjoy special offers and limited-time discounts. If you would like to attend, please reply to this email or click the link below to sign up: [Registration Link]. We look forward to seeing you at the launch event. If you have any questions, please feel free to contact us. Best regards, [Your Name] [Your Title] [Company Name] [Contact Information] [Exclusive Invitation] The [Product Name] Launch Event. Dear [Customer Name], Thank you for your long-term trust and support in [Company Name]. We are pleased to invite you to our new product launch event on [Date] at [Location], where we will introduce [Product Name]. This event offers an excellent opportunity to learn about [Product Name]'s innovative features and market potential. As our valued customer, you will experience the product firsthand and enjoy exclusive benefits, including priority purchase rights and custom services. To secure your seat, please reply to this email by [Reply Deadline] or visit [Registration Link] to complete your registration. We look forward to meeting you at the event. If you have any questions or need more information, please feel free to contact us. Best regards, [Your Name] [Your Title] [Company Name] [Contact Information]
Format Formal email format. Use formal email format with professional language and logical structure.

What's next