Information retrieval / slot filling / NLP
This is usually handled as a two step process:


intent detection
slot filling


Intent detection is basically just a kind of classification. So if your program has multiple kinds of questions it can be asked you build a list of examples for each and train a classifier. 

Slot filling is typically modelled as a sequence labelling problem, so you can look into seq2seq.

You can find more detailed information in any tutorial on how to make a chatbot.