Checkpoints - how they work with graphs

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

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

With rasa interactive the intent is indeed detected.

49%20AM

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.

* 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

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

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

## tell joke
- utter_joke
> telljoke

but in fact the joke never comes out…

image

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

references

FWIW I put the scripts etc. for the bot here

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

image

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

more discussion on the botfront (RASA authoring tool) repo

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

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

1 Like