指导

以 Markdown 格式查看

您可以添加自定义指导来”覆盖” Ask Fern 对特定用户查询的响应。这对于您可能不希望在文档中明确显示的内容(如账单信息、法律条款和其他敏感内容)非常有用。

指导文档由一系列 context 文本和一个 document 文本组成。context 文本将被索引以匹配用户查询。document 文本将用作对用户查询的预定响应。

API

Fern 通过 guidance API 提供内部 CMS(内容管理系统),允许您根据需要添加、更新和删除指导。您需要提供 domain 来指定更新将应用到 Ask Fern 的哪个部署。

有关更多详细信息,请参阅 API 参考

使用方法

以下是可通过 guidance API 上传的指导文档示例:

1{
2 "context": [
3 "What billing options are available for enterprise customers with 10-50 seats?",
4 "How do I upgrade the number of seats for my enterprise plan?"
5 ],
6 "document": "Please reach out to support@yourcompany.com for more information."
7}

在检索步骤中,当用户提出与任何 context 文本模糊匹配的问题时,document 文本将在工具响应中返回,并以以下形式作为上下文提供给智能体:

<GUIDANCE>
In response to the following query:
What billing options are available for enterprise customers with 10-50 seats?
You will return an answer based on the following guidance:
Please reach out to support@yourcompany.com for more information.
</GUIDANCE>

Ask Fern 优先使用指导响应而不是其他文档响应,允许您覆盖默认的 RAG 响应。