Context & Block naming
1. Context naming
It is recommended to structure your list of contexts using the alphabetical order below.
Default context | FAQ | Small talk | Processes* |
---|---|---|---|
bot_greetings bot_bye bot_functions | faq_insurance faq_loan faq_petpolicy faq_payment | smalltalk_age smalltalk_creator smalltalk_joke smalltalk_insult | booking_new booking_change booking_cancel card_new card_activate card_block appointment_new appointment_cancel |
**For processes, they are contexts which need confirmations.
Context
We recommend naming your context the same way you name your intent. (See Intent & EntitiesNaming)
Context Name | Intent Name |
---|---|
bot_greeting | bot_greeting |
faq_insurance | faq_insurance |
Context & NLU naming syntax
- no spaces
- replace spaces with underscores
- lowercase
Why?
For faster reading and clarity, while connecting a block to an intent using the condition field.
Below I have created a context for my utility bot called saving_tips and have named the corresponding intent the same way.
2. Block naming
We recommend that you name your blocks as part of your workflow.
Be consistent!
Example: Short action description + Number code
- ask_name 1.0, ask_name 2.0
It has its advantages when:
- navigating around your project
- understanding what your blocks do from a high level
- searching blocks on larger projects
- debugging
Updated about 2 years ago