[KongchangAI]
· 2 min read· 1,393 words

The Most Complete Prompt Engineering Guide on Bilibili: From Theory to Practice, Learn to Communicate with LLMs Efficiently

The Most Complete Prompt Engineering Guide on Bilibili: From Theory to Practice, Learn to Communicate with LLMs Efficiently

Prompts are natural-language programming of LLMs; adjust strategy by model type and follow five principles.

The article explains prompts across four dimensions: concept, value, model differences, and writing methods. A prompt is the text sent to a model, essentially "programming" an LLM in natural language to activate capabilities and reduce hallucinations. It directly determines output quality and can replace fine-tuning at near-zero cost. The article distinguishes general models (single-pass, need explicit reasoning steps) from reasoning models (internalized COT, just need clear tasks), noting that by 2026 mainstream models have shifted to unified architectures with parameters toggling thinking mode. It then introduces OpenAI's six strategies and five principles of high-quality prompts: specific, sufficient context, unambiguous, logically coherent, and concise.

What Is a Prompt? From Concept to Essence

A prompt is the piece of text we provide to a model to guide it toward generating a specific output or answer. Its core purpose is to give the model task context and help it accurately understand user intent. In the video, the Bilibili creator uses Doubao for a plain-spoken explanation: a prompt is just the sentence you send to the model. For example, asking "how do I make braised pork belly" — that sentence is the prompt.

But beneath simple tasks, the essence of prompting is "programming" a large model with natural language (note the quotation marks around programming). We're not modifying the model's code; we're using precise semantic guidance to activate model capabilities, reduce hallucinations, and stabilize outputs. There's a key characteristic here — the primacy-recency effect: models are more sensitive to the beginning and end of a prompt. The creator recommends placing core instructions and key constraints at the start or end, with secondary information in the middle. However, he also notes that as model capabilities have improved, this effect has become less pronounced by 2026 — it worked better on earlier models.

Results can differ drastically

Why Are Prompts So Important?

The creator emphasizes that prompts directly determine output quality. With the same model, results vary wildly between different users, and the root cause is often the prompt. He gives a product copywriting example: just saying "help me write product copy" — the model can write something, but it may not meet your needs; adding "wireless earbuds, highlight battery life and noise cancellation" helps a bit; but a high-quality prompt looks like this:

You are a seasoned digital product spoken-word copywriting master. Help me write three short wireless earbud scripts suitable for Douyin, targeting commuters, with the core focus on 12-hour battery life and no static noise with subway noise cancellation, each around 30 characters, colloquial, ending with a call to action.

By comparison, the latter is clearly more precise. The value of prompts shows up in four aspects:

  • Low-cost activation of model capabilities: Without fine-tuning or training, optimizing prompts alone can significantly improve task accuracy — the most cost-effective approach. The creator mentions that training a model from scratch can cost tens of millions, and fine-tuning a 70B model alone costs a fortune in GPUs, while prompt optimization is nearly free.
  • Reducing hallucination risk: Providing reference text, limiting output boundaries, and guiding reasoning steps can greatly reduce the probability of the model "confidently making things up," though it cannot be fully eliminated.
  • Adapting to real business scenarios: Standardized prompt design is a core part of deploying AI products and a foundational capability for all LLM applications.

Writing clear instructions

Reasoning Models vs General Models: Completely Different Prompting Strategies

The creator points out that before discussing techniques, you must clarify the model type — choosing the wrong strategy can backfire. General models (chat models) are optimized for everyday conversation, pursuing speed, fluency, and low cost. They use single-pass generation, outputting token by token, and are suited for writing, translation, retrieval, and daily Q&A. Reasoning models have an internal thinking process (internalized COT, i.e., implicit chain-of-thought). Before outputting, they generate a large number of invisible thinking steps to reason, trial-and-error, and self-correct — sacrificing speed and cost for accuracy on complex tasks. They excel at mathematical reasoning, logical proofs, and code debugging.

That reasoning model

But by 2026, the lines have blurred. The creator uses DeepSeekAd as an example: early on there were DeepSeek-chat (chat) and DeepSeek-reasoner (reasoning) models; now the platform's models (like flash and v4-pro) all support both thinking and non-thinking modes, toggled via parameters (such as thinking enable/disable and thinking intensity low/medium/high). Looking through the changelog, he notes that V3 used to be the chat model and R1 the reasoning model, but this year they've been unified into a single model with adaptive reasoning.

So for reasoning models

So prompt writing must adjust accordingly: reasoning models only need a clear task and requirements — no step-by-step guidance, and forcing decomposition may actually weaken their reasoning ability. General models need explicit reasoning steps (like COT), or they tend to skip steps and make errors. For role-playing, reasoning models shouldn't overuse it to avoid interfering with the main logical thread, while general models are well-suited to role settings for quickly aligning style. The creator reminds us that whether to enable thinking mode should be based on task requirements, not blindly chasing the latest trend.

COT (Chain-of-Thought) refers to the technique of having a model output intermediate reasoning steps before giving the final answer. Adding "let's think step by step" to a prompt or providing examples with reasoning processes can guide the model to explicitly unfold its thinking. Reasoning models "internalize" this process: during training, the model learns to generate large numbers of invisible thinking tokens internally, and users only see the result — so there's no need to request step-by-step reasoning in the prompt. COT was first validated on math word problems, then extended to logical reasoning, multi-hop QA, and other tasks; but it offers limited benefit for factual retrieval, style rewriting, and similar tasks, and may even add latency and errors by introducing unnecessary reasoning.

Token is the smallest unit of text a model processes, roughly a word or part of a word. The model generates output token by token, and generation speed, context length limits, and API billing are all calculated in tokens. Reasoning models generate large numbers of invisible thinking tokens internally, which also consume compute and cost — this is exactly what "sacrificing speed and cost for accuracy" means in concrete terms. Understanding tokens also helps grasp the "concise, not redundant" principle: overly long prompts occupy the context window and increase cost.

OpenAI's Six Strategies and Five Principles of High-Quality Prompts

The creator cites six strategies proposed by OpenAI, which he believes remain applicable in 2026: write clear instructions, provide reference text, split complex tasks into subtasks, give the model time to think, use external tools, and test changes systematically. "Provide reference text" corresponds to few-shot prompting, and "use external tools" has evolved from Function Calling to MCP.

Finally, he summarizes five principles of high-quality prompts:

  1. Specific, not vague: Avoid abstract expressions; clarify boundaries and standards. For example, when writing a poem, specify "a four-line seven-character quatrain, theme of AI development, bold and heroic style."
  2. Sufficient context: Explain the task background, user identity, and usage scenario. For example, instead of asking "how to improve English scores," say "I'm a five-year-old kindergartener who can't write yet — how do I make English learning fun for beginners?"
  3. No ambiguity: Clearly define key concepts and avoid misunderstandings caused by synonyms.
  4. Logical coherence: Specify an order that follows cognitive logic — role first, then task, then requirements, then examples — though not all are mandatory.
  5. Concise, not redundant: Put core information upfront and remove irrelevant information. Overly long context distracts the model's attention and affects the final response.

These five principles corroborate OpenAI's strategies and form a practical framework for prompt engineering. The creator concludes by emphasizing that prompts are the most direct medium for human-LLM interaction — writing good prompts helps you avoid pitfalls and detours.

Few-shot Prompting means providing several "input-output" examples in the prompt so the model can infer the task pattern before processing new input — corresponding to OpenAI's "provide reference text" strategy. Compared with zero-shot (instructions only), few-shot more effectively constrains output format and style, especially for classification, extraction, and format conversion tasks. Examples should cover typical and edge cases, maintain consistent formatting, and typically 3–5 examples suffice; too many examples occupy context and may introduce bias.

MCP (Model Context Protocol) is an open protocol that enables large models to connect to external tools and data sources in a standardized way. It can be seen as an evolution of Function Calling: the latter has each vendor define its own function-calling format, while MCP provides unified interface descriptions and invocation specifications, enabling models to access search, databases, file systems, and other tools across platforms. It addresses the question of "how models discover and safely use external capabilities" and is important infrastructure for building Agent applications.

One-line Summary

Prompts are natural-language programming of LLMs; adjust strategy by model type and follow the five principles.

#prompt engineering#LLM prompting#reasoning models#chain-of-thought#OpenAI strategies#few-shot prompting
Share:

Related articles