Skip to content

Think Tool node#

Think Tool node เป็น tool ที่ช่วยให้ agent ได้ "คิด" ก่อนจะตอบคำถาม กล่าวคือ agent จะได้ทบทวนหรือพูดกับตัวเองก่อนจะให้คำตอบ เหมาะกับคำถามที่ซับซ้อนหรืออยากได้คำตอบที่ผ่านการคิดอย่างรอบคอบ

Parameter resolution in sub-nodes (การประมวลผล Parameter ใน sub-nodes)

Sub-nodes มีพฤติกรรมแตกต่างจาก node อื่นๆ เมื่อประมวลผลหลายรายการโดยใช้ expression

Node ส่วนใหญ่ รวมถึง root node จะรับ input กี่รายการก็ได้ ประมวลผลรายการเหล่านี้ และส่ง output ออกมา คุณสามารถใช้ expression เพื่ออ้างอิงถึง input item และ node จะประมวลผล expression สำหรับแต่ละ item ตามลำดับ ตัวอย่างเช่น หากมี input เป็นค่า name ห้ารายการ expression {{ $json.name }} จะถูกประมวลผลเป็นแต่ละชื่อตามลำดับ

ใน sub-nodes expression จะถูกประมวลผลเป็น item แรกเสมอ ตัวอย่างเช่น หากมี input เป็นค่า name ห้ารายการ expression {{ $json.name }} จะถูกประมวลผลเป็นชื่อแรกเสมอ

Templates and examples#

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 Tool integration templates, or search all templates

Prompting example#

ตัวอย่างเช่น ถ้าคุณถาม agent ว่า

Jack is looking at Anne. Anne is looking at George. Jack is married, George is not, and we don't know if Anne is married. Is a married person looking at an unmarried person?

agent จะคิดกับตัวเองแบบนี้:

We have the following information: 1. Jack is looking at Anne. 2. Anne is looking at George. 3. Jack is married. 4. George is not married. 5. We don't know if Anne is married or not.

We need to determine if a married person is looking at an unmarried person. Let's consider both cases for Anne:

Case 1: Anne is married.

  • If Anne is married, then she (married) is looking at George (unmarried). In this case, a married person (Anne) is looking at an unmarried person (George).

Case 2: Anne is unmarried.

  • If Anne is unmarried, then Jack (married) is looking at Anne (unmarried). In this case, a married person (Jack) is looking at an unmarried person (Anne).

In both scenarios, we find that a married person is looking at an unmarried person. Therefore, the answer to the question is yes.

แล้วค่อยตอบว่า

Yes, a married person is looking at an unmarried person. In both possible scenarios regarding Anne's marital status, we find that a married individual (either Jack or Anne) is looking at an unmarried individual (either George or Anne).

อ้างอิง LangChain's documentation on tools สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ tools ใน LangChain

ดูเอกสาร Advanced AI ของ n8n

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.