This chapter demonstrated how to build a natural language interface for two different domains: breeding rules of the Pokémon game, and course advising for college students.
We developed a pipeline with three components: first, we determined what the user's question was about, known as its "intent," using the Rasa library. Then we computed the answer to the question by referring to domain-specific logic implemented in Prolog. Finally, we generated a natural language response using the data found by the logic backend.
As far as the user is concerned, they provided an English-language question and got an English-language response. It would be straightforward to handle voice input and speech output by using Google's Speech-to-Text and Text-to-Speech APIs. These two services would be added to the beginning and end of the pipeline, respectively, without requiring any changes to the existing three-stage pipeline. Finally, we also addressed a few issues related to evaluation to ensure the...