# Checkpoints - how they work with graphs

**URL:** <https://forum.rasa.com/t/checkpoints-how-they-work-with-graphs/25835>\
**Category:** Rasa Open Source\
**Created:** [March 9, 2020, 11:56am UTC](https://forum.rasa.com/t/checkpoints-how-they-work-with-graphs/25835 "2020-03-09T11:56:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcsan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dcsan/32/1048_2.png) [@dcsan](https://forum.rasa.com/u/dcsan)\
**Post date:** [March 9, 2020, 11:56am UTC](https://forum.rasa.com/t/checkpoints-how-they-work-with-graphs/25835/1 "2020-03-09T11:56:36Z")

</div>

Is anyone having luck with checkpoints? They seem fairly counterintuitive to me, so maybe I’m misunderstanding how they work. I created the simplest possible example of a bot that would have a ‘greeting’ and then a separate story as a checkpoint to ‘tell a joke’, the idea being that little chunk could be used elsewhere in the bot later. But the flow seems to not use the checkpointed part.

Here’s one version, and the output from `rasa visualize` next to it.

![13%20AM](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/477d64f07c3df5e0cc2545e219ee7d52d2387397.png)

so the user intent `tell me a joke` is recognized, but the bot will skip over the `> telljoke` part and jumps right to the end.

![19%20AM](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/d580b1c5dcc63116180e8af3d32ecbb8b3677bc5.png)

With `rasa interactive` the intent is indeed detected.

![49%20AM](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/c/c28843630ff7f575b9fd26fb4acf3ba1e1bf417e.png)

I tried more complex examples and without fail it doesn’t behave as I would expect, so I’d like to see if other people are having any more luck.

My guess is that the `> checkpoint` syntax is just something used by a pre-processor to duplicate a bunch of stories for the training session, basically creating many stories to predict with.

Another problem is that the symbol to define/label a checkpoint comes at the **end** of that section. That means you can’t link to another story at the end of one part. For example.

```auto
* greet
- utter_greet
> goto_menu

```

this would create the labelled section, not link to it. I did try another version putting the `> use checkpoint` in the middle of a section, not the end. But still unpredictable results.

![16%20AM](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/879f19ea4ced5095b3b85b13d78e5b11aebecf52.png)

another try putting the `> use checkpoint` at the start of the story path, will give a visualize like it might do something useful

```auto
## asked joke
> telljoke
* greet
- utter_greet
- utter_goodbye

## tell joke
- utter_joke
> telljoke

```

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/2/2c390db26089927b83b7293c480fd6ae36fa82f8.png)

but in fact the joke never comes out…

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/3/32108bd82dfcd332e8c58a46b1972d814a53824c.png)

So overall this feature seems really confusing and/or buggy. maybe that’s why the advice is not to use it?

references

- [Checkpoints in story](http://forum.rasa.com/t/checkpoints-in-story/337)
- [Stories](https://rasa.com/docs/rasa/core/stories/#checkpoints)
- [Designing Rasa training stories. Training data is an essential part of… | by Justina Petraityte | Rasa Blog | Medium](https://medium.com/rasa-blog/designing-rasa-training-stories-6cdcc22ad2db)

---

<div class="post-metadata">

**Author:** ![dcsan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dcsan/32/1048_2.png) [@dcsan](https://forum.rasa.com/u/dcsan)\
**Post date:** [March 9, 2020, 12:02pm UTC](https://forum.rasa.com/t/checkpoints-how-they-work-with-graphs/25835/2 "2020-03-09T12:02:26Z")

</div>

FWIW I put the scripts etc. for the bot here

> **[rasa-test/bots/barbot at master · dcsan/rasa-test](https://github.com/dcsan/rasa-test/tree/master/bots/barbot)**
>
> master/bots/barbot

---

<div class="post-metadata">

**Author:** ![dcsan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dcsan/32/1048_2.png) [@dcsan](https://forum.rasa.com/u/dcsan)\
**Post date:** [March 9, 2020, 11:01pm UTC](https://forum.rasa.com/t/checkpoints-how-they-work-with-graphs/25835/3 "2020-03-09T23:01:25Z")

</div>

Looking into this a bit more it seems the rules are

- you can only include the **full** story ie the checkpoint target is defined at the end of that story.
- this means you cannot include a story at the END of another. it has to come at the start.
- also you cannot insert a checkpoint in the middle of another story (second example below will not work)

also even after checkpointing, you cannot make a story that doesn’t include an intent to match even if the checkpointed sub-story theoretically allows content without an intent.

[![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/14c9c4c70024b3229d7ce98cec7d2104839a63b1.png)](https://user-images.githubusercontent.com/514002/76262242-05d87e00-6219-11ea-9e21-71a3f05ab581.png)

[![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/02d972e673600ecc0c55798c189e236cf575b56f.png)](https://user-images.githubusercontent.com/514002/76262260-14bf3080-6219-11ea-9a0e-7ecb4d8a937d.png)

so the second story in this flow would NOT actually get the checkpoint recognized.

more discussion on the botfront (RASA authoring tool) repo

> <https://github.com/botfront/botfront/issues/500>
>
> This isn't so much of a technical bug, as an issue with how RASA stories work an…d how to debug with botfront.
> 
> I have a story which uses the "link" feature but it doesn't seem to "navigate" to the new story.
> 
> !\[Screen Shot 2020-02-29 at 3 04 02 PM\](https://user-images.githubusercontent.com/514002/75616377-f4022700-5b04-11ea-8273-246cb9671b70.png)
> 
> and the related \`setup\` story:
> 
> !\[Screen Shot 2020-02-29 at 3 08 23 PM\](https://user-images.githubusercontent.com/514002/75616416-6246e980-5b05-11ea-9c5a-e29ba9082da1.png)

All the above does make checkpoints and links fairly counter-intuitive.

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [March 12, 2020, 10:19am UTC](https://forum.rasa.com/t/checkpoints-how-they-work-with-graphs/25835/4 "2020-03-12T10:19:15Z")

</div>

hi @dcsan - I would generally advise against using checkpoints. If you have some branching logic to implement, it’s best to do that in the form. For everything else just using regular stories is the best way to go
