Runoob Tutorial ArchiveEnglish

AI Product Design

AI Product Design

If you design AI features like ordinary software features, the result is likely to disappoint users.

When ordinary software has an error, it will show an error message; when an AI product has an error, it might confidently talk nonsense, making you think it's correct.

This fundamental difference dictates that AI product design requires an entirely new approach.

Traditional product design pursues zero defects, where the user gets the same result every time. AI product design must acceptProbabilistic outputto help users understand and deal with the uncertainty of the results.


AI product thinking

To design an AI product well, you must first understand the uniqueness of AI and the psychological changes it will bring to users.

Probabilistic output

The output of large models is essentially probabilistic sampling; the same question may yield different answers each time, sometimes good, sometimes bad, sometimes mediocre. This is not a bug, but a characteristic of AI.

For designers, this means several key principles:

Design principles Specific implementation Why it is important
Provide a retry mechanism Allow users to "regenerate" Give the user a second chance if they are not satisfied
Display multiple options Generate 3-5 versions simultaneously for selection Increase the probability of the user finding a satisfactory result
Allow editing and modification AI-generated content should be easy to edit Users can correct imperfections
Set quality expectations Inform users that "the results may need adjustment" Avoid setting overly high user expectations

Excellent AI products do not try to hide this uncertainty, but turn it into an advantage.

User psychology: Expectation management

Users' expectations of AI often swing between two extremes: either too high or completely skeptical.

First-time ChatGPT users often exclaim how amazing it is, believing AI can do everything.

After AI makes a simple mistake, they might immediately switch to thinking AI is just average.

The product designer's task is to guide user expectations into a reasonable range.

How to do this?

A good AI product makes the user feel: AI is my assistant, not my boss.

Failure modes of AI products

The ways AI products fail are very different from traditional software.

Traditional software either works or it doesn't—it crashes, throws errors, or a feature doesn't work.

AI product failures are more subtle:

Failure modes Manifestation Countermeasures
Hallucination Fabricating non-existent facts, citations, or data Adding fact-checking, providing source annotations, and allowing users to verify
Alignment failure The content does not match the user's intent Providing clarifying questions, letting the user confirm intent, and multi-turn dialogue optimization
Unstable output quality Sometimes very good, sometimes very poor Provide multiple options, allow retries, and let users provide feedback ratings
Overconfidence Stating falsehoods in an assertive tone Add confidence display, use more cautious phrasing, and encourage questioning
Context loss Forgetting key information from previous conversations Display context summaries, allow history referencing, and provide conversation memory management

Understanding these failure modes is the first step in designing an AI product.


AI Feature Design Principles

Three core principles: progressive disclosure, user control, and transparent notification.

Progressive Disclosure

Do not present all features to the user at once.

The ideal flow is: first give the user a simple starting point, and then gradually display more options as needed.

For example, when a user writes an email:

The advantage of this design is:

Beginners will not be intimidated by complex options, while experts can find sufficient control.

Stage User sees User operates
Initial interface Simple input box Input basic requirements
After generation Results + basic adjustment options Select "more formal", "more concise", etc.
Expand advanced options Detailed parameter control Adjust temperature, role, format, etc.

Controllability: allow users to adjust AI output

Users need to feel like they are the final decision-makers.

Provide control knobs, not a one-time outcome of "accept or leave."

Common control dimensions:

Control dimension Typical options Applicable scenarios
Style/tone Formal, casual, humorous, professional Writing, emails, copywriting
Length Brief, medium, detailed, long-form Summary, article, report
Complexity Easy to understand, medium, professional depth Explanation, tutorial, technical documentation
Creativity Conservative, balanced, bold innovation Brainstorming, creative writing
Formatting Lists, paragraphs, tables, outlines Notes, planning, documentation

More advanced control: allowing users to directly edit AI prompts, or save their frequently used prompt templates.

Transparency: informing users that this was generated by AI

Letting users know they are interacting with AI is not just an ethical issue, but also a product experience issue.

Users may feel deceived if they believe the content was written by a human and then discover it was AI-generated.

If it is stated from the beginning that the content is AI-generated, users will be more tolerant and more willing to participate in improvements.

Several approaches to transparency:

Transparency builds trust. When users know it is AI, they will use it correctly—as a reference rather than blindly trusting it.


User experience design

AI products have several key experience nodes: loading state, error handling, and feedback mechanism.

Loading state design: streaming output

Large model generated content takes time. Letting users wait for 10 seconds will result in a poor experience.

The best practice is streaming output—content appears on the screen word by word.

Why is this good?

In addition to streaming output, you can also:

Error handling and fallback solutions

AI will inevitably make mistakes. Good product design makes errors less frightening.

When the AI output is clearly problematic:

More severe errors (e.g., the model is completely non-functional):

There should be a fallback plan. For example, when AI is unavailable, provide a template library for users to select manually.

Severity of error User behavior Product response
Minor issue The result has some flaws, but it is usable Provides an editing function for users to fine-tune
Medium issue The result is incorrect and needs to be regenerated Provides a retry button or suggests adjusting the input
Severe issue AI is completely not working Provides a fallback plan, such as a template library

Feedback Mechanism

User feedback is a valuable resource for improving AI products.

However, the feedback function should not be too complicated, or users will be unwilling to use it.

Simple and effective feedback design:

After collecting feedback, it is best to give the user a confirmation on the interface—"Thank you for your feedback, we have received it."


Productizing Prompts

Good prompts are the core competitiveness of AI products. Turn prompts from "magic" into manageable product features.

Encapsulating Prompts as Product Features

Ordinary users do not need to know what a "system prompt" is.

They only need to know: clicking this button will generate a draft of a formal email.

Therefore, the designer's job is to encapsulate complex prompts into simple function buttons.

For example:

The original prompt might be very long:

Original prompt (Chinese, left untranslated)



你是一个专业的邮件写作助手。请帮用户写一封正式、礼貌、简洁的商务邮件。

要求:1. 开头要有合适的称呼;2. 正文表达清晰;3. 结尾要有礼貌的结束语。

语气要专业但不生硬,友好但不过分随意。

After productization, the user only sees:

This is the core of prompt productization: keep the complexity for yourself, keep the simplicity for the user.

System Prompt version management

Prompts are not finished once written; they require continuous iteration.

You might find: a new version of the prompt is better for scenario A, but worse for scenario B.

Therefore, prompts need to be version-controlled like code.

Key practices:

When iterating prompts, always retain the ability to roll back. New versions may bring unexpected issues.

A/B Test Prompt

Two versions of prompts, which is better? Don't guess, let the data speak.

The idea for A/B testing:

Below is a simple Python script demonstrating how to perform Prompt A/B test analysis:

Example

============================================

Prompt A/B Test Analysis Script

Used to compare the effectiveness of two version prompts

============================================

from

dataclasses

import

dataclass

from

typing

import

List

,

Dict

,

Optional

import

statistics

@

dataclass

class

TestResult:

   

"""Data structure for a single test result"""

prompt_version:

str

     

"A" or "B"

user_satisfaction:

int

 

User satisfaction 1-5

retry_count:

int

       

User retry count

task_completed:

bool

   

Task completed

time_spent_seconds:

int

 

Time spent

test_case_id:

str

       

Test case identifier (e.g., different query types)

def

analyze_ab_test

(

results: List

[

TestResult

]

)

Dict:

   

"""Analyze A/B test results and return comparison statistics"""

   

Group by version

group_a

=

[

r

for

r

in

results

if

r.

prompt_version

==

"A"

]

group_b

=

[

r

for

r

in

results

if

r.

prompt_version

==

"B"

]

   

if

not

group_a

or

not

group_b:

       

return

{

"error"

:

"At least two versions of test data are required"

}

   

def

calc_stats

(

group: List

[

TestResult

]

)

Dict:

       

"""Calculate statistics for a single group"""

satisfaction_scores

=

[

r.

user_satisfaction

for

r

in

group

]

       

return

{

           

"sample_size"

:

len

(

group

)

,

           

"avg_satisfaction"

: statistics.

mean

(

satisfaction_scores

)

,

           

"median_satisfaction"

: statistics.

median

(

satisfaction_scores

)

,

           

"avg_retry"

: statistics.

mean

(

[

r.

retry_count

for

r

in

group

]

)

,

           

"completion_rate"

:

sum

(

1

for

r

in

group

if

r.

task_completed

)

/

len

(

group

)

,

           

"avg_time"

: statistics.

mean

(

[

r.

time_spent_seconds

for

r

in

group

]

)

,

       

}

stats_a

=

calc_stats

(

group_a

)

stats_b

=

calc_stats

(

group_b

)

   

Compare key indicators

comparison

=

{

       

"satisfaction_diff"

: stats_b

[

"avg_satisfaction"

]

[

"avg_satisfaction"

]

,

       

"retry_diff"

: stats_b

[

"avg_retry"

]

[

"avg_retry"

]

,

       

"completion_diff"

: stats_b

[

"completion_rate"

]

[

"completion_rate"

]

,

   

}

   

It can also be broken down by test case (e.g., different types of queries)

by_test_case

=

{

}

test_case_ids

=

set

(

r.

test_case_id

for

r

in

results

)

   

for

case_id

in

test_case_ids:

        case_results

=

[

r

for

r

in

results

if

r.

test_case_id

==

case_id

]

case_a

=

[

r

for

r

in

case_results

if

r.

prompt_version

==

"A"

]

case_b

=

[

r

for

r

in

case_results

if

r.

prompt_version

==

"B"

]

       

if

case_a

and

case_b:

by_test_case

[

case_id

]

=

{

               

"a_score"

: statistics.

mean

(

r.

user_satisfaction

for

r

in

case_a

)

,

               

"b_score"

: statistics.

mean

(

r.

user_satisfaction

for

r

in

case_b

)

,

           

}

   

return

{

       

"version_a"

: stats_a

,

       

"version_b"

: stats_b

,

       

"comparison"

: comparison

,

       

"by_test_case"

: by_test_case

,

       

"winner"

: _determine_winner

(

stats_a

,

stats_b

)

,

   

}

def

_determine_winner

(

stats_a: Dict

,

stats_b: Dict

)

Optional

[

str

]

:

   

"Determine which version is better based on statistical data"

   

Considering satisfaction, completion rate, and number of retries

a_score

=

(

stats_a

[

"avg_satisfaction"

]

0.5

stats_a

[

"completion_rate"

]

10

0.3

       

(

5

[

"avg_retry"

]

)

0.2

   

)

b_score

=

(

stats_b

[

"avg_satisfaction"

]

0.5

stats_b

[

"completion_rate"

]

10

0.3

       

(

5

[

"avg_retry"

]

)

0.2

   

)

   

If the difference is too small, it is uncertain

   

if

abs

(

a_score - b_score

)

<

0.1

:

       

return

"tie"

 

Tie

   

return

"A"

if

a_score

b_score

else

"B"

def

print_report

(

analysis: Dict

)

None

:

   

"""Prints a readable A/B test report"""

   

print

(

"="

60

)

   

print

(

"RUNOOB Prompt A/B Test Report"

)

   

print

(

"="

60

)

   

if

"error"

in

analysis:

       

print

(

f

"Error: {analysis['error']}"

)

       

return

   

print

(

f

"Version A (Baseline):"

)

   

print

(

f

"Sample size: {analysis['version_a']['sample_size']}"

)

   

print

(

f

" Average satisfaction: {analysis['version_a']['avg_satisfaction']:.2f}/5"

)

   

print

(

f

" Completion Rate: {analysis['version_a']['completion_rate']:.1%}"

)

   

print

(

f

"Average retry count: {analysis['version_a']['avg_retry']:.2f}"

)

   

print

(

f

"\nVersion B (New Scheme):"

)

   

print

(

f

"Sample size: {analysis['version_b']['sample_size']}"

)

   

print

(

f

"Average satisfaction: {analysis['version_b']['avg_satisfaction']:.2f}/5"

)

   

print

(

f

Completion rate: {analysis['version_b']['completion_rate']:.1%}

)

   

print

(

f

Average retry count: {analysis['version_b']['avg_retry']:.2f}

)

   

print

(

f

"\nComparison results:"

)

diff

=

analysis

[

"comparison"

]

   

print

(

f

" Satisfaction change: {diff['satisfaction_diff']:+.2f}"

)

   

print

(

f

" Completion rate change: {diff['completion_diff']:+.1%}"

)

   

print

(

f

"Retry count change: {diff['retry_diff']:+.2f}"

)

winner

=

analysis

[

"winner"

]

   

if

winner

==

"tie"

:

       

print

(

"\nConclusion: Both versions perform similarly, more data or adjustments are needed"

)

   

else

:

       

print

(

f

"\nConclusion: Version {winner} performed better"

)

   

if

analysis.

get

(

"by_test_case"

)

:

       

print

(

f

"\nSubdivided by test case:"

)

       

for

case_id

,

scores

in

analysis

[

"by_test_case"

]

.

items

(

)

:

better

=

"A"

if

scores

[

"a_score"

]

scores

[

"b_score"

]

else

"B"

           

print

(

f

" {case_id}: A={scores['a_score']:.2f}, B={scores['b_score']:.2f} ({better}better)"

)

============================================

Usage Example

============================================

if

name

==

"main"

:

   

Simulate some test data

test_data

=

[

       

Test results for version A

TestResult

(

"A"

,

4

,

0

,

True

,

15

,

"Email Writing"

)

,

TestResult

(

"A"

,

3

,

1

,

True

,

25

,

"Email Writing"

)

,

TestResult

(

"A"

,

5

,

0

,

True

,

12

,

"Summary Generation"

)

,

TestResult

(

"A"

,

2

,

2

,

True

,

40

,

"Summary Generation"

)

,

TestResult

(

"A"

,

4

,

0

,

True

,

18

,

"Code Explanation"

)

,

TestResult

(

"A"

,

3

,

1

,

False

,

35

,

"Code Explanation"

)

,

       

Test results for Version B

TestResult

(

"B"

,

5

,

0

,

True

,

12

,

"Email Writing"

)

,

TestResult

(

"B"

,

4

,

0

,

True

,

18

,

"Email Writing"

)

,

TestResult

(

"B"

,

4

,

0

,

True

,

10

,

"Summary Generation"

)

,

TestResult

(

"B"

,

3

,

1

,

True

,

25

,

"Summary Generation"

)

,

TestResult

(

"B"

,

5

,

0

,

True

,

15

,

"Code Explanation"

)

,

TestResult

(

"B"

,

4

,

0

,

True

,

20

,

"Code Explanation"

)

,

   

]

   

Analyze and print report

analysis_result

=

analyze_ab_test

(

test_data

)

print_report

(

analysis_result

)

Running this script will give you a clear A/B test report, showing which version of the prompt performs better.

Original prompt (Chinese, left untranslated)



============================================================

RUNOOB Prompt A/B 测试报告

============================================================



版本 A (基准):

  样本量: 6

  平均满意度: 3.50/5

  完成率: 83.3%

  平均重试次数: 0.67



版本 B (新方案):

  样本量: 6

  平均满意度: 4.17/5

  完成率: 100.0%

  平均重试次数: 0.17



Comparison results:

  满意度变化: +0.67

  完成率变化: +16.7%

  重试次数变化: -0.50



结论: 版本 B 表现更好



Segmented by test case:

  邮件写作: A=3.50, B=4.50 (B更好)

  摘要生成: A=3.50, B=3.50 (A更好)

  代码解释: A=3.50, B=4.50 (B更好)


AI feature prototype design

Before investing significant development resources, first validate whether the AI functionality is truly useful using a low-cost method.

Rapid prototyping with Claude/ChatGPT

The simplest prototype: directly simulate product functionality using a large model chat interface.

For example, if you want to create an interview question generator:Write a prompt describing the functionality you want, then input some test cases to check the output quality.

The goal of this stage is to verify:

No coding or interface design is needed; test the core value with pure text conversation.

If the results are not good at this stage, either improve the prompts or reconsider if the feature is worth building.

AI prototype components in Figma

After confirming the core functionality is valuable, the next step is to create a high-fidelity prototype.

Figma is a good tool for this.

You can design:

The key is to simulate a real interaction flow, not just draw a static interface.

You can use Figma's interaction features to have different content "generated" when the user clicks a button (you prepare several example results in advance).

This way, the user can feel: oh, this is how the product is used.

Low-code AI application tool

If a more realistic experience is needed, you can quickly build a working prototype using a low-code tool.

These types of tools allow you to integrate a large model into a real web application without writing backend code.

The advantages are:

Users can perform real operations, not just watch demonstrations.

You can collect real usage data and feedback.

After successful verification, this prototype can be used as a reference for development.

The goal of the prototype is learning, not perfection. Verify ideas, find problems, and then iterate as quickly as possible.


Evaluate AI output quality

How to judge the quality of AI output? It requires an evaluation system that combines qualitative and quantitative methods.

Qualitative evaluation: Manual Review

Some things can only be judged by humans.

For example: Was the answer helpful? Was the tone appropriate? Was the logic coherent?

Manual Review approach:

Manual Review is very important, but it is slow, expensive, and difficult to scale. Therefore, it needs to be combined with automated evaluation.

Quantitative evaluation: Automated evaluation

Evaluating AI output with programs.

Common automated evaluation methods:

Method Implementation Applicable scenarios
Rule-based checks Checking keywords, format, length, and sensitive content Basic quality control
LLM self-evaluation Using another large model to evaluate output quality Open-ended tasks
Semantic similarity Comparing the semantic closeness between the output and the reference answer Tasks with standard answers
User behavior metrics Statistics on retry rate, completion rate, and satisfaction score Continuous monitoring after launch

Automated evaluation cannot completely replace humans, but it can:

Golden test set construction

Collect a set of high-quality test cases and run them on this set every time the prompt or model is modified.

This is the golden test set.

A good test set should:

A golden test set is like a safety net: you can iterate confidently without worrying about accidentally breaking the performance of important scenarios.


Commercialization paths for AI products

Once you have a good product, how do you make it generate revenue? AI products have several common commercialization models.

Mode Approach Typical Example Advantages Challenges
Subscription Model Monthly/Annual Payment ChatGPT Plus Stable and predictable revenue Requires continuous value delivery
Pay-as-you-go Pay per usage (per call or token) OpenAI API Low user barrier, can be used as needed Users may be concerned about costs
Free + value-added Basic functions are free, advanced functions are paid Notion AI Easy user acquisition Grasp the boundary between free and paid
Embed enterprise products Sell AI capabilities to enterprise customers Customer service robots, document assistants High average order value, long decision cycle Requires sales and customer success teams

The choice of model depends on your product positioning and target users.

For general consumers, freemium or subscription models are more common.

For enterprise customers, pay-as-you-go or customized solutions are more suitable.

However, regardless of the model, the core is: users must genuinely feel the value.


Case Study: Deconstructing Excellent AI Products

Let's look at some well-done AI products and learn from their design thinking.

ChatGPT: A model for conversational interaction

ChatGPT's success is not just a technological success, but also a design success.

Its core design decisions are:

These designs seem simple, but when combined, they create a seamless experience.

GitHub Copilot: Embedding AI into the workflow

Copilot does not try to "replace programmers," but rather "augment programmers."

Its design intelligence:

Copilot's success demonstrates: the best AI products are those where the user doesn't feel the AI's presence, only that they have become more capable.

Notion AI: AI as a writing co-pilot

Notion AI did not create a standalone product, but embedded AI capabilities into an existing note-taking tool.

Its design highlights are:

This design makes AI a part of the creative process, not a separate tool.

From these three examples, we can see that a good AI product is not about showing off tricks, but about truly solving problems and making the user's work easier.