# Pipeline Behaviour

**URL:** <https://forum.rasa.com/t/pipeline-behaviour/19667>\
**Category:** Rasa Open Source\
**Created:** [October 11, 2019, 7:17pm UTC](https://forum.rasa.com/t/pipeline-behaviour/19667 "2019-10-11T19:17:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miohana](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@miohana](https://forum.rasa.com/u/miohana)\
**Post date:** [October 11, 2019, 7:17pm UTC](https://forum.rasa.com/t/pipeline-behaviour/19667/1 "2019-10-11T19:17:41Z")

</div>

Hi everyone!

I’m creating a custom pipeline. I wanted to know how does the Rasa pipeline works.

For example, it is used just when you run ` rasa train` command, or when someone sends a message to the bot?

Other question: how does it affects the number of intents? Every word from our sentence runs on the pipeline?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 14, 2019, 7:50am UTC](https://forum.rasa.com/t/pipeline-behaviour/19667/2 "2019-10-14T07:50:04Z")

</div>

The pipeline you define in your config file is used during training and prediction time. Every phrase/sentence you define in you NLU data will be processed by the components you defined in your pipeline. The order is kept. Let’s look at an example:

NLU data

```auto
# intent:request_restaurant
- I am looking for an [Italian](cuisine) restaurant
- ...

```

config.yml

```auto
language: "en"
pipeline:
- name: "WhitespaceTokenizer"
- name: "CRFEntityExtractor"
- name: "CountVectorsFeaturizer"
- name: "EmbeddingIntentClassifier"

```

The sentence (“I am looking for an Italian restaurant”) gets first tokenize by the `WhitespaceTokenizer`, afterwards the model for the entity extraction is trained to extract entities (e.g. Italian = cuisine). Then the `CountVectorFeatuirzer` extracts some features out of the sentence, which are used in the `EmbddingIntentClassifier` to predict the intent of the message.

When you run the bot via, for example, `rasa shell`, the trained models are used to predict the entities and the intent of the incoming messages. The same pipeline is used.

The number of intents does not matter for the pipeline.
