Summary
In this chapter, we found that question-answering isn't as easy as it seems. Implementing a transformer model only takes a few minutes. Getting it to work can take a few hours or several months!
We first asked the default transformer in the Hugging Face pipeline to answer some simple questions. DistilBERT, the default transformer, answered the simple questions quite well. However, we chose easy questions. In real life, users ask all kinds of questions. The transformer can get confused and produce erroneous outputs.
We then had the choice of continuing to ask random questions and get random answers, or we could begin to design the blueprint of a question generator, which is a more productive solution.
We started by using NER to find useful content. We designed a function that could automatically create questions based on NER output. The quality was promising but required more work.
We tried an ELECTRA model that did not produce the results...