forked from RasaHQ/rasa
-
Notifications
You must be signed in to change notification settings - Fork 0
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
RAOC-25: Modifying the content to contain description of the improvement #3
Merged
Gajithra
merged 4 commits into
OSS-668-Update-documentation-for-improvement-in-rasa-sdk-knowledge-base-actions
from
RAOC-25
May 5, 2023
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d2eee43
modified content to include information on improvements related to qu…
Gajithra 34bb255
Merge pull request #2 from rootcodelabs/OSS-668-Update-documentation-…
Gajithra 9559a3f
modified line 283 and 314 to rephrase the sentence better
Gajithra e723996
modified line 283 and 314 to rephrase the sentence better
Gajithra File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -280,7 +280,7 @@ previously set slots to decide what to query for. | |
|
||
### Query the Knowledge Base for Objects | ||
|
||
In order to query the knowledge base for any kind of object, the user's request needs to include the object type. | ||
In order to query the knowledge base to list objects, the user's request needs to include the object type. | ||
Let's look at an example: | ||
|
||
Can you please name some restaurants? | ||
|
@@ -311,7 +311,9 @@ You also need to add those as entities and slots to the domain file. | |
### Query the Knowledge Base for an Attribute of an Object | ||
|
||
If the user wants to obtain specific information about an object, the request should include both the object and | ||
attribute of interest. | ||
attribute of interest. The user is not required to query the knowledge base for objects prior to this. | ||
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. Rephrase this more |
||
The `ActionQueryKnowledgeBase` will extract the object type from user's request and query the knowledge base for an attribute of an object. | ||
|
||
For example, if the user asks something like: | ||
|
||
What is the cuisine of Berlin Burrito Company? | ||
|
@@ -328,7 +330,8 @@ intents: | |
- What is the [cuisine](attribute) of [Berlin Burrito Company](restaurant)? | ||
``` | ||
|
||
Make sure to add the object type, “restaurant,” to the domain file as entity and slot. | ||
Make sure to add the object type, “restaurant,” to the domain file as entity and slot. This will support `ActionQueryKnowledgeBase` | ||
to extract the object type of the object user is interested in. | ||
|
||
<a aria-hidden="true" tabIndex="-1" className="anchor enhancedAnchor" id="resolve-mentions"></a> | ||
|
||
|
@@ -568,7 +571,7 @@ The implementation of the `InMemoryKnowledgeBase` itself can be found in the | |
|
||
If you have more data or if you want to use a more complex data structure that, for example, involves relations between | ||
different objects, you can create your own knowledge base implementation. | ||
Just inherit `KnowledgeBase` and implement the methods `get_objects()`, `get_object()`, and | ||
Just inherit `KnowledgeBase` and implement the methods `get_objects()`, `get_object()`, `get_object_types()` and | ||
`get_attributes_of_object()`. The [knowledge base code](https://github.com/RasaHQ/rasa-sdk/tree/main/rasa_sdk/knowledge_base/) | ||
provides more information on what those methods should do. | ||
|
||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.