> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pathors.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 打造對話 Agent

> 學習如何使用 Pathors 建立基本的對話 Agent

本教學將帶你一步步用 Pathors 打造一個餐廳問答聊天機器人。

## 教學影片

<iframe width="100%" height="400" src="https://www.youtube.com/embed/LBs93kZs-Mw" frameborder="0" allowfullscreen />

## 概述

本示例以餐廳問答為場景，從設置對話流程、節點、Prompt 到測試 Agent 回答，完整展示 Pathors 的基本用法。

## 操作步驟

1. **設置對話流程與節點**
   * 建立對話流程，設計節點與節點間的連線（edge）。
   * 在起始節點設置歡迎語，例如"你好，我是東風餐廳的智能助手"。
   * 允許用戶提出問題。

2. **設置 Prompt 與條件**
   * 在節點中設置 Prompt，包含餐廳信息（如營業時間、電話等）。
   * 根據用戶問題，將對話導向不同節點，並可自訂回覆內容。
   * 可預先設置工具或知識庫（後續教學會介紹）。

3. **結束節點設計**
   * 設置對話結束時的收尾語，例如"不客氣"或邀請填寫問卷。

4. **測試 Agent 回答**
   * 問"請問你的餐廳什麼時候營業？"等問題，確認 Agent 能根據 Prompt 正確回答。

5. **進階設置**
   * 使用 Global Prompt（全局提示詞）調整語氣、時區等。
   * 選擇執行模式：Smart 模式支援自適應路徑導航，Balance 模式提供成本效益處理，Turbo 模式則提供更快的 monolithic 推理。

## 相關資源

* [Pathors 官方文檔](/)
* [下一個教學：打造複雜對話 Agent](./pathors-tutorial-01-appendix-complex-agent)
