在大语言模型(LLM)的应用实践中,提示词是连接用户需求与模型输出的关键桥梁。LLaMA-2 作为 Meta 推出的开源大模型,凭借不同参数规模(7B/13B/70B)的灵活性,在科研与企业场景中广泛应用;而 Mixtral 作为 Mistral AI 推出的混合专家模型,以高效的并行计算能力和出色的多任务处理表现,成为众多开发者的首选。
task_type: Python Code Generation (Activate Code Expert Module)
requirement: Write a Python function to implement the following features:
1. Accept two parameters from user input (both numbers);
2. Calculate andreturn the sum of the two parameters;
3. Add error handling: If inputis non-numeric type (e.g., string, None), catch exception andreturn"Input Error: Please enter valid numbers".
output_requirement:
1. Code must include function definition, comments (explain function purpose, parameters, return value);
2. Provide 2 test cases (e.g., input3and5, input"a"and2) with expected output;
3. Ensure code can be copied and run directly without syntax errors.
task_target: Extract core points from the following 5000-word industry report, covering "Industry Status", "Competitive Landscape", and"Future Opportunities".
processing_method:1. Document is segmented by chapter, each marked as"Chapter 1: [Title]", "Chapter 2: [Title]"...;
2. First extract information related to"Industry Status", "Competitive Landscape", "Future Opportunities"foreach chapter, mark as"Chapter X-Status: [Content]" etc.;
3. Integrate extraction results from all chapters, summarize by3 dimensions, remove duplicates, use bullet points.
report_text:
Chapter 1: 2024 China AI Industry Market Size [Insert text ~800 words]
Chapter 2: AI Industry Main Enterprise Competition Strategies [Insert text ~1000 words]
Chapter 3: AI Industry Policy Support and Future Development Directions [Insert text ~1200 words]
... (Subsequent chapters marked and inserted sequentially)
output_format:
I. Industry Status (Integrate all chapters):
1. [Point 1]
2. [Point 2]
...
II. Competitive Landscape (Integrate all chapters):
1. [Point 1]
2. [Point 2]
...
III. Future Opportunities (Integrate all chapters):
1. [Point 1]
2. [Point 2]
...
task_target: Translate the following Chinese technical document into English, and add English annotations forkey terms (Format: Term (English): [Brief Explanation]).
language_requirements:1. Translation uses formal technical English, avoid colloquial expressions;
2. Key term translations (e.g., "Machine Learning Model", "Neural Network") must be unified; add annotation on first occurrence, use unified English expression subsequently;
3. If Chinese sentence has ambiguity (e.g., "System supports multi-user access" does not specify if"multi-user" means "simultaneous access"), supplement explanation based on context to ensure accuracy.
chinese_doc:"Machine learning models are widely applied in image recognition. Among them, neural networks are one of the common model architectures, which achieve feature extraction and analysis by simulating human brain neuron connections. The system supports multi-user access and can handle more than 100 image recognition tasks simultaneously."output_format:1. English Translation: [Complete English translation text]
2. Key Term Annotations:
- Machine Learning Model: An algorithm framework that completes specific tasks (such as image recognition) by learning data patterns.
- Neural Network: A machine learning model architecture that simulates human brain neuron connection structures, commonly used for feature extraction and pattern recognition.
- Image Recognition: A task using technology tolet computers identify targets (such as objects, people) in images and classify them.
task_target: Complete two linked tasks simultaneously. Task 1is core, prioritize its output quality before processing Task 2.
task_separator: Use "---Task1---"and"---Task2---"to separate tasks, write output foreach task according to specified format.
---Task1: Text Summary---
input_text:"Prompt engineering is a key technology to improve large language model output quality. It guides the model to understand user needs through designing precise prompts, avoiding output deviation or redundancy. Core aspects include instruction design, example provision, constraint addition. Prompt tuning techniques differ across models (e.g., LLaMA-2, Mixtral)."output_requirement: Summarize within 150 words, covering "Definition", "Core Content", "Model Differences".
output_format:Text Summary: [Summary Content]
---Task2: Q&A Pair Generation---
Based on Task 1 summary, generate 3 Q&A pairs covering core points (e.g., "What are the core aspects of Prompt Engineering?").
output_requirement:1. Questions must be concise and clear, avoid ambiguity;
2. Answers must be based on Task 1 summary, no extra info;
3. Format as"Question 1: [Content] Answer 1: [Content]".
output_format:
Q&A Pair 1:
Question 1: [Content]
Answer 1: [Content]
Q&A Pair 2: ...
Q&A Pair 3: ...