Skip to main content
Prompt

Custom Prompt Templates

Building high-quality prompts from scratch is time-consuming and often fails to ensure consistent output quality. With Alibaba Cloud Bailian's custom prompt template feature, you can efficiently design, manage, and optimize prompts using structured, reusable templates—ensuring stable, high-quality model outputs.

Creating Text Generation Templates

Primarily used for text creation, knowledge Q&A, code generation, and conversational interaction. Supports structured design via prompt engineering frameworks. Two creation methods are available:
  • Custom Creation: Ideal when you already have a working prompt and want to quickly convert it into a template or perform simple optimizations.
  • Prompt Engineering–Based Creation: Best suited for building high-quality, complex-task prompts—or when you wish to leverage professional frameworks to spark ideas and ensure structural completeness.

Method 1: Custom Creation

  1. Navigate to Component Management > Prompts page and click + Create Prompt. Configure the following:
    • Template Name: Enter a custom name.
    • Model Type: Select Text Generation.
    • Task Type: Select a task type.
  2. In the Template Content & Optimization section, enter your prompt (e.g., Please help me write a 100-word sales data analysis report) in the text input box, then click the Optimize button (top-right corner) to refine it.
Optimization Example: Enter your original prompt in the prompt editor, e.g., Please help me write a 100-word sales data analysis report, then click the Optimize button (top-right corner). The optimized prompt expands the original concise request into a structured instruction, including:
  • Task Instruction: Write a concise sales data analysis report (~100 words).
  • Requirement 1: Briefly summarize sales performance.
  • Requirement 2: Include key metrics—total sales revenue, best-selling product, growth rate.
  • Requirement 3: Analyze underlying causes behind the data and identify trends.
  • Requirement 4: Conclude with actionable recommendations or next steps.
Ends with: "Please complete this sales data analysis report according to the above guidelines." Character count: 189 / 8,000.
  1. After optimization, click Create, and the template is successfully created.
Upon successful creation, the page automatically redirects to the resource detail page, displaying basic configuration parameters in a two-column table layout.

Method 2: Prompt Engineering–Based Creation

  1. Navigate to Component Management > Prompts page and click + Create Prompt. Configure the following:
    • Template Name: Enter a custom name.
    • Model Type: Select Text Generation.
    • Task Type: Select a task type.
  2. Select a prompt engineering framework. Different frameworks suit tasks of varying complexity—see the reference table in Prompt Engineering Frameworks Explained.
  3. Fill in the corresponding input fields based on the selected framework's structure.
Example: Using the ICIO framework, fill in the following:
  • Instruction: Please write a blog post about sustainable energy (~1,000 words), suitable for intermediate-level readers.
  • Context: The world currently faces an energy crisis, and interest in environmentally friendly energy solutions is growing. The article should cover fundamental concepts of sustainable energy, major types, and how they help reduce carbon footprints.
  • Input Data: Consider the following data points: recent developments in solar and wind energy, government support for sustainable energy projects, and their potential impact on greenhouse gas reduction.
  • Output Indicator: The article must be well-structured (introduction, main body, conclusion), written in accessible language with minimal technical jargon. Include factual data and citations to strengthen credibility.
  1. Click Optimize, and the system will intelligently polish and enhance your inputs.
Key Improvements:
  • Precision in Objective: Clearly defines the core educational goal and strengthens strategic alignment.
  • Deepened Context: Adds causal chain (fossil fuels → crisis → demand → solution) to build a compelling narrative arc.
  • Concrete Data: Names specific renewable sources (solar/wind/hydro) to guide practical application.
  • Enhanced Structure: Shifts from listing elements to a cognitive journey: engaging hook → detailed exposition → action-oriented conclusion.
  • Layered Language: Balances technical accuracy with accessibility, precisely calibrated for intermediate readers.
  • Trust Architecture: Establishes dual verification via facts + authoritative citations.
  1. After optimization, click Create, and the template is successfully created.

Creating Image Generation Templates

Designed primarily for image creation scenarios. Supports separate definition of positive and negative prompts to control visual content and artistic style.
  1. Navigate to Component Management > Prompts page and click + Create Prompt. Configure the following:
    • Template Name: Enter a custom name.
    • Model Type: Select Image Generation.
  2. Enter the Positive Prompt and Negative Prompt separately.
Positive prompts instruct the large model on desired visual elements; negative prompts specify undesired elements. Thoughtful use of both significantly improves alignment between generated images and user intent. Example:
  • Positive Prompt: Generate a vibrant night sky filled with twinkling stars and streaking meteors, reflected in the calm surface of a serene lake—evoking tranquility and wonder.
  • Negative Prompt: Exclude dark or blurry backgrounds; avoid black or deep gray tones. Do not include urban architecture, withered trees, or any oppressive elements. Ensure the overall mood remains bright and uplifting.
  1. After entering both prompts, click Create, and the template is successfully created.

Prompt Engineering Frameworks Explained

The platform includes multiple built-in prompt engineering frameworks—providing structured mental models for complex tasks.
FrameworkUse Case
ICIOSimple, well-defined tasks: data analysis, content generation, text summarization.
CRISPERole-based interactions requiring AI to assume a specific persona: customer service bots, creative writing assistants, interview simulators.
RASCEFMulti-step, complex business workflows: project planning, strategic analysis, process design.

ICIO Framework

ComponentDescriptionExample
InstructionWhat task must be performed.Please write a blog post about sustainable energy (~1,000 words), suitable for intermediate-level readers.
ContextBackground information enabling AI to understand situational context.The world currently faces an energy crisis, and interest in environmentally friendly energy solutions is growing.
Input DataSpecific data or facts the AI must consider.Consider the following data points: recent developments in solar and wind energy, government support for sustainable energy projects.
Output IndicatorDesired format, content, and quality standards for output.Well-structured (introduction, main body, conclusion); plain language; minimal jargon; inclusion of factual data and citations for credibility.

CRISPE Framework

ComponentDescriptionExample
Capacity and RoleDefine AI's role (e.g., educator, translator, advisor).You are a professional negotiation consultant helping companies attract candidates without exceeding budget.
InsightContextual background for role enactment.Candidates have competing offers and expect higher salaries—but our fixed salary budget allows flexibility in non-monetary benefits (e.g., flexible hours, stock options, career development).
StatementClear task directive.Simulate a negotiation dialogue where the candidate seeks higher pay, and you highlight alternative benefits to retain them.
PersonalityTone, style, and formatting preferences.Maintain professional, firm demeanor while demonstrating empathy and understanding.
ExperimentOptional request for multiple variations.Generate two versions: one emphasizing rational analysis/data, another focusing on emotional connection and personal growth.

RASCEF Framework

ComponentDescriptionExample
RoleAI's functional identity (e.g., email marketer, project manager).You are a marketing strategist responsible for developing a comprehensive go-to-market plan.
ActionConcrete task to execute.Develop a strategy covering market analysis, target audience segmentation, and promotional activities.
ScriptStep-by-step execution plan.1. Conduct market research. 2. Identify key audience segments. 3. Select marketing channels. 4. Plan campaign phases.
ContentSituational background.Product is an innovative home security technology.
ExampleIllustrative sample showing tone/style.Draw inspiration from successful tech product launches.
FormatOutput structure (e.g., paragraph, list, dialogue).Structured document with dedicated sections for each key area.

Optimization Examples

The following shows before/after optimization comparisons for each framework: ICIO Optimization Example:
ComponentBefore OptimizationAfter Optimization
InstructionPerform an in-depth analysis of this sales data.Conduct a comprehensive, granular analysis of the provided sales data to uncover sales dynamics, identify latent challenges, and reveal optimization opportunities.
ContextWe aim to understand sales trends, detect issues, and find improvement opportunities—to refine sales strategy and boost performance.Our core objective is to leverage precise data interpretation to map product-line sales trajectories, decode seasonal fluctuations, and pinpoint critical internal/external factors influencing sales outcomes. This analysis directly informs strategic adjustments and market performance enhancement.
Input DataSales data file containing date, product, quantity sold, revenue.A detailed sales dataset encompassing essential transactional metrics—including transaction date, product category, units sold, and total revenue.
Output IndicatorProduct sales trends. Top/bottom performers. Seasonal variation. Revenue vs. volume comparison. Factors affecting sales.Sales Trend Overview: Visualize temporal evolution across product lines. Star & Watchlist Products: Flag top performers and underperformers for targeted strategy. Seasonal Pattern Analysis: Identify recurring peaks/troughs to inform timing decisions. Revenue–Volume Correlation: Assess pricing elasticity and demand sensitivity. Key Performance Drivers: Surface influential variables (e.g., competitive intensity, pricing, campaign ROI).
CRISPE Optimization Example:
ComponentBefore OptimizationAfter Optimization
Capacity and RoleYou'll act as a poet.In this soulful exchange, you embody a masterful bard—crafting verses that stir emotion, illuminate truth, and ignite imagination.
InsightAs a poet, you excel at composing verse on diverse themes—from nature's beauty to abstract concepts.You possess the rare gift of transforming human emotion, natural grandeur, and philosophical inquiry into lyrical brilliance—each line resonating with layered meaning and boundless vision.
StatementHelp me write a poem—choose any theme you deem most fitting.I invite you to compose an original poem—freely choosing theme and form—to celebrate nature's majesty, honor love's depth, or contemplate life's profound mysteries.
PersonalityBe poetic and rhythmic; use beautiful words and imagery.Let your response shimmer like morning dew—crystalline, vital, alive. Employ rich literary devices (personification, metaphor, hyperbole) so every phrase sparks poetic fire and transports readers into realms of aesthetic grace and philosophical insight.
ExperimentProvide three poems of different styles/themes for selection.Present three distinct masterpieces: a pastoral ode to summer fields, a heart-wrenching elegy on parting, and a cosmic meditation on universal enigmas—so I may fully appreciate your boundless artistry and select the one that resonates deepest.
RASCEF Optimization Example:
ComponentBefore OptimizationAfter Optimization
RoleEmail marketer.Email marketer.
ActionDraft an email inviting customers to a new product launch.Draft an email inviting customers to a new product launch.
ScriptGreet customers; thank them. Briefly introduce event theme/importance. Provide date/time/location. Highlight attendee benefits. Specify RSVP method. Close with anticipation + contact info.Begin with personalized greeting; express sincere gratitude for long-term partnership. Outline core theme and strategic significance for both company and customers. State exact date, time, and venue. Emphasize exclusive perks (e.g., early access, tailored services). Clearly state RSVP instructions or registration link. Close warmly—anticipating in-person connection—and provide full contact details.
ContentWe're launching a new product and want to showcase its advantages while strengthening client relationships and driving sales.This groundbreaking product embodies our innovation ethos. The launch isn't just about unveiling features—it's a shared milestone to deepen trust, align goals, and accelerate mutual growth.
ExampleDear [Customer Name], Thank you for your continued support... [standard template][Exclusive Invitation] Discover the Future: [Product Name] Launch Awaits! Dear [Customer Name], We sincerely thank you for your enduring trust in [Company Name]. It is our privilege to announce an extraordinary event: the grand launch of [Product Name], taking place on [Date] at [Venue]. This isn't merely a product debut—it's your first-hand experience of innovation designed to transform your success. As a valued partner, you'll enjoy priority access, bespoke consultations, and limited-time incentives. To secure your seat, please reply to this email by [RSVP Deadline] or register instantly via: [Registration Link]. We eagerly await welcoming you in person—and celebrating this milestone together.
FormatFormal email format.Formal email format—prioritizing professional tone, logical structure, clarity, and courtesy.