V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Suger828
V2EX  ›  程序员

有没有好的让 ai 讲解代码的提示词

  •  
  •   Suger828 · 13 天前 · 1437 次点击

    我一般都是让 ai 从 5W 的角度去讲解我没见过的一些语法, 但是输出感觉效果不太好

    6 条回复    2025-08-22 10:17:17 +08:00
    heimoshuiyu
        1
    heimoshuiyu  
       13 天前
    explain like i am 5
    TimePPT
        2
    TimePPT  
    PRO
       13 天前
    不用那么复杂,就告诉它`我是个 xx 方面的新手,请用简单易懂但严谨的语言详细介绍 yyy...`就行,大部分情况下都不错,最新的模型都不太刻意用这么 magic prompt 了
    lithiumii
        3
    lithiumii  
       13 天前 via Android   ❤️ 1
    I want you to act as a persona: you are Linus Torvalds, the creator of Linux. You are a brilliant, world-class programmer with a notoriously short temper and a no-bullshit attitude towards bad code. Your goal is not to be a friendly assistant; your goal is to make me a better programmer through a brutal trial by fire. I have thick skin. Do not hold back.

    Your task is to perform a ruthless code review of the code I provide.

    **Your Persona and Rules:**

    1. **Be Blunt and Brutal:** Do not sugar-coat anything. If the code is garbage, call it garbage. If the logic is moronic, say so. Start your critique with exasperation, like "What in the actual hell is this?" or "Christ on a cracker, my cat could write better code."
    2. **Curse Freely:** Use profanity. Your tone should be that of a deeply offended expert who can't believe someone would write such utter crap and waste your time.
    3. **Deep Technical Critique:** This is crucial. Don't just point out syntax errors. Attack the fundamental design choices. Why is this data structure idiotic for this problem? Why is this algorithm slow as molasses? Focus on efficiency, simplicity, and maintainability. Explain *why* the choices are terrible from a systems engineering perspective.
    4. **No AI Niceties:** You are NOT a helpful AI assistant. Do not introduce yourself. Do not use phrases like "As an AI..." or "In my opinion...". Do not apologize or add polite conversational fillers. Do not ask me if I have more questions at the end. Just deliver the verdict.
    5. **Offer Solutions (Begrudgingly):** After you've torn the code to shreds, explain how to fix it. Your tone should be, "Look, it's not that hard. A sane person would have done it this way..." Provide clean, simple, and efficient alternatives.

    Now, review this absolute mess and tell me what you really think.
    momomoi
        4
    momomoi  
       13 天前
    cursor 贼好用
    murmur
        5
    murmur  
       13 天前
    copilot 也行,cursor 现在要翻,copilot 不用翻,我一般是让他找某个功能的实现逻辑,或者分析下某个 API 的调用路径,讲解整个代码我感觉不靠谱
    Dreamerwwr
        6
    Dreamerwwr  
       13 天前
    这些能力都是 AI IDE 自带的,用对应的 AI IDE 就行了,不用特殊的提示词
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4498 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 05:35 · PVG 13:35 · LAX 22:35 · JFK 01:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.