Prompt Engineering (Tài liệu của Google về hướng dẫn prompt AI từ Cơ bản tới Nâng cao)
Tài liệu hướng dẫn về kỹ thuật prompt engineering cho mô hình Gemini của Google, bao gồm các phương pháp từ cơ bản đến nâng cao và các thực hành tốt nhất.
Đang tạo bản xem trước...
Prompt Engineering Author: Lee Boonstra Prompt Engineering Acknowledgements Content contributors Michael Sherman Yuan Cao Erick Armbrust Anant Nawalgaria Antonio Gulli Simone Cammel Curators and Editors Antonio Gulli Anant Nawalgaria Grace Mollison Technical Writer Joey Haymaker Designer Michael Lanning February 2025 2 Table of contents Introduction 6 Prompt engineering 7 LLM output configuration 8 Output length 8 Sampling controls 9 Temperature 9 Top-K and top-P 10 Putting it all together 11 Prompting techniques 13 General prompting / zero shot 13 One-shot & few-shot 15 System, contextual and role prompting 18 System prompting 19 Role prompting 21 Contextual prompting 23 Step-back prompting 25 Chain of Thought (CoT) 29 Self-consistency 32 Tree of Thoughts (ToT) 36 ReAct (reason & act) 37 Automatic Prompt Engineering 40 Code prompting 42 Prompts for writing code 42 Prompts for explaining code 44 Prompts for translating code 46 Prompts for debugging and reviewing code 48 What about multimodal prompting? 54 Best Practices 54 Provide examples 54 Design with simplicity 55 Be specific about the output 56 Use Instructions over Constraints 56 Control the max token length 58 Use variables in prompts 58 Experiment with input formats and writing styles 59 For few-shot prompting with classification tasks, mix up the classes 59 Adapt to model updates 60 Experiment with output formats 60 JSON Repair 61 Working with Schemas 62 Experiment together with other prompt engineers 63 CoT Best practices 64 Document the various prompt attempts 64 Summary 66 Endnotes 68 Prompt Engineering You don’t need to be a data scientist or a machine learning engineer – everyone can write a prompt. Introduction When thinking about a large language model input and output, a text prompt (sometimes accompanied by other modalities such as image prompts) is the input the
… Tải file gốc để đọc toàn bộ tài liệu.
- Tên tài liệu
- Prompt Engineering (Tài liệu của Google về hướng dẫn prompt AI từ Cơ bản tới Nâng cao)
- Trường / Môn
- Tác giả (trong tài liệu)
- Lee Boonstra
- Nội dung
- Tài liệu hướng dẫn kỹ thuật Prompt Engineering, giải thích cách tạo prompt hiệu quả cho LLM. Nó bao gồm các kỹ thuật từ cơ bản đến nâng cao, prompt cho code, và các thực tiễn tốt nhất để tối ưu hóa kết quả.
- Mục lục
- Introduction
- Prompt engineering
- LLM output configuration
- Output length
- Sampling controls
- Temperature
- Top-K and top-P
- Putting it all together
- Prompting techniques
- General prompting / zero shot
- One-shot & few-shot
- System, contextual and role prompting
- System prompting
- Role prompting
- Contextual prompting
- Step-back prompting
- Chain of Thought (CoT)
- Self-consistency
- Tree of Thoughts (ToT)
- ReAct (reason & act)
- Automatic Prompt Engineering
- Code prompting
- Prompts for writing code
- Prompts for explaining code
- Prompts for translating code
- Prompts for debugging and reviewing code
- What about multimodal prompting?
- Best Practices
- Provide examples
- Design with simplicity
- Be specific about the output
- Use Instructions over Constraints
- Control the max token length
- Use variables in prompts
- Experiment with input formats and writing styles
- For few-shot prompting with classification tasks, mix up the classes
- Adapt to model updates
- Experiment with output formats
- JSON Repair
- Working with Schemas
- Experiment together with other prompt engineers
- CoT Best practices
- Document the various prompt attempts
- Summary
- Endnotes
- Số trang
- 68 trang
- Người đăng
- Giang Le
Câu hỏi thường gặp
Tài liệu này có miễn phí không?
Có. “Prompt Engineering (Tài liệu của Google về hướng dẫn prompt AI từ Cơ bản tới Nâng cao)” miễn phí — bạn chỉ cần đăng nhập rồi bấm Tải xuống để lấy file gốc.
Tài liệu dài bao nhiêu trang?
Tài liệu gồm 68 trang. Bạn có thể xem trước online trước khi tải.
Tôi có thể xem trước trước khi tải không?
Có. Bạn xem trước tài liệu ngay trên trang này bằng trình đọc online, rồi quyết định tải về.

Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!