Best approach to handle context

Hi! I would like to know what would be the best approach to manage some situations when context matters. I’m working on a bot about sexually transmitted diseases. How can I handle the following scenarios?

Scenario 1:

User: What is HIV?
Bot: HIV is human immunodeficiency virus
User: And how it spreads?
Bot: HIV spreads by ...

In this example, to answer “And how it spreads?” I need to know about which sexually transmitted disease is the user talking about (since there are multiple). How can get track of it? Using entities for each disease and filling a “topic_slot”?

Scenario 2:

User: What is HIV?
Bot: HIV is human immunodeficiency virus 
User: and AIDS?
Bot: Acquired immunodeficiency syndrome?

In this case, when the user says “and AIDS?” he is asking indirectly “What is AIDS?” . ¿How can I handle this scenario?

Any suggestion is welcome! Thanks!

You should start by trying slots. There’s a discussion of context and slots here. You could create a categorical slot, std, with a list of std’s that your bot supports.

Thanks for your suggestion @stephens! Your solution should work for the first case. Doy you have any ideas for the second scenario?

You could take different approaches for the 2nd example. First question is how your intents are setup. Let’s say you have define, treatment and a generic inform intent. Under which intent would and AIDS fit? You could choose define or inform. Let’s say you choose inform, then you could respond with an action_inform and that action can look back at the previous intent and respond with the definition for AIDS but this may not generalize well so you might better respond to an inform intent with something like What would you like to know about {std}? I can give you the definition, treatment, ....

Thank you so much for your suggestions @stephens! I’m currently trying your approach and it looks promising.