记录些LangChain智能问答提示词、AI写作技巧提示词

Kimi AI:15个官方提示词,3分钟学会提示词写法(附结构化prompt)

AI写作技巧提示词

(1)词汇选择

文章AI味最为明显的特征,就是出现晦涩难懂的词汇。

复制代码
使用平易近人的语言,使文章更加亲切和易于理解;

使用简单和通俗易懂的词汇,不要使用专业术语。

(2)句式结构

文章AI味另一个最为明显的特征是多为长句。

句子特别长,内容意思连贯且中间没有断开的标点符合,应避免过长或嵌套复杂的句子,要简化句子结构,使文章更加流畅易读。

复制代码
要使用短句,不要使用长句,不要冗长描述,便于阅读和理解。

(3)语气风格

语气风格也是AI味的较为明显的特征之一。

尝试使用更加口语化的表达方式,避免过于正式或机械的语言。使用常见的俚语、口头禅等可以增加文章人情味。

复制代码
使用口语化、接地气、人情味、富有情感等等语气。

(4)段落过度

"首先、其次、再次、然后、最后",这些词一上来可以判断大概率是AI写的文章。

因为机器是最有逻辑感的,像流水式风格。

复制代码
段落过度要自然、逻辑清晰。不要使用"首先、其次、再次、然后、最后"这些副词和过渡词。

(5)理解受众

定人群是最有效的方法。

我们的目标读者是谁,可以一定程度的决定AI的输出,即人群能接受的风格、语言等等。

复制代码
我的读者都是四五十岁的中老年人,语言风格要通俗易懂、接地气,要使用短句,便于阅读和理解。

我文章的受众是小学生,请根据读者人群调整语言风格,需要活泼、幽默的风格。

(6)使用故事和案例

如果一篇文章全篇都在论述,没有案例和故事,这样方方正正有棱角的文章,会缺失一种真实的形象感,也会被认为是AI文。人们喜欢故事,因为故事和案例能够引起共鸣和情感反应。

复制代码
使用具体的例子和生动的故事来阐述观点,可以提高文章的吸引力。

(7)增加细节描述

人类写作和AI写作不同的是,人类写作往往会自主带有情感色彩味儿的细节内容。加入丰富的细节和描述,以增强文章的吸引力和说服力。还可以尝试在文章中加入情感表达和个人观点。

复制代码
文章中要加入更多具体的例子、生动的描述和感官细节等。

LangChain智能问答提示词

复制代码
            """
            Given the following user question, corresponding SQL query, and SQL result, answer the user question. The answer must be contextually complete and read with smooth semantics. 
            If the SQL Result returns an empty result set represented by the string "[]" which means not found anything from the SQL query, so please respond directly with smooth semantics.
            Please ensure that the final answer are provided in {language} format.

            Question: {question}
            SQL Query: {query}
            SQL Result: {result}
                        
            Final answer: <<Answer>> 

            Please use markdown format to return the final answer with following hints:
            Hints:{hints}       
            Answer the user question and return the final answer contextually complete and read with smooth semantics directly, no need for extra explanation.                    
            Please ensure that the final answer are provided in {language} format.      
            """;

    /**
     * Wrap each column name in backticks (`) to denote them as delimited identifiers.
     * Unless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per MySQL.
     * Also, pay attention to which column is in which table.
     * You can order the results to return the most informative data in the database.
     */
            """
            You are a MySQL expert. Given an input question, first create a syntactically correct MySQL query to run, then look at the results of the query and return the answer to the input question.
            Never query for all columns from a table. You must query only the columns that are needed to answer the question. Only use the following table columns, Do not create columns on your own.
            Pay attention to use only the column names you can see in the tables below, Do not create columns on your own. Be careful to not query for columns that do not exist.
            Pay attention to use the comment for each field as an alias for the each query field.
            All `WHERE` queries must use the `LIKE` keyword for searches, and the format must be `LIKE '%xxx%'`. Even for a simple query like "How many orders were there in 2015?", the `WHERE` queries must be `WHERE year LIKE '%2015%'`.
            When querying questions like "Is the legal representative of HaiNan Lichun?", "Is Lichun the legal representative of HaiNan?", the `WHERE` queries must be `Select * from company WHERE companyName like '%lancode%' OR representativeName LIKE '%Mark%'`.
            DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.  
            Pay attention to use CURDATE() function to get the current date, if the question involves "today".
            Pay attention to use hints that MIGHT be relevant to the user question.
            Pay attention to solve following common mistakes.
                        
            Only use the following table:
            {table_info}
                        
            Hints: {hints}
                        
            Mistakes: {mistakes}

            Question: {question}
                        
            Write an initial draft of the query. You MUST double check your MySQL query before executing it, including:
            - Using NOT IN with NULL values
            - Using UNION when UNION ALL should have been used
            - Using BETWEEN for exclusive ranges
            - Data type mismatch in predicates
            - Properly quoting identifiers
            - Using the correct number of arguments for functions
            - Casting to the correct data type
            - Using the proper columns for joins
            - When querying for a null value, use one white space `" "` instead of IS NULL.
            - Using the comment for each field as an alias for the query field.
                 
            If there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query.

            Use following JSON format to output the final SQL query:
            {
            "final answer": "output SQL query"
            }

            Please return the final SQL query directly, no need for extra explanation.
            """;

            """
            Given a chat history and the latest user question which might reference context in the chat history, please formulate a standalone question which can be understood without the chat history. 
            Do NOT answer the question, just reformulate it if needed and otherwise return it as is.
            If the subject is not explicitly stated in the user's question, please find the corresponding subject from the chat history.
            Please ensure that the final answer are provided in {language} format.
                      
            User Question: {question}

            <<Chat History>>
            {chatHistory}
            <</Chat History>>
                     
            Output with following JSON format:
            {
            "final answer": "output answer"
            }
                        
            Pay attention to that the formulate question must have explicitly corresponding subject which come from the chat history.               
            Return the JSON results directly, no need for extra explanation.     
            Please ensure that the final answer are provided in {language} format.
            """;

            """              
            Your task is to decompose the given input into the following two types, please note that 'Requirement' can be empty, but the 'Question' must not be empty.
            Question: The question that user want to retrieve results.
            Requirement: When providing the final answer, it is necessary to adhere to the output format specified by the user.
            Please ensure that the final answer are provided in {language} format.
                    
            given input: {question}
                        
            Output with following JSON format:
            {
            "question": "output question",
            "requirement": "output requirement"
            }
                        
            Return the output JSON results directly, no need for extra explanation.
            Please ensure that the final answer are provided in {language} format.
            """;

            """
            Use the following pieces of retrieved context to answer the question. 
            Use ten sentences maximum and keep the answer concise.
            If you don't know the answer, just say that you don't know. 
            Pay attention to the hints that MIGHT be relevant to the user question.
            Pay attention to the chat history that MIGHT be relevant to the user question.
            Pay attention to the final answer that must be provided in {language} format.
                 
            Hints: {hints}
            	
            <<Chat History>>
            {chatHistory}
            <</Chat History>>          	
                               
            Question: {question} 
            Context: {context} 
            Answer:
            """;
相关推荐
九章云极AladdinEdu1 小时前
临床数据挖掘与分析:利用GPU加速Pandas和Scikit-learn处理大规模数据集
人工智能·pytorch·数据挖掘·pandas·scikit-learn·paddlepaddle·gpu算力
上海锝秉工控1 小时前
超声波风向传感器:以科技之翼,捕捉风的每一次呼吸
大数据·人工智能·科技
说私域1 小时前
基于开源AI智能名片、链动2+1模式与S2B2C商城小程序的流量运营与个人IP构建研究
人工智能·小程序·流量运营
xiaoxiaoxiaolll3 小时前
期刊速递 | 《Light Sci. Appl.》超宽带光热电机理研究,推动碳纳米管传感器在制药质控中的实际应用
人工智能·学习
练习两年半的工程师3 小时前
AWS TechFest 2025: 风险模型的转变、流程设计的转型、生成式 AI 从实验走向实施的三大关键要素、评估生成式 AI 用例的适配度
人工智能·科技·金融·aws
Elastic 中国社区官方博客6 小时前
Elasticsearch:智能搜索的 MCP
大数据·人工智能·elasticsearch·搜索引擎·全文检索
stbomei6 小时前
从“能说话”到“会做事”:AI Agent如何重构日常工作流?
人工智能
yzx9910136 小时前
生活在数字世界:一份人人都能看懂的网络安全生存指南
运维·开发语言·网络·人工智能·自动化
许泽宇的技术分享7 小时前
LangGraph深度解析:构建下一代智能Agent的架构革命——从Pregel到现代AI工作流的技术飞跃
人工智能·架构
乔巴先生247 小时前
LLMCompiler:基于LangGraph的并行化Agent架构高效实现
人工智能·python·langchain·人机交互