Skip to content

Think Tool 节点#

Think Tool 节点是一个 AI 工具,它邀请 AI 代理在回答问题前进行思考。本质上,它允许代理在提供答案前通过自我对话来反思问题。这对于需要深思熟虑回答的复杂查询特别有用。

/// 注意 | 子节点中的参数解析 子节点在使用表达式处理多个项目时的行为与其他节点不同。

大多数节点(包括根节点)会接收任意数量的输入项,处理这些项目,然后输出结果。您可以使用表达式来引用输入项,节点会依次为每个项目解析表达式。例如,给定五个 name 值作为输入,表达式 {{ $json.name }} 会依次解析为每个名称。

而在子节点中,表达式总是解析为第一个项目。例如,给定五个 name 值作为输入,表达式 {{ $json.name }} 总是解析为第一个名称。 ///

模板和示例#

Automated Stock Analysis Reports with Technical & News Sentiment using GPT-4o

by Elay Guez

View template details
Document Q&A Chatbot with Gemini AI and Supabase Vector Search for Telegram

by Mohammad Ghaffarifar

View template details
Zoom AI Meeting Assistant creates mail summary, ClickUp tasks and follow-up call

by Friedemann Schuetz

View template details
Browse Think 工具 integration templates, or search all templates

提示词示例#

举个例子,假设您向代理提问:

杰克正在看安妮。安妮正在看乔治。杰克已婚,乔治未婚,我们不知道安妮是否已婚。是否存在已婚人士正在看未婚人士的情况?

代理会使用工具进行思考:

我们有以下信息:1. 杰克正在看安妮。2. 安妮正在看乔治。3. 杰克已婚。4. 乔治未婚。5. 我们不知道安妮是否已婚。

我们需要确定是否存在已婚人士正在看未婚人士的情况。让我们考虑安妮的两种可能性:

情况1:安妮已婚。

  • 如果安妮已婚,那么她(已婚)正在看乔治(未婚)。这种情况下,已婚人士(安妮)正在看未婚人士(乔治)。

情况2:安妮未婚。

  • 如果安妮未婚,那么杰克(已婚)正在看安妮(未婚)。这种情况下,已婚人士(杰克)正在看未婚人士(安妮)。

在两种场景中,我们都发现有已婚人士正在看未婚人士。因此,问题的答案是肯定的。

然后会给出最终答案:

是的,存在已婚人士正在看未婚人士的情况。在关于安妮婚姻状况的两种可能场景中,我们都发现有已婚个体(要么是杰克要么是安妮)正在看未婚个体(要么是乔治要么是安妮)。

相关资源#

请参考 LangChain 关于工具的文档 获取更多关于 LangChain 中工具的信息。

查看 n8n 的高级 AI 文档。

AI glossary#

  • completion: Completions are the responses generated by a model like GPT.
  • hallucinations: Hallucination in AI is when an LLM (large language model) mistakenly perceives patterns or objects that don't exist.
  • vector database: A vector database stores mathematical representations of information. Use with embeddings and retrievers to create a database that your AI can access when answering questions.
  • vector store: A vector store, or vector database, stores mathematical representations of information. Use with embeddings and retrievers to create a database that your AI can access when answering questions.