记录些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:
            """;
相关推荐
才兄说17 分钟前
机器人租售怎么嵌?按流程节点
人工智能
logic_519 分钟前
关于VIT为啥可以用卷积代替第一层嵌入层
人工智能·神经网络·cnn
小康小小涵20 分钟前
改进型深度Q-网格DQN和蒙特卡洛树搜索MCTS以及模型预测控制MPC强化学习的机器人室内导航仿真
人工智能·机器人·自动驾驶
PNP机器人21 分钟前
突破机器人操作瓶颈!接触感知神经动力学,让仿真与现实无缝对齐
人工智能·机器人
美狐美颜sdk28 分钟前
直播美颜sdk与智能美妆技术解析:实时人脸算法如何驱动新一代互动体验
人工智能·音视频·美颜sdk·视频美颜sdk·美狐美颜sdk
hit56实验室30 分钟前
【易经系列】《屯卦》:six four:乘马班如,求婚媾,往吉,无不利
人工智能
阿杰学AI34 分钟前
AI核心知识80——大语言模型之Slow Thinking和Deep Reasoning(简洁且通俗易懂版)
人工智能·ai·语言模型·自然语言处理·aigc·慢思考·深度推理
qq_124987075337 分钟前
基于协同过滤算法的运动场馆服务平台设计与实现(源码+论文+部署+安装)
java·大数据·数据库·人工智能·spring boot·毕业设计·计算机毕业设计
hit56实验室39 分钟前
【易经系列】《屯卦》上六:乘马班如,泣血涟如。
人工智能