Hierarchial dialog with repeatable parts?

First question : Is there some formatting markup for displaying code ??

Here is an example dialog for which most of the responses are like a QA, but it is also very hierarchical and have many repetitions.

How do you handle that ?

Intent => utterance loop, is like assembler-for-Dialogs ;), do you have higher level DSL ?

It seems to me I will need alot of boilerplate repetitions !?

Also some guidance on how to generalize it so that it handles Generic simple code examples ?? The final generalization is to be like a tutorial with examples ?

Stages : QA => QA + banter +=> specific code tasks +=> generic code tasks +=> Tutorial

--counting numbers

    * gimme simple example | basic code example
      - for i in range(1,6) : print i
      * what does this code do
          - count to 5 and print it on the screen
            * doesnt this count to 6
              - no, range function upper bound is excluded
            * what does the range means 
              - it generates numbers in the specified range
              * why it says 6 instead of 5 | why not 5 !  
      * does this count to 5
        - yes, it does
      * does/n't this count to 6
        - no, range function upper bound is excluded
            .... the same as above ...
      * what does the range means 
        - it generates numbers in the specified range  
      * is this a loop ?
        - yes
      * what does for do | what is the use of for keyword
        - it loops trough the numbers generated by 'range()'
      * what is i
        - 'i' is a variable that stores the current number as it cycles trough the loop 
      * can you explain | how does it works
        - range generates the numbers from 1 to 5, the for loops over them and the print statement prints them on the screen

Hi @sten.

You can enter code with three ``` before and after the code, or inline with a single ` sign.

One way of doing this is to write / collect lots of stories for these situations. Also, have a look at Forms (Forms), Knowledge Bases (Integrating Rasa with knowledge bases) and Custom Actions (Actions), as well as the new experimental Response Selector (Integrate response retrieval models in assistants built with Rasa).

Make sure to featurize your intents and slots in a good way (e.g. use the new EmbeddingPolicy (TED), which should be default by now, see Policies), so Rasa Core can learn to generalize well from fewer examples.

1 Like