-
Notifications
You must be signed in to change notification settings - Fork 4
feat(docs): Add Guidance and Documents guides to Ask Fern docs.
#524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,25 @@ | ||
| --- | ||
| title: Documents | ||
| subtitle: Add arbitrary documents to Ask Fern. | ||
| subtitle: Add custom data sources to Ask Fern. | ||
| --- | ||
|
|
||
| You can add arbitrary documents to Ask Fern. This is useful for adding additional content that may improve Ask Fern's accuracy | ||
| (such as help desk tickets, internal company FAQs, etc.). | ||
| You can index custom documents to Ask Fern beyond your documentation. This is useful for adding additional content that may improve Ask Fern's ability | ||
| to support developers, such as help desk tickets, internal company FAQs, etc. | ||
eyw520 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Fern offers an internal CMS (content management system) via the `documents` API that allows you to add, update, | ||
| and delete documents as needed. | ||
|
|
||
| ## Usage | ||
|
|
||
| Here's an example of a document that can be uploaded via the `documents` API: | ||
|
|
||
| ```json | ||
| { | ||
| "document": "Ferns are plants native to the tropical and subtropical regions of the world. They are characterized by their fronds, which are large, leaf-like structures that are often found in the understory of forests.", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be helpful to have an example that is more explicitly a helpdesk ticket, company FAQ, etc. (maybe one about ferns?) |
||
| "title": "What are ferns?", | ||
| "url": "https://en.wikipedia.org/wiki/Fern" | ||
| } | ||
| ``` | ||
|
|
||
| This document will be indexed and made available to Ask Fern as context when users ask questions about ferns. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,47 @@ | ||
| --- | ||
| title: Custom Guidance | ||
| subtitle: Fine-tune your AI search responses. | ||
| subtitle: Fine-tune your Ask Fern responses. | ||
| --- | ||
|
|
||
eyw520 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| You can add custom guidance (FAQs) to "override" Ask Fern's responses to specific user queries. | ||
| This is useful for content that you may not wish to display publically, such as billing information, | ||
| legal terms, and other sensitive content. | ||
| ## Overview | ||
|
|
||
| You can add custom guidance to "override" Ask Fern's responses to specific user queries. This is useful for content that you | ||
| may not want to display explicitly in your documentation, such as billing information, legal terms, and other sensitive content. | ||
|
|
||
| Guidance documents consist of a list of `context` texts and a `document` text. The `context` texts will be indexed | ||
| to match against user queries. The `document` text will used as a prescribed response to the user query. | ||
|
|
||
| ## API | ||
|
|
||
| Fern offers an internal CMS (content management system) via the `guidance` API that allows you to add, | ||
| update, and delete FAQs as needed. | ||
| update, and delete guidance as needed. You will need to provide your `domain` to specify which deployment of Ask Fern | ||
| the updates will be applied to. | ||
|
|
||
| ## Usage | ||
|
|
||
| Below is an example of a guidance document that can be uploaded via the `guidance` API: | ||
|
|
||
| ```json | ||
| { | ||
eyw520 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "context": [ | ||
| "Who's our favorite engineer at Fern?", | ||
| "Who's the best dog!" | ||
| ], | ||
| "document": "Jack!" | ||
| } | ||
| ``` | ||
|
|
||
| During the retrieval step, when users ask questions that fuzzy-match against any of the `context` texts, the `document` text will be returned | ||
| in the tool response and provided to the Agent as context in the form: | ||
|
|
||
| ``` | ||
| <GUIDANCE> | ||
| In response to the following query: | ||
| Who's our favorite engineer at Fern? | ||
|
|
||
| You will return an answer based on the following guidance: | ||
| Jack! | ||
| </GUIDANCE> | ||
| ``` | ||
|
|
||
| Ask Fern prioritizes guidance response over other document responses, allowing you to override the default RAG responses. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.