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
- 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.
- 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.
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.
- After optimization, click Create, and the template is successfully created.
Method 2: Prompt Engineering–Based Creation
- 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.
- Select a prompt engineering framework. Different frameworks suit tasks of varying complexity—see the reference table in Prompt Engineering Frameworks Explained.
- Fill in the corresponding input fields based on the selected framework's structure.
- 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.
- Click Optimize, and the system will intelligently polish and enhance your inputs.
- 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.
- 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.
- Navigate to Component Management > Prompts page and click + Create Prompt. Configure the following:
- Template Name: Enter a custom name.
- Model Type: Select Image Generation.
- Enter the Positive Prompt and Negative Prompt separately.
- 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.
- 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.
| Framework | Use Case |
|---|---|
| ICIO | Simple, well-defined tasks: data analysis, content generation, text summarization. |
| CRISPE | Role-based interactions requiring AI to assume a specific persona: customer service bots, creative writing assistants, interview simulators. |
| RASCEF | Multi-step, complex business workflows: project planning, strategic analysis, process design. |
ICIO Framework
| Component | Description | Example |
|---|---|---|
| Instruction | What task must be performed. | Please write a blog post about sustainable energy (~1,000 words), suitable for intermediate-level readers. |
| Context | Background information enabling AI to understand situational context. | The world currently faces an energy crisis, and interest in environmentally friendly energy solutions is growing. |
| Input Data | Specific 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 Indicator | Desired 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
| Component | Description | Example |
|---|---|---|
| Capacity and Role | Define AI's role (e.g., educator, translator, advisor). | You are a professional negotiation consultant helping companies attract candidates without exceeding budget. |
| Insight | Contextual 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). |
| Statement | Clear task directive. | Simulate a negotiation dialogue where the candidate seeks higher pay, and you highlight alternative benefits to retain them. |
| Personality | Tone, style, and formatting preferences. | Maintain professional, firm demeanor while demonstrating empathy and understanding. |
| Experiment | Optional request for multiple variations. | Generate two versions: one emphasizing rational analysis/data, another focusing on emotional connection and personal growth. |
RASCEF Framework
| Component | Description | Example |
|---|---|---|
| Role | AI's functional identity (e.g., email marketer, project manager). | You are a marketing strategist responsible for developing a comprehensive go-to-market plan. |
| Action | Concrete task to execute. | Develop a strategy covering market analysis, target audience segmentation, and promotional activities. |
| Script | Step-by-step execution plan. | 1. Conduct market research. 2. Identify key audience segments. 3. Select marketing channels. 4. Plan campaign phases. |
| Content | Situational background. | Product is an innovative home security technology. |
| Example | Illustrative sample showing tone/style. | Draw inspiration from successful tech product launches. |
| Format | Output 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:
| Component | Before Optimization | After Optimization |
|---|---|---|
| Instruction | Perform 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. |
| Context | We 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 Data | Sales 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 Indicator | Product 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). |
| Component | Before Optimization | After Optimization |
|---|---|---|
| Capacity and Role | You'll act as a poet. | In this soulful exchange, you embody a masterful bard—crafting verses that stir emotion, illuminate truth, and ignite imagination. |
| Insight | As 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. |
| Statement | Help 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. |
| Personality | Be 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. |
| Experiment | Provide 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. |
| Component | Before Optimization | After Optimization |
|---|---|---|
| Role | Email marketer. | Email marketer. |
| Action | Draft an email inviting customers to a new product launch. | Draft an email inviting customers to a new product launch. |
| Script | Greet 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. |
| Content | We'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. |
| Example | Dear [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. |
| Format | Formal email format. | Formal email format—prioritizing professional tone, logical structure, clarity, and courtesy. |
Related Documentation
- To create custom prompt templates programmatically via API, see Creating Custom Prompt Templates via API.
- To view, manage, and use custom prompt templates, see Managing Custom Prompt Templates.