# Help needed with Max\_history

**URL:** <https://forum.rasa.com/t/help-needed-with-max-history/20958>\
**Category:** Rasa Open Source\
**Created:** [November 6, 2019, 8:26am UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958 "2019-11-06T08:26:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anne](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@anne](https://forum.rasa.com/u/anne)\
**Post date:** [November 6, 2019, 8:26am UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958/1 "2019-11-06T08:26:24Z")

</div>

Hello,

We are working with Rasa 1.3.7 and using supervised learning. I have attached our configuration details below.

I have one basic doubt.

For the story path i have below, what could be the max\_history (3 or 5)

---------STORY PATH---------------

- question1 OR question2
  - action\_answer
  - utter\_anythingelse

- anythingelse{“anythingelse\_value”: “yes”} OR affirm
  - slot{“anythingelse\_value”: “yes”}
  - utter\_help

--------Domain’s Template----------- utter\_help:

- text: “How can I help you ?”

utter\_anythingelse:

```
- text: "Is there anything else I can help you with?"
  buttons:
    - title: "Yes"
      payload: '/anythingelse{"anythingelse_value":"yes"}'
    - title: "No"
      payload: '/anythingelse{"anythingelse_value":"no"}'

```

---------CONFIGURATION------------

pipeline:

- name: “WhitespaceTokenizer”
- name: “RegexFeaturizer”
- name: “CRFEntityExtractor”
- name: “EntitySynonymMapper”
- name: “CountVectorsFeaturizer”
- name: “EmbeddingIntentClassifier”

policies:

- name: KerasPolicy epochs: 100 max\_history: 3 priority: 1 batch\_size: 100 validation\_split: 0.2

- name: MappingPolicy priority: 2

- name: MemoizationPolicy max\_history: 3 priority: 3

- name: TwoStageFallbackPolicy

---

<div class="post-metadata">

**Author:** ![sameera](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sameera/32/6488_2.png) [@sameera](https://forum.rasa.com/u/sameera)\
**Post date:** [November 6, 2019, 12:06pm UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958/2 "2019-11-06T12:06:55Z")

</div>

Max\_history is used to define how much of your past conversation needs attention. If your conversation is longer and the bot needs to remember details from different parts of the conversation, set this parameter to a higher value.

In your case, “max\_history : 3” will work fine as the bot only needs to know “anythingelse\_value” from previous step. You can use 3 or 5 for this case.

For more information…check this link : [Memoization Policy with max history](http://forum.rasa.com/t/memoization-policy-with-max-history/2021)

---

<div class="post-metadata">

**Author:** ![anne](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@anne](https://forum.rasa.com/u/anne)\
**Post date:** [November 6, 2019, 7:06pm UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958/3 "2019-11-06T19:06:14Z")

</div>

Thanks sameera.

We do see difference in behavior with training the model with max\_history as 3 and to that of 5. So, wanted to know which is the right value to set in this ideal case.

---

<div class="post-metadata">

**Author:** ![sameera](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sameera/32/6488_2.png) [@sameera](https://forum.rasa.com/u/sameera)\
**Post date:** [November 7, 2019, 3:44am UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958/4 "2019-11-07T03:44:49Z")

</div>

Okay but which value is working better, giving the results you want the bot to give?

---

<div class="post-metadata">

**Author:** ![anne](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@anne](https://forum.rasa.com/u/anne)\
**Post date:** [November 7, 2019, 8:25am UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958/5 "2019-11-07T08:25:44Z")

</div>

🙂 We get one issue while setting it as 3 and another issue on setting to 5. So, wanted to know which is the ideal number for the existing story path.

---

<div class="post-metadata">

**Author:** ![sameera](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sameera/32/6488_2.png) [@sameera](https://forum.rasa.com/u/sameera)\
**Post date:** [November 12, 2019, 12:42pm UTC](https://forum.rasa.com/t/help-needed-with-max-history/20958/6 "2019-11-12T12:42:54Z")

</div>

Can you post what issues you are facing with the two values, I might be able to help. Even i am working with Rasa for a project of mine.
