# How to only keep entities in slot history within a certain number of dialog turns?

**URL:** <https://forum.rasa.com/t/how-to-only-keep-entities-in-slot-history-within-a-certain-number-of-dialog-turns/12396>\
**Category:** Rasa Open Source\
**Created:** [July 2, 2019, 10:41pm UTC](https://forum.rasa.com/t/how-to-only-keep-entities-in-slot-history-within-a-certain-number-of-dialog-turns/12396 "2019-07-02T22:41:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twittmin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/twittmin/32/2091_2.png) [@twittmin](https://forum.rasa.com/u/twittmin)\
**Post date:** [July 2, 2019, 10:41pm UTC](https://forum.rasa.com/t/how-to-only-keep-entities-in-slot-history-within-a-certain-number-of-dialog-turns/12396/1 "2019-07-02T22:41:53Z")

</div>

This is what I mean. Suppose I have the following dialog:

```
User: What's the weather in Tokyo today?
Robot: it's has been rainy [city:tokyo, date:today]
User: what about tomorrow?
Robot: it will still be rainy. [city:tokyo, date:tomorrow]
User: what about next monday? 
Robot: it's going to be sunny. [city:tokyo, date:next monday]

User: Is there a japanese restaurant in the downtown?
Robot: yes [city:tokyo, date:next monday, cuisine:japanese, location:downtown].  

```

In this example, if I set the number of dialog turms=3, then it should forget all slot values that have been accumulated so far. So for the last robot response, the slot values should be: `[cuisine:japanese, location:downtown].`

Anything that is related with weather should have been discarded. Is there a way to destroy entities in slots after a certain number of dialog terns?
