Questions with StoryStep in Rasa Open Source

Hi,

I’m trying to read the source codes about the representation of stories, but I got some problems about StoryStep.

The definition of StoryStep in the document is:

A StoryStep is a section of a story block between two checkpoints.

My questions are as follows:

1.What’s the difference between “StoryStep” and each step of “steps” in stories.yml? They are not one-to-one correspondence?

2.What’s the “start_checkpoint” and “end_checkpoint” in storystep and storygraph? There was no “checkpoints:value” in some stories, so I can’t understand the definition of StoryStep.

3.Is “StoryStep” the node in the “StoryGraph”? Does StoryGraph represents a story or all stories in stories.yml?

Does anybody answer my questions?

Thank you very much!!

I will answer my own questions :sweat_smile:

After reading the source codes again, I sorted out the mapping relation among “stories”,“story”,“steps” in stories.yml and “StoryGraph”, “StoryStep” in source codes. The picture is as follows:

Three kinds of sutuations about StoryStep:

  1. When there is no “checkpoint:value” or “or:value” of story configured in stories.yml, each step correspons to each storystep.

  2. When story configuration meets the definition of StoryStep:

A StoryStep is a section of a story block between two checkpoints.

  1. When there is “or:value” of story configured in stories.yml:

NOTE: Checkpoints are not only limited to those manually written in the story file, but are also implicitly created at points where multiple intents are separated in one line by chaining them with "OR"s.

How to generate storygraph of storysteps:

  1. StorySteps will be represented as a DAG by storystep.start_checkpoints and storystep.end_checkpoint.

  2. Transform DAG to deque by using top sort based-DFS.

For example:

I appreciate the information and advice you have shared.