Build a Trivia Bot using T5 Transformer. In this blog, we will look into open and closed book question answering that addresses the problem of Question Answering across a large context.
Question Answering is a very common task in NLP. SQuAD data set is a popular data set for question answering problem. Typically for question answering, the model is presented with a question and a context, with the goal of finding the answer (if it exists) from this context. For SQuAD the context is typically 1–2 paragraphs of text from Wikipedia. For many practical applications,this approach of** providing a concise context can be very limiting.** As an example, if you have a library of documents and want a particular question answered. The context here can be thousands of documents. In this blog, we will look into open and closed book question answering that addresses the problem of Question Answering across a large context.
We will then train a T5 model that can answer questions without any context. This model has stored knowledge in its parameters and can answer Wikipedia type questions from memory! Our Trivia Bot!
Trivia bot model is also available on HuggingFace Transformers model hub here. The link provides a convenient way to test the model on input texts as well as a JSON endpoint. See model in action below:
Trivia Bot trained in this blog in action at Link
The complete code to train and run inference on Trivia Bot is also on my Github here.
I run a machine learning consulting, Deep Learning Analytics. At Deep Learning Analytics, we are very passionate about using data science and machine learning to solve real world problems. Please reach out to us if you are looking for NLP expertise for your business projects.
Enroll now at CETPA, the best Institute in India for Artificial Intelligence Online Training Course and Certification for students & working professionals & avail 50% instant discount.
What is Artificial Intelligence (AI)? AI is the ability of a machine to think like human, learn and perform tasks like a human. Know the future of AI, Examples of AI and who provides the course of Artificial Intelligence?
Artificial Intelligence (AI) will and is currently taking over an important role in our lives — not necessarily through intelligent robots.
You got intrigued by the machine learning world and wanted to get started as soon as possible, read all the articles, watched all the videos, but still isn’t sure about where to start, welcome to the club.
Artificial Intelligence vs. Machine Learning vs. Deep Learning. We are going to discuss we difference between Artificial Intelligence, Machine Learning, and Deep Learning