Skip to content
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

some docs refactoring #12828

Merged
merged 28 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
954d6fc
add action step callout to tutorial
amn41 Sep 18, 2023
6a71f2b
Merge branch 'docs-dm2' of github.com:RasaHQ/rasa into docs-dm2
amn41 Sep 18, 2023
e86093b
bunch of edits and moving stuff around
amn41 Sep 19, 2023
61d17a4
fix a couple of broken links
amn41 Sep 19, 2023
5fb7909
boken links
amn41 Sep 19, 2023
5254442
fixed links
amn41 Sep 20, 2023
bcae339
also lint mdx files 2 levels deep
amn41 Sep 20, 2023
ad1626f
fix more links
amn41 Sep 20, 2023
3f3da45
Revert "also lint mdx files 2 levels deep"
amn41 Sep 20, 2023
0f5daae
Update docs/docs/concepts/domain.mdx
amn41 Sep 20, 2023
ea0ad33
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
46c50fb
Update docs/docs/concepts/domain.mdx
amn41 Sep 20, 2023
2fd8273
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
45edb9b
Update docs/docs/calm.mdx
amn41 Sep 20, 2023
7f581e9
Update docs/docs/concepts/domain.mdx
amn41 Sep 20, 2023
4c86c4a
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
52732f8
Update docs/docs/concepts/domain.mdx
amn41 Sep 20, 2023
f6206df
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
897b170
Update docs/docs/concepts/dialogue-understanding.mdx
amn41 Sep 20, 2023
93346f3
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
42a0481
Update docs/docs/concepts/dialogue-understanding.mdx
amn41 Sep 20, 2023
d2c869f
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
3211653
Update docs/docs/concepts/policies.mdx
amn41 Sep 20, 2023
9fa6198
renamed actionlabel to tutorialactionlabel
amn41 Sep 21, 2023
da46629
PR comments
amn41 Sep 21, 2023
fdafad3
add missing slot mappings to examples in domain
amn41 Sep 21, 2023
f18d45e
fixed link
amn41 Sep 21, 2023
7faf9c4
fix table rendering in CLI docs
m-vdb Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1827,10 +1827,10 @@ Upgrade dependent libraries with security vulnerabilities (Pillow, TensorFlow, u

### Bugfixes

- [#8364](https://github.com/rasahq/rasa/issues/8364): Fixed a bug where [`ListSlot`](./concepts/domain.mdx#list-slot)s were filled with single items
- [#8364](https://github.com/rasahq/rasa/issues/8364): Fixed a bug where [`ListSlot`](./building-classic-assistants/domain.mdx#list-slot)s were filled with single items
in case only one matching entity was extracted for this slot.

Values applied to [`ListSlot`](./concepts/domain.mdx#list-slot)s will be converted to a `List`
Values applied to [`ListSlot`](./building-classic-assistants/domain.mdx#list-slot)s will be converted to a `List`
in case they aren't one.

- [#8581](https://github.com/rasahq/rasa/issues/8581): Fix bug with false rule conflicts
Expand Down Expand Up @@ -2547,7 +2547,7 @@ Upgrade dependent libraries with security vulnerabilities (Pillow, TensorFlow, u
and continue finetuning the model on the complete dataset consisting of
new training examples. To do so, use `rasa train --finetune`. For more
detailed explanation of the command, check out the docs on [incremental
training](./concepts/command-line-interface.mdx#incremental-training).
training](./command-line-interface.mdx#incremental-training).

Added a configuration parameter `additional_vocabulary_size` to
[`CountVectorsFeaturizer`](./building-classic-assistants/components.mdx#countvectorsfeaturizer)
Expand Down Expand Up @@ -3267,7 +3267,7 @@ Upgrade dependent libraries with security vulnerabilities (Pillow, TensorFlow, u

- [#4536](https://github.com/rasahq/rasa/issues/4536): Add support for Python 3.8.
- [#5368](https://github.com/rasahq/rasa/issues/5368): Changed the project structure for Rasa projects initialized with the
[CLI](./concepts/command-line-interface.mdx) (using the `rasa init` command):
[CLI](./command-line-interface.mdx) (using the `rasa init` command):
`actions.py` -> `actions/actions.py`. `actions` is now a Python package (it contains
a file `actions/__init__.py`). In addition, the `__init__.py` at the
root of the project has been removed.
Expand Down Expand Up @@ -3832,7 +3832,7 @@ Upgrade dependent libraries with security vulnerabilities (Pillow, TensorFlow, u

- [#5521](https://github.com/rasahq/rasa/issues/5521): Responses used in ResponseSelector now support new lines with explicitly adding `\\n` between them.

- [#5758](https://github.com/rasahq/rasa/issues/5758): Fixed a bug in [`rasa export`](./concepts/command-line-interface.mdx#rasa-export)) which caused Rasa Open Source to only migrate conversation events from the last [Session configuration](./concepts/domain.mdx#session-configuration).
- [#5758](https://github.com/rasahq/rasa/issues/5758): Fixed a bug in [`rasa export`](./command-line-interface.mdx#rasa-export)) which caused Rasa Open Source to only migrate conversation events from the last [Session configuration](./concepts/domain.mdx#session-configuration).

## [1.10.1] - 2020-05-15

Expand Down Expand Up @@ -4253,7 +4253,7 @@ This can help to fix problems when using `rasa shell` with custom actions which
Language models currently supported: BERT, OpenAIGPT, GPT-2, XLNet, DistilBert, RoBERTa.

- [#5225](https://github.com/rasahq/rasa/issues/5225): Added a new CLI command `rasa export` to publish tracker events from a persistent
tracker store using an event broker. See [Export Conversations to an Event Broker](./concepts/command-line-interface.mdx#rasa-export), [Tracker Stores](./production/tracker-stores.mdx)
tracker store using an event broker. See [Export Conversations to an Event Broker](./command-line-interface.mdx#rasa-export), [Tracker Stores](./production/tracker-stores.mdx)
and [Event Brokers](./production/event-brokers.mdx) for more details.

- [#5230](https://github.com/rasahq/rasa/issues/5230): Refactor how GPU and CPU environments are configured for TensorFlow 2.0.
Expand Down Expand Up @@ -5067,9 +5067,7 @@ Regression: changes from `1.2.12` were missing from `1.4.0`, readded them
- `FallbackPolicy` can now be configured to trigger when the difference between confidences of two predicted intents is too narrow

- experimental training data importer which supports training with data of multiple
sub bots. Please see the
[docs](./concepts/training-data-importers.mdx) for more
information.
sub bots. Please see the docs for more information.

- throw error during training when triggers are defined in the domain without
`MappingPolicy` being present in the policy ensemble
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/action-server/validation-action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ can be set or updated outside of a form context.
:::note
`ValidationAction` is intended for extracting slots **outside** the context of a form.
It will ignore extraction and validation methods for any slots that have a form specified under the
[slot mapping's `conditions`](../concepts/domain.mdx#mapping-conditions).
[slot mapping's `conditions`](../building-classic-assistants/domain.mdx#mapping-conditions).
It will not run these methods when the specified form is active nor when no form is active.
Please extend the [`FormValidationAction`](./validation-action.mdx#formvalidationaction-class) class to apply
custom slot mappings only within the context of a form.
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/building-classic-assistants/business-logic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The examples on this page come from the [formbot example bot](https://github.com
## Step-by-step Guide on Using Forms to Handle Business Logic

[Forms](./forms.mdx) work by prompting the user for information until it has gathered all required information.
The information is stored in [slots](../concepts/domain.mdx#slots). Once all the required slots are filled,
The information is stored in [slots](./domain.mdx#slots). Once all the required slots are filled,
the bot fulfills the user's original request.

### 1. Defining the form
Expand Down Expand Up @@ -65,7 +65,7 @@ forms:
- outdoor_seating
```

These slots need to be added to your domain's `slots` section, along with [slot mappings](../concepts/domain.mdx#slot-mappings) which define how the slots can be filled. For any slot filled `from_entity`, the entity also needs to be added
These slots need to be added to your domain's `slots` section, along with [slot mappings](./domain.mdx#slot-mappings) which define how the slots can be filled. For any slot filled `from_entity`, the entity also needs to be added
to the domain. Slots filled by forms should usually not influence
the conversation, so set `influence_conversation` to `false:

Expand Down Expand Up @@ -122,7 +122,7 @@ filled based on the user's intent: If it is `affirm`, it'll be `true`, if it is
However, the slot should only be set to `true` or `false` if the user was responding to the question, `Do you want to sit outside?`.
To enforce this condition, the `conditions` for the `outdoor_seating` slot requires that `restaurant_form` is active and that the requested slot is `outdoor_seating`.
If there were no conditions and the user had sent a message with the `affirm` or `deny` intent earlier in the conversation,
the `outdoor_seating` slot would already be filled when the form was activated. Therefore the form would not prompt the user for their outdoor seating preference. See [mapping conditions](../concepts/domain.mdx#mapping-conditions) for more information.
the `outdoor_seating` slot would already be filled when the form was activated. Therefore the form would not prompt the user for their outdoor seating preference. See [mapping conditions](./domain.mdx#mapping-conditions) for more information.

#### Validating Slots

Expand All @@ -135,7 +135,7 @@ about validation actions.
#### Requesting Slots

To specify how the bot should ask for the required information,
you define [`responses`](../concepts/domain.mdx#responses) called `utter_ask_{slotname}` in your domain:
you define [`responses`](./domain.mdx#responses) called `utter_ask_{slotname}` in your domain:

```yaml-rasa title="domain.yml"
responses:
Expand All @@ -149,7 +149,7 @@ responses:

### 2. Updating the configuration

A form's [happy path](../concepts/glossary.mdx#happy--unhappy-paths) should be defined as a [rule](rules.mdx) which means you'll need to add the [RulePolicy](./policies.mdx#rule-policy)
A form's [happy path](./glossary.mdx#happy--unhappy-paths) should be defined as a [rule](rules.mdx) which means you'll need to add the [RulePolicy](./policies.mdx#rule-policy)
to your policies:

```yaml-rasa title="config.yml"
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/building-classic-assistants/chitchat-faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Chitchat and FAQs
abstract: FAQ assistants are the simplest assistants to build and typically the first kind of assistant anyone builds. This page is a guide to the concepts and training data you need to handle non-contextual questions like FAQs and chitchat.
---

[FAQs](../concepts/glossary.mdx#faqs) and [chitchat](../concepts/glossary.mdx#chitchat) are two cases where the conversational assistant responds with a fixed set of messages, and the assistant should always answer the same way,
[FAQs](./glossary.mdx#faqs) and [chitchat](./glossary.mdx#chitchat) are two cases where the conversational assistant responds with a fixed set of messages, and the assistant should always answer the same way,
no matter what has happened previously in the conversation.
For example, in the following conversation, every question can be asked at any point in the conversation,
with the answer being independent of anything the user has said previously.
Expand Down Expand Up @@ -82,7 +82,7 @@ pipeline:

Consider an example where you have 20 different FAQs. Although each question is represented as an individual intent, all FAQ intents are handled the same way in the dialogue. For each FAQ intent, the assistant **retrieves** the proper response depending on which question has been asked.

Instead of writing 20 rules, you can use a single action, e.g. `utter_faq` to handle all FAQs with a single rule by grouping them together under a single [retrieval intent](../concepts/glossary.mdx#retrieval-intent)
Instead of writing 20 rules, you can use a single action, e.g. `utter_faq` to handle all FAQs with a single rule by grouping them together under a single [retrieval intent](./glossary.mdx#retrieval-intent)
called e.g. `faq`.

The single action uses the output of the
Expand Down Expand Up @@ -144,7 +144,7 @@ intents:

Responses for the ResponseSelector follow the same naming convention as
retrieval intents. Besides this, they can have all the characteristics of
normal bot [response](../concepts/domain.mdx#responses). For the chitchat intents
normal bot [response](./domain.mdx#responses). For the chitchat intents
listed above, our responses could look like:

```yaml-rasa title="domain.yml"
Expand Down
70 changes: 66 additions & 4 deletions docs/docs/building-classic-assistants/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ Note: The `feature-dimension` for sequence and sentence features does not have t
**Configuring for incremental training**

To ensure that `sparse_features` are of fixed size during
[incremental training](../concepts/command-line-interface.mdx#incremental-training), the
[incremental training](../command-line-interface.mdx#incremental-training), the
component should be configured to account for additional patterns that may be
added to the training data in future. To do so, configure the `number_additional_patterns`
parameter while training the base model from scratch:
Expand Down Expand Up @@ -703,7 +703,7 @@ Note: The `feature-dimension` for sequence and sentence features does not have t
**Configuring for incremental training**

To ensure that `sparse_features` are of fixed size during
[incremental training](../concepts/command-line-interface.mdx#incremental-training), the
[incremental training](../command-line-interface.mdx#incremental-training), the
component should be configured to account for additional vocabulary tokens
that may be added as part of new training examples in the future.
To do so, configure the `additional_vocabulary_size` parameter while training the base model from scratch:
Expand Down Expand Up @@ -1401,6 +1401,68 @@ See [starspace paper](https://arxiv.org/abs/1709.03856) for details.

</details>

### LLMIntentClassifier

<RasaLabsLabel />

<RasaLabsBanner version="3.7.0b1" />

The LLM-based intent classifier is a new intent classifier that uses large
language models (LLMs) to classify intents. The LLM-based intent classifier
relies on a method called retrieval augmented generation (RAG), which combines
the benefits of retrieval-based and generation-based approaches.

During training, the classifier

1. embeds all intent examples and
2. stores their embeddings in a vector store.

During prediction the classifier

1. embeds the current message and
2. uses the embedding to find similar intent examples in the vector store.
3. The retrieved examples are ranked based on similarity to the current message and
4. the most similar ones are included in an LLM prompt. The prompt guides the LLM to
predict the intent of the message.
5. LLM predicts an intent label.
6. The generated label is mapped to an intent of the domain. The LLM can also
predict a label that is not part of the training data. In this case, the
intent from the domain with the most similar embedding is predicted.

## Using the LLM-based Intent Classifier in Your Bot

To use the LLM-based intent classifier in your bot, you need to add the
`LLMIntentClassifier` to your NLU pipeline in the `config.yml` file.

```yaml-rasa title="config.yml"
pipeline:
# - ...
- name: rasa_plus.ml.LLMIntentClassifier
# - ...
```

## Customizing

You can customize the LLM by modifying the following parameters in the
`config.yml` file. **All of the parameters are optional.**
See other LLM Components for how to customize the LLM parameters.

### Fallback Intent

The fallback intent is used when the LLM predicts an intent that wasn't part of
the training data. You can set the fallback intent by adding the following
parameter to the `config.yml` file.

```yaml-rasa title="config.yml"
pipeline:
# - ...
- name: rasa_plus.ml.LLMIntentClassifier
fallback_intent: "out_of_scope"
# - ...
```



### FallbackClassifier

- **Short**
Expand Down Expand Up @@ -2373,7 +2435,7 @@ Selectors predict a bot response from a set of candidate responses.
It embeds user inputs and response labels into the same space and follows the exact same
neural network architecture and optimization as the [DIETClassifier](./components.mdx#dietclassifier).

To use this component, your training data should contain [retrieval intents](../concepts/glossary.mdx#retrieval-intent). To define these,
To use this component, your training data should contain [retrieval intents](./glossary.mdx#retrieval-intent). To define these,
checkout [documentation on NLU training examples](./training-data-format.mdx#training-examples) and
[documentation on defining response utterances for retrieval intents](../concepts/responses.mdx#defining-responses).

Expand Down Expand Up @@ -2644,5 +2706,5 @@ pipeline:
- name: "sentiment.SentimentAnalyzer"
```

See the [guide on custom graph components](../concepts/custom-graph-components.mdx) for a complete guide on custom components.
See the [guide on custom graph components](../concepts/components/custom-graph-components.mdx) for a complete guide on custom components.
Also be sure to read the section on the [Component Lifecycle](./tuning-your-model.mdx#component-lifecycle).
Loading