When an FAQ Bot receives an utterance, it determines the
user’s intent by matching that utterance to one of its stored
question and answer pairs. If it succeeds in determining intent in
this way, it uses the answer as its response. In the example on
the right (from Vajjala et al.’s Practical Natural Language
Processing) the FAQ Bot has determined that the first two
utterances have the same intent and has responded with the
same text in both cases.
If an FAQ Bot fails to determine intent, it usually outputs a
standard message to let the user know that it does not know the
answer. But your FAQ Bot Plus will use linguistic knowledge
from spaCy to get a bit chattier in this case.
This handout brings together all the project requirements for
the final project submission.
PHASE 1: FAQ BOT
In this phase, the goal is to update your Phase 0 FAQ Bot using fuzzy regular expressions to determine a
- From Phase 0 (Should already be complete). Determine your FAQ Bot’s knowledge domain and
prepare a set of 20 question and answer pairs. One easy way to do this is to find a long
Wikipedia page and copy sections of 1 to 3 sentences as each answer and generate a question
to go with each answer. Make sure you reference all online sources in comments.
- Generalize by generating at least one more possible question for each answer. Ideally, the new
question should have a different wording, representing another way a user might ask for the
information in the answer.
- Create a fuzzy regular expression for each answer that is capable of matching key parts of both
possible questions and is tolerant to a limited number of typos in each question.
- Store questions, answers, and regular expressions in text files.
- Create a Python program (or modify your Phase 0 FAQ Bot) to load the answers and regular
expressions from files, then allow the user to make utterances. Try to find the best match for
the user’s utterance from your list of regular expressions and output the corresponding answer