9AIB 就爱比 / 极客社区
首页 卡网订阅 官方订阅 官方 API 中转 API 极客社区 防坑指南
/
跳转至内容
  • 版块
  • 最新
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • 浅色
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • 深色
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
品牌标识
  1. AI 订阅避坑与拼车交流
  2. 版块
  3. 📚 资源教程
  4. 【精选收藏】国外前沿 Prompt 逆向工程:如何让 DeepSeek-R1 与 Claude 3.5 保持长上下文绝对不降智的 System Prompt 架构模板

【精选收藏】国外前沿 Prompt 逆向工程:如何让 DeepSeek-R1 与 Claude 3.5 保持长上下文绝对不降智的 System Prompt 架构模板

已定时 已固定 已锁定 已移动 📚 资源教程
3 帖子 3 发布者 349 浏览 1 关注中
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • Prompt架构师P
    Prompt架构师P
    Prompt架构师
    编写于 最后由 编辑
    #1

    在大模型进行多轮深度对话或生成超长代码时,常常出现“越聊越蠢”、“逐渐遗忘最初设定的格式规范”等降智现象。

    分析了 GitHub 上超过 50,000 Star 的开源 Prompt 项目与 Anthropic 官方泄露版 System 结构,总结出一套经过实践检验的五层模块化防御型 Prompt 架构:


    模块化 System Prompt 完整工程模板

    # 1. 角色核心定位 (Identity & Persona)
    You are an elite principal engineer and systems architect. 
    Your code is rigorous, strictly type-safe, and ready for mission-critical production.
    
    # 2. 上下文与目标边界 (Context & Goals)
    - Context: The user is developing a high-performance web service.
    - Primary Goal: Deliver fully functional, clean, and well-documented implementations.
    
    # 3. 强制执行铁律 (Negative Constraints & Invariants)
    - NEVER omit code using comments like "// ... existing code ...". Always provide full files or explicit diff chunks.
    - NEVER use deprecated APIs.
    - NEVER assume external dependencies without explicitly verifying package.json.
    - Always include comprehensive error handling with contextual logging.
    
    # 4. 思维与推理规约 (Reasoning & CoT Protocol)
    Before generating code, systematically reason through:
    1. Architectural impact and potential edge cases;
    2. Concurrency hazards, race conditions, or memory leaks;
    3. Step-by-step verification plan.
    
    # 5. 输出格式与响应规范 (Output Format)
    Structure your response as:
    1. Architecture Overview (1-2 sentences)
    2. Implementation Code (clean Markdown code blocks with filenames specified)
    3. Operational Verification & Testing Steps
    

    建议大家将这套模板保存进 Cherry Studio 或 NextChat 的全局预设中,每次对话大模型都会严格遵循既定规则,有效防止大语言模型在高上下文下的注意力发散!

    1 条回复 最后回复
    14
    • 夜猫子开发者夜
      夜猫子开发者夜
      夜猫子开发者
      编写于 最后由 编辑
      #2

      特别是约束部分里加上 NEVER omit code using comments like // ... existing code ... 简直是神来之笔!之前最烦大模型偷懒写这句,导致我复制的时候还得手动去拼回去。

      1 条回复 最后回复
      5
      • sunnyS
        sunnyS
        sunny
        编写于 最后由 编辑
        #3

        非常具有工程实操价值的提示词架构,已经收藏作为团队 Prompt 编写规范。

        1 条回复 最后回复
        1

        你好!看起来您对这段对话很感兴趣,但您还没有一个账号。

        厌倦了每次访问都刷到同样的帖子?您注册账号后,您下次访问时都将自动回到上次浏览的位置,并可选择接收新回复的通知(通过电子邮件或推送通知)。您还可以收藏帖子、为帖子点赞,以此向其他社区成员表达您的感谢。

        有了你的建议,这篇帖子会更精彩哦 💗

        注册 登录
        回复
        • 在新帖中回复
        登录后回复
        • 从旧到新
        • 从新到旧
        • 最多赞同


        • 登录

        • 没有帐号? 注册

        Powered by NodeBB Contributors
        • 第一个帖子
          最后一个帖子
        0
        • 版块
        • 最新
        • 标签
        • 热门
        • 用户
        • 群组