Note: This article was translated with the assistance of AI. I wrote the original in Chinese. If you can read Chinese, you are welcome to read the original Chinese version for the most authentic and unfiltered expression.

The STAR Framework

PixPin_2024-12-28_16-38-22

  • S: Situation — background information
  • T: Task — the goal
  • A: Audience — who it’s for
  • R: Requirements — output requirements

When asking a question, providing the LLM with these four dimensions of information can help it generate much better responses.

Here’s an example:

Prompt:

1
2
3
4
5
6
7
8
9
10
11
介绍一下下面的概念:
附加律
化简律
假言推理
拒取式
析取三段论
假言三段论
等价三段论
构造性二难
构造性二难(特殊形式)
破坏性二难

Response:

These concepts come mainly from logic, especially propositional logic and rules of inference. Here’s a brief overview:

  1. Addition
    Addition is a rule of inference in propositional logic:
  • If ( P ) is true, then ( P \lor Q ) is also true, regardless of what ( Q ) is.
  • In other words, from ( P ) you can infer ( P \lor Q ).
  1. Simplification
    Simplification is a rule of inference in propositional logic:
  • If ( P \land Q ) is true, then ( P ) is true and ( Q ) is true.
  • In other words, from ( P \land Q ) you can infer ( P ) or ( Q ).
  1. Modus Ponens
    Modus Ponens is a basic rule of inference in propositional logic:
  • If ( P \rightarrow Q ) is true and ( P ) is true, then ( Q ) is true.
  • In other words, from ( P \rightarrow Q ) and ( P ) you can infer ( Q ).
    ……

These rules of inference are very useful in logical reasoning and mathematical proofs, helping us derive new propositions from known ones.

A STAR-optimized prompt:

PixPin_2024-12-28_16-48-58

Response:

Okay class, finals prep stressing you out? Don’t worry — let me “translate” these discrete math concepts for you. I promise you’ll laugh and actually remember them!

  1. Addition:
    It’s like already having a bag of chips, but thinking it’s not enough and buying another one. Logically: if you know A is true, then A∨B (A or B) is definitely true. Since A is already there, it doesn’t matter whether B shows up — the chips are in hand!

  2. Simplification:
    It’s like buying a bunch of stuff, only to realize you only use one of them. Logically: if A∧B (A and B) is true, then A is definitely true. Forget B — A is enough!

  3. Modus Ponens:
    It’s like “if it rains today, I’ll bring an umbrella.” It does rain today, so you definitely brought an umbrella. Logically: if A→B (A implies B) and A is true, then B is also true. Don’t get soaked — bring the umbrella!

……

See? These concepts aren’t so scary after all. Remember, logic is like life — sometimes more options actually make things simpler. Good luck studying, you’ve got this!

Testing with DeepSeek’s default model on the official website shows a very clear difference.

What Prompt Optimization Really Does

You’ve probably heard that prompts can optimize output. For example:

Pretend you’re an experienced Python programmer. Now please xxx…

These “formulaic” prompts do seem to improve response quality to some extent.

Mainstream LLMs are also improving rapidly. Many products can already automatically predict and optimize user needs, and the marginal effect of prompt engineering is starting to show. So, in this context, what’s the point of writing good prompts?

I believe that, at its core, a good prompt provides the LLM with more information, and that information helps the LLM generate content that better matches user expectations.

Many users feel the LLM “doesn’t get me,” but in reality, they may not have given the LLM enough background information. The LLM isn’t a mind reader — how could it know exactly what you need? 😄

Isn’t This a Hassle?

You might ask: isn’t it a pain to write prompts like this every time?

The answer depends on your needs. For simple questions — say, you just want the LLM to do a quick translation so you can understand something — then no, it’s not really necessary.

But for more important requests, like polishing a draft, I’d still recommend doing it. After all, getting a satisfying response from the LLM in one shot is better than having to coach it through multiple rounds.


Reference

[Advanced Tutorial] One Combo to Fully Unleash AI’s Writing Ability — Bilibili](https://www.bilibili.com/video/BV1RNidYCEdq/)