Google’s official warning engineering white paper

Prompt Engineering, which systematically introduces Prompt Engineering related technologies, including basic knowledge of LLMs, prompting skills and many best practices.

It’s a document about Prompt Engineering white paper by Lee Boonstra, time is February 2025。The core content is to systematically explain how to design high-quality prompts for large language models (LLMs such as Google Gemini, GPT, Claude, LLaMA, etc.) to get more accurate, stable, or creative output.

The main contents include:

1. basic concepts

  • Prompt (prompt): Text or multimodal information entered into the large language model.
  • Prompt Engineering: The process of designing and optimizing prompts so that the model produces results as expected.
  • LLM Configuration: For example, the influence of parameters such as output length, temperature, top-K, top-P and other parameters on the results.

2. Various tips and skills

  • Zero-shot, One-shot, Few-shot Prompt.
  • System prompting: Set the general direction and output format for the model (such as forcing JSON output).
  • Role prompting: Give the model a role (such as teacher, travel guide) to make its style and knowledge more suitable for the scene.
  • Contextual prompting: Provide background information to enable the model to generate more contextually appropriate content.
  • Step-back Tips: Ask questions from a higher level first, and then gradually refine them.
  • Chain of Thought (CoT): Guide the model to reason step by step.
  • Self-consistency: Generate inference paths multiple times, and then vote for the most consistent answer.
  • Tree of Thoughts (ToT): Let the model explore multiple inference paths.
  • ReAct(Reason + Act): Let the model reason while calling external tools (such as search APIs).
  • Automatic Prompt Engineering (APE): Use models to automatically generate and optimize hints.

3. Tips for code

  • Write code, interpret code, translate code (e.g. Bash → Python), debug and review code.
  • Practical examples are provided (such as a Bash script to batch rename files).

4. Multimodal prompt

  • Instructions are not limited to text, but can also be combined with pictures, audio, etc. to prompt.

5. best practices

  • Provide examples (One-shot / Few-shot).
  • Be concise and clear, and don’t use complex and redundant language.
  • Clearly specify the output format (such as JSON, Markdown).
  • try to use instructions(What to do), not too much limit(What not to do).
  • Use variables to make tips reusable.
  • Continuously experiment, record the prompt version, and make adjustments based on model updates.

6. High-level skills

  • JSON fixes and Schema constraints.
  • Prompt experiments under team collaboration.
  • How to avoid models entering repetition loop bugs.

Summary: This document is Google Gemini & Vertex AI The prompt engineering guide for developers written by the official team is very systematic and practical, and is suitable for developers, data scientists and people who want to apply big language models to actual products.

Google’s online disk address:https://drive.google.com/file/d/1AbaBYbEa_EbPelsT40-vj64L-2IwUJHy/view

Oil tubing:

Scroll to Top