|
1 | 1 | --- |
2 | 2 | title: Custom Guidance |
3 | | -subtitle: Fine-tune your AI search responses. |
| 3 | +subtitle: Fine-tune your Ask Fern responses. |
4 | 4 | --- |
5 | 5 |
|
6 | | -You can add custom guidance (FAQs) to "override" Ask Fern's responses to specific user queries. |
7 | | -This is useful for content that you may not wish to display publically, such as billing information, |
8 | | -legal terms, and other sensitive content. |
| 6 | +## Overview |
| 7 | + |
| 8 | +You can add custom guidance to "override" Ask Fern's responses to specific user queries. This is useful for content that you |
| 9 | +may not want to display explicitly in your documentation, such as billing information, legal terms, and other sensitive content. |
| 10 | + |
| 11 | +Guidance documents consist of a list of `context` texts and a `document` text. The `context` texts will be indexed |
| 12 | +to match against user queries. The `document` text will used as a prescribed response to the user query. |
| 13 | + |
| 14 | +## API |
9 | 15 |
|
10 | 16 | Fern offers an internal CMS (content management system) via the `guidance` API that allows you to add, |
11 | | -update, and delete FAQs as needed. |
| 17 | +update, and delete guidance as needed. You will need to provide your `domain` to specify which deployment of Ask Fern |
| 18 | +the updates will be applied to. |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | +Below is an example of a guidance document that can be uploaded via the `guidance` API: |
| 23 | + |
| 24 | +```json |
| 25 | +{ |
| 26 | + "context": [ |
| 27 | + "Who's our favorite engineer at Fern?", |
| 28 | + "Who's the best dog!" |
| 29 | + ], |
| 30 | + "document": "Jack!" |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +During the retrieval step, when users ask questions that fuzzy-match against any of the `context` texts, the `document` text will be returned |
| 35 | +in the tool response and provided to the Agent as context in the form: |
| 36 | + |
| 37 | +``` |
| 38 | +<GUIDANCE> |
| 39 | +In response to the following query: |
| 40 | +Who's our favorite engineer at Fern? |
| 41 | +
|
| 42 | +You will return an answer based on the following guidance: |
| 43 | +Jack! |
| 44 | +</GUIDANCE> |
| 45 | +``` |
| 46 | + |
| 47 | +Ask Fern prioritizes guidance response over other document responses, allowing you to override the default RAG responses. |
0 commit comments