# Wrong policy used to predict next action

**URL:** <https://forum.rasa.com/t/wrong-policy-used-to-predict-next-action/22622>\
**Category:** Rasa Open Source\
**Created:** [December 19, 2019, 5:27am UTC](https://forum.rasa.com/t/wrong-policy-used-to-predict-next-action/22622 "2019-12-19T05:27:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonysinghmss](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tonysinghmss/32/5846_2.png) [@tonysinghmss](https://forum.rasa.com/u/tonysinghmss)\
**Post date:** [December 19, 2019, 5:27am UTC](https://forum.rasa.com/t/wrong-policy-used-to-predict-next-action/22622/1 "2019-12-19T05:27:36Z")

</div>

I am using rasa==1.1.8 and rasa-sdk==1.1.1

Every time the tracker store has close to 150 items, the predictions of bot go haywire and it is unable to recognize the intents properly. Once I clean the tracker store (`events` table) from database, it starts working fine. This happens mainly due to wrong policy getting invoked for predicting the next action.

The details of `config.yml` are as follows:

```
policies:
  - name: MemoizationPolicy
    max_history: 3
  - name: KerasPolicy
    featurizer:
    - name: MaxHistoryTrackerFeaturizer
      max_history: 3
      state_featurizer:
        - name: BinarySingleStateFeaturizer
  - name: MappingPolicy
  - name: FormPolicy
  - name: TwoStageFallbackPolicy
    nlu_threshold: 0.5
    core_threshold: 0.3
    fallback_nlu_action_name: "action_default_fallback"
    fallback_core_action_name: "action_default_ask_affirmation"
    deny_suggestion_intent_name: "out_of_scope"

```

Has anyone ever faced this kind of issue? Am I doing anything wrong here?

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [January 3, 2020, 10:45am UTC](https://forum.rasa.com/t/wrong-policy-used-to-predict-next-action/22622/2 "2020-01-03T10:45:40Z")

</div>

@tonysinghmss Can you update both rasa and rasa-sdk to the latest versions and check if the issue still persists?

---

<div class="post-metadata">

**Author:** ![tonysinghmss](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tonysinghmss/32/5846_2.png) [@tonysinghmss](https://forum.rasa.com/u/tonysinghmss)\
**Post date:** [January 9, 2020, 5:11pm UTC](https://forum.rasa.com/t/wrong-policy-used-to-predict-next-action/22622/3 "2020-01-09T17:11:18Z")

</div>

I am busy with another task. I will try to do it and then get back to you.
