【AI Beginner's Guide】3: Advancing the Concept of AI Prompts

shiyiAI tools58
  1. Basic Concept of Prompts

As previously stated, prompts are inputs from users to large language models, guiding the model to generate the desired output.

  1. Prompt Optimization

Improving and fine-tuning prompts to enhance the model's output.

Related methods include:

Creating more efficient prompts, optimizing prompts with different language and cultural backgrounds. For example, for GPT, since it's primarily trained on English datasets, instructions related to it should be mostly in English. The same applies to other languages and cultures.

Adapting prompts based on specific task requirements and model characteristics.

Successful prompt optimization requires a profound understanding of how large language models work and effectively applying this knowledge to create, evaluate, and enhance prompts. For instance, if you need to write a couplet for your small shop, you need to place it in a specific context for the large model to generate output.

Taking GLM-4 as an example:

While it did generate couplets, they were barely relevant to your small shop. This happened because you didn't provide a specific context.

When we provide a specific context, such as informing it that I sell fireworks, it then produces a couplet related to my fireworks business.

Comparing the two results, we can clearly see the difference.

  1. Prompt Optimization Expert

A prompt optimization expert is a specialized role responsible for designing, optimizing, and executing prompts for large language models.

They need a deep understanding of how large language models work, the ability to construct effective prompts based on specific needs, and continuously optimize and adjust prompts to improve the model's output quality.

Their work extends beyond prompt writing to testing, analyzing model feedback, and making necessary adjustments.

In simpler terms, you can break down the term into "prompt" + "expert." Those who understand know the value in it.

  1. Prompt Optimization Framework

Some prompt optimization experts propose prompt optimization frameworks, which can be seen as highly abstract methods for prompt writing.

They provide a structured way to construct and optimize prompts, often referred to as meta-structures.

Here are a few commonly used frameworks:

Context

Role

Instruction

Subject

Preset

Exception

Background

Role

Objectives

Key Result

Evolve

Instruction (mandatory): Instructions

Context (optional): Background information

Input Data (optional): Input data

Output Indicator (optional): Output indicator

  1. Case Studies of Prompt Framework Usage

Here, we'll use writing an article as a case study.

  1. Direct Inquiry Demonstration:

  2. Using the CRISPE Framework


CRISPE Framework:

Context: Desire and reasons to become an outstanding cadre.

Role: Applicant - Someone with firm ideals, organizational, and leadership skills.

Instruction: Elaborate on qualifications to become an outstanding cadre and the commitment to serving the people-centered ideology.

Subject: Express love for the motherland, loyalty to the people, and determination to strive for the great rejuvenation of the Chinese nation.

Preset: Firm ideals, strong organizational and leadership skills, communication and coordination abilities.

Exception: Always maintain integrity, strictly observe party discipline and national laws, and willingly accept public supervision.

Prompt:

The article should highlight the applicant's firm ideals and love for the motherland, emphasizing organizational and leadership skills. The applicant should express wholehearted dedication to serving the people and ensure that the people-centered development ideology is upheld. Additionally, the applicant should promise to maintain integrity, strictly adhere to party discipline and national laws, and willingly accept public supervision. Furthermore, the applicant should mention active participation in learning and training to continuously improve comprehensive qualities and adapt to the requirements of the new era. Finally, the applicant should express determination to contribute to the development of the unit and the great rejuvenation of the Chinese nation with enthusiasm and positivity.


  1. Using the BROKE Framework

Content


BROKE Framework:

Background: Expressing love for the motherland, the people, and the party.

Purpose: Explaining the desire and reasons to become an outstanding cadre.

Role: Applicant - Someone with firm ideals, organizational, and leadership skills.

Key Elements: Emphasizing the people-centered ideology, wholehearted dedication to serving the people.

Outcome: Committing to maintaining integrity, strictly observing party discipline and national laws, willingly accepting public supervision, actively participating in learning and training, improving comprehensive qualities and adaptability, and striving for the development of the unit and the great rejuvenation of the Chinese nation.

Prompt:

The article should express patriotism, love for the people, and the party as the background, explaining the purpose of becoming an outstanding cadre. The applicant should play the role of someone with firm ideals, organizational, and leadership skills, emphasizing the people-centered ideology and wholehearted dedication to serving the people. Additionally, the applicant should commit to maintaining integrity, strictly observing party discipline and national laws, and willingly accepting public supervision. Furthermore, the applicant should mention active participation in learning and training to continuously improve comprehensive qualities and adapt to the requirements of the new era. Finally, the applicant should express determination to contribute to the development of the unit and the great rejuvenation of the Chinese nation with enthusiasm and positivity.


For the third framework, interested readers can try it out on their own; I won't write it out here.


Write a comment    

◎ Welcome to participate in the discussion. Please express your opinions and exchange your views here.