记录些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:
            """;
相关推荐
创意锦囊6 分钟前
ChatGPT推出Canvas功能
人工智能·chatgpt
知来者逆15 分钟前
V3D——从单一图像生成 3D 物体
人工智能·计算机视觉·3d·图像生成
碳苯1 小时前
【rCore OS 开源操作系统】Rust 枚举与模式匹配
开发语言·人工智能·后端·rust·操作系统·os
whaosoft-1431 小时前
51c视觉~CV~合集3
人工智能
网络研究院3 小时前
如何安全地大规模部署 GenAI 应用程序
网络·人工智能·安全·ai·部署·观点
凭栏落花侧3 小时前
决策树:简单易懂的预测模型
人工智能·算法·决策树·机器学习·信息可视化·数据挖掘·数据分析
xiandong206 小时前
240929-CGAN条件生成对抗网络
图像处理·人工智能·深度学习·神经网络·生成对抗网络·计算机视觉
innutritious7 小时前
车辆重识别(2020NIPS去噪扩散概率模型)论文阅读2024/9/27
人工智能·深度学习·计算机视觉
橙子小哥的代码世界8 小时前
【深度学习】05-RNN循环神经网络-02- RNN循环神经网络的发展历史与演化趋势/LSTM/GRU/Transformer
人工智能·pytorch·rnn·深度学习·神经网络·lstm·transformer
985小水博一枚呀9 小时前
【深度学习基础模型】神经图灵机(Neural Turing Machines, NTM)详细理解并附实现代码。
人工智能·python·rnn·深度学习·lstm·ntm