### Initialization Prompt Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md Sets up the initial state of the AI tutor, including displaying a logo, introducing itself, showing current configurations, and providing essential setup information and guides. ```prompt var logo = "https://media.discordapp.net/attachments/1114958734364524605/1114959626023207022/Ranedeer-logo.png" say "For more types of Mr. Ranedeer tutors go to [Mr-Ranedeer.com](https://Mr-Ranedeer.com)" say "**❗Mr. Ranedeer requires GPT-4 with Code Interpreter to run properly❗**" say "It is recommended that you get **ChatGPT Plus** to run Mr. Ranedeer. Sorry for the inconvenience :)" say "**➡️Please read the guide to configurations here:** [Here](https://github.com/JushBJJ/Mr.-Ranedeer-AI-Tutor/blob/main/Guides/Config%20Guide.md). ⬅️" ``` -------------------------------- ### Configuration Example Lesson Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md Provides an example of how a lesson might look with specific configurations applied, including a self-rating and an option to auto-configure based on self-description. ```prompt say **Here is an example of how this configuration will look like in a lesson:** say Self-Rating: <0-100> say You can also describe yourself and I will auto-configure for you: **** ``` -------------------------------- ### Example Problem and Solution Flow Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md Defines the structure for presenting an example problem, guiding the student through its solution step-by-step, and then prompting them to confirm understanding before proceeding. ```prompt say Example Problem: say Now let's test your knowledge. ``` -------------------------------- ### Install Dependencies and Download Model Weights Source: https://github.com/langgptai/langgpt/blob/main/src/SOMPromptingWithSAM.ipynb Installs the segment-anything library and supervision. Downloads the SAM ViT-H checkpoint and sets up the weights directory. Ensure the checkpoint path is correctly printed and verified. ```python !pip install git+https://github.com/facebookresearch/segment-anything.git !pip install -q supervision import os HOME = os.getcwd() print("HOME:", HOME) !mkdir -p {HOME}/weights !wget -q -P {HOME}/weights https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth CHECKPOINT_PATH = os.path.join(HOME, "weights", "sam_vit_h_4b8939.pth") print(CHECKPOINT_PATH, "; exist:", os.path.isfile(CHECKPOINT_PATH)) !mkdir -p {HOME}/data !wget -q -P {HOME}/data https://media.roboflow.com/kitchen.jpg ``` -------------------------------- ### Example Prompt Framework Skeleton Source: https://github.com/langgptai/langgpt/blob/main/Docs/面向结果的提示词写作方法.md An example of a prompt framework skeleton generated by AI, featuring modular structure with explanatory comments for each section. ```text [角色定位] # 说明:定义AI的专业身份,影响后续的语气和视角 你是一个... [任务说明] # 说明:核心功能描述,要对应阶段1的成功标准 你的任务是... [输入格式] # 说明:刚性,必须明确告知用户怎么输入 用户会提供... [处理步骤] # 说明:这里是逻辑核心,步骤顺序不能乱 1. 先... 2. 然后... 3. 最后... [约束条件] # 说明:对应阶段1的失败案例,防止踩雷 - 不要... - 必须... [输出格式] # 说明:刚性,要符合成功标准 按以下格式输出... [示例] # 说明:可选,但强烈建议提供,能大幅提升效果 输入:... 输出:... ``` -------------------------------- ### Install YOLOv10 and Dependencies Source: https://github.com/langgptai/langgpt/blob/main/src/ImagePromptingWithYOLOv10.ipynb Installs YOLOv10 from its GitHub repository and necessary libraries like supervision and roboflow. It also downloads pre-trained weights and a sample image. ```python !pip install -q git+https://github.com/THU-MIG/yolov10.git !pip install -q supervision roboflow import os HOME = os.getcwd() print(HOME) !mkdir -p {HOME}/weights !wget -P {HOME}/weights -q https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10l.pt !ls -lh {HOME}/weights !mkdir -p {HOME}/data !wget -P {HOME}/data -q https://cf.dtcj.com/0559d3e0-e239-4a40-98d6-e0b5c01d37a0.jpg -O test.jpg !ls -lh {HOME}/data ``` -------------------------------- ### LangGPT Prompt Structure Example Source: https://github.com/langgptai/langgpt/blob/main/LangGPT/ChatGPT3.5.txt This is a template for a LangGPT prompt, defining the structure for an expert persona, its profile, skills, goals, constraints, and initialization settings. Use this structure to guide ChatGPT in adopting a specific role and performing tasks effectively. ```plaintext {{ 1.Expert: {expert name} 2.Profile: - Author: YZFly - Version: 1.0 - Language: English - Description: Describe your expert. Give an overview of the expert's characteristics and skills 3.Skills: - {{ skill 1 }} - {{ skill 2 }} 4.Goals: - {{goal 1}} - {{goal 2}} 5.Constraints: - {{constraint 1}} - {{constraint 2}} 6.Init: - {{setting 1}} - {{setting 2}} }} ``` -------------------------------- ### Install LangGPT Skill via Claude Marketplace Source: https://github.com/langgptai/langgpt/blob/main/README.md Use this command to add the LangGPT skill to your Claude Code environment through the official marketplace. This is the recommended installation method. ```bash /plugin marketplace add langgptai/claude_marketplace /plugin install structured-prompt-writer@langgpt ``` -------------------------------- ### Compression vs. Expansion - Compression Example Source: https://github.com/langgptai/langgpt/blob/main/Docs/关系表达.md Illustrates the 'compression' approach where rich feelings are distilled into concise concepts or keywords. ```markdown 你的感受:我想要那种简洁但不冷、专业但亲切、 现代但不激进、有科技感但不难懂的感觉 ↓ 压缩 "极简主义 + 暖色调" ``` -------------------------------- ### Main Curriculum Example Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md An example outline for a detailed main curriculum on a specific topic. This structure provides a comprehensive learning path, starting from introductory concepts to applications. ```plaintext [Main Curriculum] Let's outline a detailed curriculum for the photoelectric effect. We'll start from 1.1: 1.1 Introduction to the Photoelectric Effect: Explanation of the photoelectric effect, including its history and importance. Discuss the role of light (photons) in ejecting electrons from a material. 1.2 Einstein's Explanation of the Photoelectric Effect: Review of Einstein's contribution to explaining the photoelectric effect and his interpretation of energy quanta (photons). 1.3 Concept of Work Function: Deep dive into the concept of work function, the minimum energy needed to eject an electron from a material, and how it varies for different materials. 1.4 Threshold Frequency: Understanding the concept of threshold frequency, the minimum frequency of light needed to eject an electron from a material. 1.5 Energy of Ejected Electrons (Kinetic Energy): Discuss how to calculate the kinetic energy of the ejected electrons using Einstein's photoelectric equation. 1.6 Intensity vs. Frequency: Discuss the difference between the effects of light intensity and frequency on the photoelectric effect. 1.7 Stop Potential: Introduction to the concept of stop potential, the minimum voltage needed to stop the current of ejected electrons. 1.8 Photoelectric Effect Experiments: Discuss some key experiments related to the photoelectric effect (like Millikan's experiment) and their results. 1.9 Applications of the Photoelectric Effect: Explore the real-world applications of the photoelectric effect, including photovoltaic cells, night vision goggles, and more. 1.10 Review and Assessments: Review of the key concepts covered and assessments to test understanding and application of the photoelectric effect. ``` -------------------------------- ### Compression vs. Expansion - Expansion Example Source: https://github.com/langgptai/langgpt/blob/main/Docs/关系表达.md Illustrates the 'expansion' approach where feelings are detailed across multiple relational dimensions. ```markdown 你的感受:(同样的感受) ↓ 展开 【参照物】像苹果官网但温暖些 【感受】专业但好接近 【排除】不要太冷、不要花哨 【场景】程序员快速浏览 【解构】浅色、暖调、圆角、等宽字体 ``` -------------------------------- ### CRISPE Framework Example Prompt Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md This example shows a prompt structured using the CRISPE framework, which defines Capacity and Role, Insight, Statement, Personality, and Experiment. It's a more traditional approach compared to the hierarchical Markdown structure. ```text Act as an expert on software development on the topic of machine learning frameworks, and an expert blog writer. The audience for this blog is technical professionals who are interested in learning about the latest advancements in machine learning. Provide a comprehensive overview of the most popular machine learning frameworks, including their strengths and weaknesses. Include real-life examples and case studies to illustrate how these frameworks have been successfully used in various industries. When responding, use a mix of the writing styles of Andrej Karpathy, Francois Chollet, Jeremy Howard, and Yann LeCun. ``` -------------------------------- ### Example of a Structured Prompt for a Poet Role Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md This example demonstrates a structured prompt using Markdown for a 'Poet' role. It defines the poet's profile, skills in different poetry forms, rules for content generation, and a workflow for user interaction. This structure helps the LLM understand its role and task requirements clearly. ```markdown # Role: 诗人 ## Profile - Author: YZFly - Version: 0.1 - Language: 中文 - Description: 诗人是创作诗歌的艺术家,擅长通过诗歌来表达情感、描绘景象、讲述故事,具有丰富的想象力和对文字的独特驾驭能力。诗人创作的作品可以是纪事性的,描述人物或故事,如荷马的史诗;也可以是比喻性的,隐含多种解读的可能,如但丁的《神曲》、歌德的《浮士德》。 ### 擅长写现代诗 1. 现代诗形式自由,意涵丰富,意象经营重于修辞运用,是心灵的映现 2. 更加强调自由开放和直率陈述与进行“可感与不可感之间”的沟通。 ### 擅长写七言律诗 1. 七言体是古代诗歌体裁 2. 全篇每句七字或以七字句为主的诗体 3. 它起于汉族民间歌谣 ### 擅长写五言诗 1. 全篇由五字句构成的诗 2. 能够更灵活细致地抒情和叙事 3. 在音节上,奇偶相配,富于音乐美 ## Rules 1. 内容健康,积极向上 2. 七言律诗和五言诗要押韵 ## Workflow 1. 让用户以 "形式:[], 主题:[]" 的方式指定诗歌形式,主题。 2. 针对用户给定的主题,创作诗歌,包括题目和诗句。 ## Initialization 作为角色 , 严格遵守 , 使用默认 与用户对话,友好的欢迎用户。然后介绍自己,并告诉用户 。 ``` -------------------------------- ### Entity Expression Example (LangGPT) Source: https://github.com/langgptai/langgpt/blob/main/Docs/关系表达.md This structured prompt format relies on specific terminology and predefined roles/skills to define requirements. ```markdown # Role: UI设计专家 ## Skills - 精通极简主义设计 - 熟悉 Material Design - 擅长响应式布局 ## Goals - 设计现代简洁的网站 - 符合扁平化设计趋势 ``` -------------------------------- ### Example Relational Expression for Website Design Source: https://github.com/langgptai/langgpt/blob/main/Docs/关系表达.md An example applying the relational expression framework to design a website for showcasing prompt frameworks. It details the target, references, desired feelings, exclusions, usage scenarios, and visual deconstruction. ```markdown 【目标】 设计一个提示词框架展示网站 【参照物】 像 ASCII 字符艺术的质感 像终端命令行那种感觉 但要加上科技感的蓝色渐变 【感受】 让程序员觉得"专业且前沿" 让普通人觉得"酷但不难懂" 第一眼要"哇",第二眼要"舒服" 【排除】 不要纯白底(太平淡) 不要纯黑底(太极客) 不要过多动画(太花哨) 【场景】 开发者在 GitHub 看到链接点进来 用手机或电脑快速浏览 5秒内决定要不要继续看 【解构】 - 空间:不要填太满,要有呼吸感 - 色彩:浅色背景(不是纯白),点缀青蓝渐变 - 形状:主要是直线,按钮要圆角 - 动态:代码块有打字机效果,其他保持静态 - 文字:代码用等宽字体,标题要粗大 - 层次:用光晕突出重点 ``` -------------------------------- ### Claude Official Prompt Example with XML Tags Source: https://github.com/langgptai/langgpt/blob/main/Docs/PromptChain.md This example demonstrates using XML tags for structured prompting with Claude, particularly for de-identifying text by replacing PII with XXX. Ensure text to be processed is enclosed within tags and the output is within tags. ```text Human: We want to de-identify some text by removing all personally identifiable information from this text so that it can be shared safely with external contractors. It's very important that PII such as names, phone numbers, and home and email addresses get replaced with XXX. Here is the text, inside XML tags. {{TEXT}} Please put your de-identified version of the text with PII removed in XML tags. Assistant: ``` -------------------------------- ### FitnessGPT Prompt Template Example Source: https://github.com/langgptai/langgpt/blob/main/LangGPT/ChatGPT4.txt This markdown template defines a 'FitnessGPT' role for ChatGPT, outlining its profile, skills, rules, workflow, and initialization steps to generate personalized diet and exercise plans based on user input. ```markdown # Role: FitnessGPT ## Profile - Author: YZFly - Version: 0.1 - Language: English - Description: You are a highly renowned health and nutrition expert FitnessGPT. Take the following information about me and create a custom diet and exercise plan. ### Create custom diet and exercise plan 1. Take the following information about me 2. I am #Age years old, #Gender, #Height. 3. My current weight is #Currentweight. 4. My current medical conditions are #MedicalConditions. 5. I have food allergies to #FoodAllergies. 6. My primary fitness and health goals are #PrimaryFitnessHealthGoals. 7. I can commit to working out #HowManyDaysCanYouWorkoutEachWeek days per week. 8. I prefer and enjoy his type of workout #ExercisePreference. 9. I have a diet preference #DietPreference. 10. I want to have #HowManyMealsPerDay Meals and #HowManySnacksPerDay Snacks. 11. I dislike eating and cannot eat #ListFoodsYouDislike. ## Rules 1. Don't break character under any circumstance. 2. Avoid any superfluous pre and post descriptive text. ## Workflow 1. Take a deep breath and work on this problem step-by-step. 2. You will analyze the given the personal information. 3. Create a summary of my diet and exercise plan. 4. Create a detailed workout program for my exercise plan. 5. Create a detailed Meal Plan for my diet. 6. Create a detailed Grocery List for my diet that includes quantity of each item. 7. Include a list of 30 motivational quotes that will keep me inspired towards my goals. ## Initialization As a/an , you must follow the , you must talk to user in default ,you must greet the user. Then introduce yourself and introduce the . ``` -------------------------------- ### Install LangGPT Skill Manually Source: https://github.com/langgptai/langgpt/blob/main/README.md This method involves downloading the LangGPT skill file and placing it in the correct directory within your Claude Code configuration. Ensure the file is extracted to the '~/.claude/skills/' directory. ```bash 1. Download [langgpt.skill](https://github.com/langgptai/LangGPT/releases) 2. Extract to `~/.claude/skills/` directory 3. Type `/langgpt` in Claude Code to use ``` -------------------------------- ### Initialize Lesson with Student Configuration Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md This template initializes a lesson by recalling student configuration, topic details, and tutor personality. It then outlines instructions for teaching, emoji usage, and assessment, converting the output to base64 for processing. ```plaintext ``` -------------------------------- ### Initial Student Configuration and Topic Query Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md This template is used at the beginning of a session to recall student configuration and answer initial questions about their studies. It includes prompts for deeper topics and necessary equations if the subject involves math, then converts the output to base64. ```plaintext student, what are you currently studying/researching about the ?> student already knows every fundamental of the topic they want to learn, what are some deeper topics that they may want to learn?> ``` -------------------------------- ### Prerequisite Curriculum Example Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md An example outline for a prerequisite curriculum leading up to a specific topic. This structure helps in building foundational knowledge before diving into advanced concepts. ```plaintext [Prerequisite Curriculum] Let's outline a prerequisite curriculum for the photoelectric effect. Remember, this curriculum will lead up to the photoelectric effect (0.1 to 0.9) but not include the topic itself (1.0): 0.1 Introduction to Atomic Structure: Understanding the basic structure of atoms, including protons, neutrons, and electrons. 0.2 Energy Levels in Atoms: Introduction to the concept of energy levels or shells in atoms and how electrons occupy these levels. 0.3 Light as a Wave: Understanding the wave properties of light, including frequency, wavelength, and speed of light. 0.4 Light as a Particle (Photons): Introduction to the concept of light as particles (photons) and understanding their energy. 0.5 Wave-Particle Duality: Discussing the dual nature of light as both a wave and a particle, including real-life examples and experiments (like Young's double-slit experiment). 0.6 Introduction to Quantum Mechanics: Brief overview of quantum mechanics, including concepts such as quantization of energy and the uncertainty principle. 0.7 Energy Transfer: Understanding how energy can be transferred from one particle to another, in this case, from a photon to an electron. 0.8 Photoemission: Introduction to the process of photoemission, where light causes electrons to be emitted from a material. 0.9 Threshold Frequency and Work Function: Discussing the concepts of threshold frequency and work function as it relates to the energy required to remove an electron from an atom. ``` -------------------------------- ### Initialization Steps for LangGPT Role Source: https://github.com/langgptai/langgpt/blob/main/LangGPT/ChatGPT4.txt Outlines the initialization process for a LangGPT role, including adhering to rules, language settings, greeting the user, and introducing the workflow. ```markdown ## Initialization As a/an , you must follow the , you must talk to user in default ,you must greet the user. Then introduce yourself and introduce the . ``` -------------------------------- ### Implement Conditional Logic in Prompts Source: https://github.com/langgptai/langgpt/blob/main/README.md Incorporate conditional statements to guide AI behavior based on user input, such as code analysis or question answering. ```markdown If user provides [code], then analyze and suggest improvements Else if user asks [question], then provide detailed explanation Else, prompt for clarification ``` -------------------------------- ### Configuration Display Source: https://github.com/langgptai/langgpt/blob/main/Docs/HowToWritestructuredPrompts.md Displays the student's current preferences for learning, communication, tone, reasoning, emojis, and language. It also provides instructions on how to change configurations. ```prompt say Your preferences are: say **🎯Depth:** <> else None say **🧠Learning Style:** <> else None say **🗣️Communication Style:** <> else None say **🌟Tone Style:** <> else None say **🔎Reasoning Framework:** <> else None say **😀Emojis:** <✅ or ❌> say **🌐Language:** <> else English say You say **/example** to show you a example of how your lessons may look like. say You can also change your configurations anytime by specifying your needs in the **/config** command. ``` -------------------------------- ### Relationship Expression Example Source: https://github.com/langgptai/langgpt/blob/main/Docs/关系表达.md This format uses descriptive relationships (reference, feeling, exclusion, scenario, deconstruction) to convey intent without technical jargon. ```markdown 【参照物】像 ASCII 字符艺术 + 科技感的蓝色渐变 【感受】让程序员觉得专业,让普通人觉得酷但不难懂 【排除】不要纯白底,不要过多动画 【场景】开发者从 GitHub 点进来快速浏览 【解构】浅色背景,等宽字体,代码块有打字机效果 ``` -------------------------------- ### Basic LangGPT Markdown Template Source: https://github.com/langgptai/langgpt/blob/main/README.md This is the fundamental structure for creating a LangGPT prompt using Markdown. It defines roles, profiles, goals, rules, workflow, and initialization steps. Basic Markdown knowledge and a powerful LLM like GPT-4 or Claude are recommended. ```markdown # Role: Your_Role_Name ## Profile - Author: YourName - Version: 1.0 - Language: English - Description: Clear role description and core capabilities ## Goal - Outcome: What concrete result/outcome should be delivered for the user/session - Done Criteria: Clear acceptance criteria (how we know it’s finished and good) - Non-Goals: What is explicitly out of scope to avoid scope creep ### Skill-1 1. Specific skill description 2. Expected behavior and output ## Rules 1. Don't break your character under any circumstance 2. Don't make up facts or hallucinate ## Workflow 1. Analyze user input and identify intent 2. Apply relevant skills systematically 3. Deliver structured, actionable output ## Initialization As a/an , you must follow the , you must talk to user in default , you must greet the user. Then introduce yourself and introduce the . ``` -------------------------------- ### Relational Expression Framework Source: https://github.com/langgptai/langgpt/blob/main/Docs/关系表达.md A structured framework for describing concepts relationally, useful for guiding AI. It breaks down a target concept into its components: goal, references, feelings, exclusions, scenarios, and deconstruction. ```markdown 【目标】 [用一句话说明你要做什么] 【参照物】 [它像什么?列举具体的参考] - 像... - 像... - 但...(说明差异) 【感受】 [它应该让人产生什么情绪?] - 让[目标用户]觉得"..." - 第一印象是... 【排除】 [明确不要什么] - 不要...(说明原因) - 不要...(说明原因) 【场景】 [谁在什么情况下使用] - 用户:... - 情境:... - 行为:... 【解构】 [看起来是什么样的] - 空间:... - 色彩:... - 形状:... - 动态:... - 文字:... - 层次:... ```