# Raise core confidence

**URL:** <https://forum.rasa.com/t/raise-core-confidence/24030>\
**Category:** Rasa Open Source\
**Created:** [January 27, 2020, 6:13pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030 "2020-01-27T18:13:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![devdeca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/devdeca/32/5797_2.png) [@devdeca](https://forum.rasa.com/u/devdeca)\
**Post date:** [January 27, 2020, 6:13pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030/1 "2020-01-27T18:13:36Z")

</div>

Sometimes the NLU identifies correctly what intent I want but Core gives utter\_default. I already provided a lot of data to core, how can I improve it even more?

---

<div class="post-metadata">

**Author:** ![tyd](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tyd/32/3030_2.png) [@tyd](https://forum.rasa.com/u/tyd)\
**Post date:** [January 28, 2020, 9:49am UTC](https://forum.rasa.com/t/raise-core-confidence/24030/2 "2020-01-28T09:49:42Z")

</div>

Hi @devdeca! If NLU incorrectly identifies your intent, how do you expect Core to take the correct action?

---

<div class="post-metadata">

**Author:** ![devdeca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/devdeca/32/5797_2.png) [@devdeca](https://forum.rasa.com/u/devdeca)\
**Post date:** [January 28, 2020, 6:24pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030/3 "2020-01-28T18:24:49Z")

</div>

Hello, @tyd. ‘incorrectly’ was a typo, I edited it now. Thank you.

---

<div class="post-metadata">

**Author:** ![tyd](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tyd/32/3030_2.png) [@tyd](https://forum.rasa.com/u/tyd)\
**Post date:** [January 29, 2020, 9:12am UTC](https://forum.rasa.com/t/raise-core-confidence/24030/4 "2020-01-29T09:12:42Z")

</div>

@devdeca can you share your stories and config file with me?

---

<div class="post-metadata">

**Author:** ![devdeca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/devdeca/32/5797_2.png) [@devdeca](https://forum.rasa.com/u/devdeca)\
**Post date:** [January 30, 2020, 2:45pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030/5 "2020-01-30T14:45:11Z")

</div>

@tyd I cannot share the stories file but to describe it, for each intent there is a story with a single question and response, then there is lots of stories with multiple intents and responses.

The config file is like that:

```
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: pt
pipeline:
- name: "WhitespaceTokenizer"
- name: "RegexFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "DucklingHTTPExtractor"
  url: "{link to server}"
  dimensions: ["time"]
- name: "CountVectorsFeaturizer"
- name: "CountVectorsFeaturizer"
  analyzer: "char_wb"
  min_ngram: 1
  max_ngram: 4
- name: "EmbeddingIntentClassifier"

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
    max_history: 1
  - name: KerasPolicy
    epochs: 1000
    max_history: 1
  - name: MappingPolicy
  - name: FallbackPolicy
    nlu_threshold: 0.4
    core_threshold: 0.3
    fallback_action_name: 'utter_default'
```

---

<div class="post-metadata">

**Author:** ![tyd](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tyd/32/3030_2.png) [@tyd](https://forum.rasa.com/u/tyd)\
**Post date:** [January 31, 2020, 3:28pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030/7 "2020-01-31T15:28:14Z")

</div>

Why are you using a `max_history` of 1?

---

<div class="post-metadata">

**Author:** ![devdeca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/devdeca/32/5797_2.png) [@devdeca](https://forum.rasa.com/u/devdeca)\
**Post date:** [January 31, 2020, 5:58pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030/8 "2020-01-31T17:58:44Z")

</div>

Because before I did it, the model wouldn’t recognize anything that didn’t look exactly like a existing story from the file. (Related problem can be seen here: [Bot not recognizing intent second time](http://forum.rasa.com/t/bot-not-recognizing-intent-second-time/13405)).

---

<div class="post-metadata">

**Author:** ![tyd](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tyd/32/3030_2.png) [@tyd](https://forum.rasa.com/u/tyd)\
**Post date:** [February 3, 2020, 7:44pm UTC](https://forum.rasa.com/t/raise-core-confidence/24030/9 "2020-02-03T19:44:20Z")

</div>

If you set your `max_history` to 1, Rasa Core can only predict based on the most recent conversation turn. `max_history` controls how much dialogue history the model looks at to decide which action to take next. When it is 1, it only looks at the most immediate dialogue history.

In your case, the FallbackPolicy triggers `utter_default` when either NLU confidence is below 0.4 or Core confidence is below 0.3. You said that the intent is correctly predicted, so my guess is that your Core prediction is under that threshold.
