<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>TangibleAI</title><link href="https://tangibleai.com/" rel="alternate"/><link href="https://tangibleai.com/feeds/all.atom.xml" rel="self"/><id>https://tangibleai.com/</id><updated>2022-09-05T00:00:00-04:00</updated><subtitle>AI Solutions for Social Impact</subtitle><entry><title>How to Use Quizzes in your Chatbots to Educate Your Audience</title><link href="https://tangibleai.com/posts/how-to-use-quizzes-in-your-chatbots-to-educate-your-audience.html" rel="alternate"/><published>2022-09-05T00:00:00-04:00</published><updated>2022-09-05T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2022-09-05:/posts/how-to-use-quizzes-in-your-chatbots-to-educate-your-audience.html</id><summary type="html">&lt;p&gt;Social-sector organizations are turning to chatbots to meet their goals for learning initiatives. It’s challenging, though, to attract users to educational content. Think about how you might feel if you click on a link and get a 50-page document in a new browser tab. Like most users, you might …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Social-sector organizations are turning to chatbots to meet their goals for learning initiatives. It’s challenging, though, to attract users to educational content. Think about how you might feel if you click on a link and get a 50-page document in a new browser tab. Like most users, you might close both tabs and move on. The user hasn’t received the message. Quizzes, though, are a great addition to a chatbot that delivers educational content.&lt;/p&gt;
&lt;p&gt;Quizzes are already proven to get users’ attention. Back in 2016, &lt;a href="https://contentmarketinginstitute.com/wp-content/uploads/2016/06/Ion_CMI_InteractiveContent_Final.pdf"&gt;Content Marketing Institute&lt;/a&gt; noted that 81% of marketers thought people paid more attention to interactive content, like quizzes, than static content. How much more? The &lt;a href="https://www.demandgenreport.com/resources/reports/2019-state-of-interactive-content-marketing/"&gt;2019 State of Interactive Content Marketing report&lt;/a&gt; put that engagement rate at 2x higher. Those numbers aren’t surprising. Quizzes offer a brief, fun experience and even pique users’ curiosity. We usually think of quizzes as a way to show what someone learned, but they can also educate users about topics your organization values. We’ll look at 3 reasons that quizzes in chatbots can be a valuable tool to educate your audience.&lt;/p&gt;
&lt;h3&gt;1. Respond to User Preferences&lt;/h3&gt;
&lt;p&gt;Quizzes help users explore the key information a chatbot provides in the way they prefer. We often may think that users start with content and then move on to quizzes. When given a choice, though, users just as often prefer to engage with a quiz first instead of longer content. They want to see what they do and do not know. Then, they will review the content sections they want to know more about. Users may even end up taking a quiz several times because they want to get a better score or see what the bot says.&lt;/p&gt;
&lt;p&gt;We developed a chatbot named Maya for Plan International Nepal to educate Nepali youth about the risks of human trafficking. Maya has 3 true/false quizzes related to 3 topics – trafficking, online safety, and safe migration for work. We’ve seen that about 26% of users choose an information module before a quiz, and 27% choose a quiz module first. Empowering users to choose how they want to receive information boosts learning.&lt;/p&gt;
&lt;p&gt;By taking into account user preferences, your organization can attract a more diverse audience. That means more visibility for your organization and its ideas.&lt;/p&gt;
&lt;h3&gt;2. Increase Engagement&lt;/h3&gt;
&lt;p&gt;Users stick with quizzes longer than less interactive types of content. Chatbots can serve various types of content like video and images. This content, though, often doesn’t take advantage of the interactivity chatbots can bring. Users don’t have to stay in a chatbot longer than they want to. Even if they access a document or resource, users may leave before even reading it.&lt;/p&gt;
&lt;p&gt;Quizzes give users a reason to stay – to see their score. They know the experience will be pretty short. The brevity, interactivity, and purposefulness of quizzes encourage users to stay longer. In Maya, most users finish an entire quiz once they start. Quizzes in Maya generally see a 25% drop-off, meaning that 75% of users finish the quiz. That engagement is much harder to achieve in sections that only deliver information.&lt;/p&gt;
&lt;p&gt;Users engage with quizzes, and that interest can benefit your organization. They may want to know more about a topic or about your organization. A well-placed CTA after the quiz could take them to a newsletter subscription or a donation page. In short, users may explore more of what your organization has to offer.&lt;/p&gt;
&lt;h3&gt;3. Learn What People Are Learning&lt;/h3&gt;
&lt;p&gt;The quiz responses you get can show what your audience is learning through the chatbot. A user accessing content does not mean they learned the information well. Quizzes can help you see which topics, or even specific parts of topics, people are less familiar with. True/False quizzes provide an easy means of getting averages. Short answer responses can show users’ thoughts, such as what lesson they valued most. Your organization can use quiz responses to improve the chatbot and its content. But, keep in mind that users explore quizzes by intentionally giving wrong answers. The data quizzes provide can be useful, but it needs to be analyzed with care.&lt;/p&gt;
&lt;p&gt;Quizzes aren’t just for schools, they can be a valuable tool in your chatbot. A well-designed quiz can give users key information in an engaging way. They can give your organization insights into what your audience is learning. Quizzes work well with other content that your chatbot might serve. We’ve put together some tips for making effective quizzes to educate your audience.&lt;/p&gt;
&lt;h5&gt;10 Tips for Making Quality Chatbot Quizzes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Limit quizzes to 5-10 questions&lt;/li&gt;
&lt;li&gt;Make the answer choices clear&lt;/li&gt;
&lt;li&gt;Give feedback after each question instead of at the end&lt;/li&gt;
&lt;li&gt;Question + Answer + Feedback should fit in the chatbot window&lt;/li&gt;
&lt;li&gt;Set expectations with directions and explanations before the quiz&lt;/li&gt;
&lt;li&gt;Pick questions that target the most important information users should know&lt;/li&gt;
&lt;li&gt;Tie quiz items to your organization’s objectives&lt;/li&gt;
&lt;li&gt;Add prompts from the quiz to other content (or vice versa)&lt;/li&gt;
&lt;li&gt;Give users the option to share their results&lt;/li&gt;
&lt;li&gt;Consider having CTAs like email subscriptions or signups after the quiz&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We can help you leverage chatbots to educate your audience about important issues. We make chatbots that not only use quizzes but also other engaging content to spread your message.&lt;/p&gt;
&lt;p&gt;Ready to create your own chatbots?&lt;/p&gt;
&lt;p&gt;&lt;a href="/contact-us/"&gt;Let's talk&lt;/a&gt;&lt;/p&gt;</content><category term="Chatbots"/><category term="Chatbots"/><category term="Nonprofits"/></entry><entry><title>Improve your chatbot by analyzing user messages in 5 steps (Part 2)</title><link href="https://tangibleai.com/posts/improve-your-chatbot-by-analyzing-user-messages-in-5-steps-part-2.html" rel="alternate"/><published>2022-07-21T00:00:00-04:00</published><updated>2022-07-21T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2022-07-21:/posts/improve-your-chatbot-by-analyzing-user-messages-in-5-steps-part-2.html</id><summary type="html">&lt;p&gt;This is Part 2 in the post series about improving your chatbot by analyzing user messages. (You can read Part 1 &lt;a href="/improve-your-cha…t-with-nlu-part1/"&gt;here&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Social impact organizations need to pay attention to what users say when communicating with their chatbot. Users often communicate with natural language responses, also known as “free-text” or …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This is Part 2 in the post series about improving your chatbot by analyzing user messages. (You can read Part 1 &lt;a href="/improve-your-cha…t-with-nlu-part1/"&gt;here&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Social impact organizations need to pay attention to what users say when communicating with their chatbot. Users often communicate with natural language responses, also known as “free-text” or “open” responses. Organizations may actually elicit open responses to get feedback or for filling out forms. Additionally, users may try to chat with a bot using natural language responses, whether the bot prompts such messages or not. All of these responses provide nonprofits and other organizations an opportunity to gain insight into the most critical aspects of their chatbot.&lt;/p&gt;
&lt;p&gt;In part 1 of this post series, we described a process to systematically collect and organize free-text user responses. Once that’s done, though, you need to know what to look for to get the most value from them. We’ll look at 5 key areas to focus on when analyzing natural language responses for insights to improve your chatbot.&lt;/p&gt;
&lt;h2&gt;Questions / Queries&lt;/h2&gt;
&lt;p&gt;Even with menu-driven chatbots, people will still have questions that aren’t addressed or aren’t easy to find. Questions provide insights into what users care about and want to know. In educational bots we have worked on for nonprofit organizations, we noticed users looked for information about very relevant topics that were not initially considered for the project. We’ve used these insights to add new features and develop an FAQ section for the bots.&lt;/p&gt;
&lt;p&gt;In Maya, a chatbot we developed that educates Nepali youth about the risks of human trafficking, the initial scope of the project focused on basic information about what trafficking was and how to stay safe. Users asked many additional questions, such as statistics on trafficking and how domestic violence is related to trafficking. Adding these insights not only helped engagement with the bot but also improved the depth of learning Maya could assist with.&lt;/p&gt;
&lt;h2&gt;Navigation&lt;/h2&gt;
&lt;p&gt;Navigation is critical to a chatbot’s success. Analyzing messages shows where users might be trying to switch conversation paths or return to certain menus. Users give up pretty quickly when they can’t find what they are looking for. Navigation issues need to be fixed, but it can be hard to understand why users aren’t reaching certain content.&lt;/p&gt;
&lt;p&gt;Even simple menu-based bots are not immune to navigation errors. In one bot we worked on, we noticed that users typing “C” (with quotation marks) to select option C caused a fallback response, because the system was trained to recognize option C without quotes. It would have been difficult to spot this problem without analyzing natural language responses.&lt;/p&gt;
&lt;h2&gt;Small Talk&lt;/h2&gt;
&lt;p&gt;A chatbot needs to be able to respond to small talk messages. These messages may not target relevant information, but providing a good response improves the user’s conversational experience and increases the chance of the user sticking around. Users bring their experience talking to people to their interactions with chatbots. So they expect human-like reactions, such as greetings, introductions, and closings. When working on bots at Tangible AI, we have a list of common intents that chatbots should be able to respond to, such as “who are you”, “continue”, and “thank you”.&lt;/p&gt;
&lt;p&gt;Aside from basic small talk, we have also noticed that users across our bots are concerned about their privacy. They ask “Is my conversation private” or “Can I talk with you privately”. Having a poor response to such an important question will certainly make a user uncomfortable. You need to help users understand the context of their conversation with a chatbot.&lt;/p&gt;
&lt;h2&gt;Feedback&lt;/h2&gt;
&lt;p&gt;Users might also provide feedback on their experience with the chatbot. The feedback might come from a survey within the chatbot itself. It’s also possible a user would just give some feedback response to your chatbot unexpectedly.&lt;/p&gt;
&lt;p&gt;These messages could be positive or negative. With Maya, users left encouraging messages that certain parts of the bot were great, particularly that they learned a lot. They also left messages critiquing the activities the bot provided, or expressing their confusion. Both complimentary and negative feedback provided us with a better understanding of how the experience was working. We learned how to improve our activities based on the feedback. Also, we learned why other components of the bot worked well, which let us improve our development going forward.&lt;/p&gt;
&lt;h2&gt;Out of Scope/Spam&lt;/h2&gt;
&lt;p&gt;Some messages users send will not be relevant to the purpose of your chatbot. Sometimes, users may not understand what the chatbot’s for. They may ask for information or functions that aren’t available, like providing local daily news. Of course, users may just want to test out the chatbot or play around with it. It’s unfortunately common that chatbots face harassment. In most cases, there is not much one can do to reduce spam messages, especially for a bot that targets a broader audience.&lt;/p&gt;
&lt;p&gt;In order to get the most out of their chatbots, nonprofits need to work with natural language responses that their chatbot doesn’t recognize. While it can be tempting to focus on the successful exchanges a chatbot has, messages that a chatbot doesn’t know how to handle can offer insights into what’s not working. More importantly, free responses are direct communication from users, and the messages provide a rich source of information that can help you plan how to make your bot more effective for your audience. Implementing a process to deal with natural language is important for the same reason that the bot exists. With a clear process, these messages can provide insights into some of the most critical aspects of a chatbot that tell how well it is accomplishing its purpose.&lt;/p&gt;</content><category term="Chatbots"/><category term="Chatbots"/><category term="Natural Language Processing"/><category term="Nonprofits"/></entry><entry><title>Improve your chatbot by analyzing user messages in 5 steps (Part 1)</title><link href="https://tangibleai.com/posts/improve-your-chatbot-with-nlu-part1.html" rel="alternate"/><published>2022-06-02T00:00:00-04:00</published><updated>2022-06-02T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2022-06-02:/posts/improve-your-chatbot-with-nlu-part1.html</id><summary type="html">&lt;p&gt;Interest in and use of chatbots continue to grow among nonprofit organizations as they allow for providing services to and educating constituents at scale in an interactive, engaging way. But once you launch your chatbot and let it interact with users, you will notice that one of its most frequent …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Interest in and use of chatbots continue to grow among nonprofit organizations as they allow for providing services to and educating constituents at scale in an interactive, engaging way. But once you launch your chatbot and let it interact with users, you will notice that one of its most frequent answers to users is “I’m sorry, I don’t understand”.&lt;/p&gt;
&lt;p&gt;This issue doesn't just affect complex bots, or even ones that have Natural Language Understanding (NLU) capabilities. Most social impact organizations use menu-based bots where users select buttons or enter numbers to navigate the chatbot content. Despite the limited spectrum of allowed interactions, users will often try to address the bot with free-text responses that use language the bot was not programmed to handle. These responses, which can comprise as much as 30% of the total interactions with the bot, will trigger a catch-all response (also called a “fallback” or “default” response). Repeatedly getting this response is a frustrating experience for the users, leading them to disengage before they are able to have any meaningful interaction with the chatbot.&lt;/p&gt;
&lt;p&gt;Whether you’ve deployed a chatbot or are planning to adopt one, it’s important to develop a strategy for dealing with natural language responses that trigger the catchall in your chatbot. If you collect and analyze them systematically, you can discover quite a lot about your users and their interactions with your bot.&lt;/p&gt;
&lt;p&gt;For this post, we’ll focus on a reliable process you can use to work with natural language responses. In a follow-up post, we’ll consider what insights you can get from the data.&lt;/p&gt;
&lt;h2&gt;How to handle the free-text chatbot responses: A step-by-step guide&lt;/h2&gt;
&lt;p&gt;You need a clear process to keep your users' messages organized. Our clients saw significant jumps in free responses both after launch and after advertising campaigns. A clear process helps you deal with this volume while keeping you focused on the insights you can gain. At Tangible AI, we use a 5-step process to work through these messages.&lt;/p&gt;
&lt;h3&gt;Step 1 - Extract&lt;/h3&gt;
&lt;p&gt;Gather the messages that triggered a catchall response. Natural language responses, basically the responses your users type to your chatbot, can remain hidden if your platform or your organization doesn’t have a way of collecting them. Systems have different capabilities and methods for handling these responses, so it’s important to read your platform’s documentation. Beyond just getting the data, it’s useful to find ways to automate this extraction process to save time and make it easier to repeat.&lt;/p&gt;
&lt;h3&gt;Step 2 - Cluster&lt;/h3&gt;
&lt;p&gt;Try to identify groups or clusters of similar queries. Look for common patterns in the messages, similar requests, and synonyms to understand how your users phrase their requests.&lt;/p&gt;
&lt;h3&gt;Step 3 - Develop Intent Model&lt;/h3&gt;
&lt;p&gt;Understand what users are trying to do. “Intents” refers to the goal the customer has in mind when typing in a question or a request. The user indicates through intents what they want the chatbot to do, or what information they would like to receive. Your users, whether they are the people your organization serves or your donors and supporters, may make similar requests with different vocabulary, so the synonyms or various sentences you clustered before will help identify these intents. Some messages may relate to existing intents. Or you might get ideas for new intents. During this stage, you need to consider what intents are the most valuable for your users and for your organization’s goals.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Sample intent model for a chatbot. " src="/images/intent_model-e1654198039983.png" title="Sample intent model for a chatbot."&gt;&lt;br&gt;
&lt;em&gt;Sample intent model.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Step 4 - Label&lt;/h3&gt;
&lt;p&gt;With the messages clustered and the intents identified, you need to classify the messages. This step involves assigning labels to intents. You should have a clear naming scheme. The consistency in labels will help you keep your bot organized.&lt;/p&gt;
&lt;h3&gt;Step 5 - Analyze&lt;/h3&gt;
&lt;p&gt;With the messages organized and labeled, you can analyze the data to find insights into how to use the bot. We will talk extensively about the analysis in our next post. Some of the sample analysis you can carry out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What are the most common questions the users ask?&lt;/li&gt;
&lt;li&gt;How are the questions distributed between topics?&lt;/li&gt;
&lt;li&gt;What percentage of users’ messages are spam? How many of the messages relate to navigation?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This 5-step process will help you work systematically with natural language responses. This kind of response may have triggered the catchall, or you may have designed your bot with open questions to elicit user feedback. Regardless, this process organizes these responses so that you can analyze them to get insights into what parts of the chatbot are working and what you could improve. In the next post, we will look at 5 specific insights you can focus your analysis on to find areas for improving your chatbot.&lt;/p&gt;</content><category term="Chatbots"/><category term="Chatbots"/><category term="Natural Language Processing"/><category term="Nonprofits"/></entry><entry><title>Choosing a Channel for Your Nonprofit Chatbot</title><link href="https://tangibleai.com/posts/choosing-a-channel-for-your-nonprofit-chatbot.html" rel="alternate"/><published>2021-11-26T00:00:00-05:00</published><updated>2021-11-26T00:00:00-05:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2021-11-26:/posts/choosing-a-channel-for-your-nonprofit-chatbot.html</id><summary type="html">&lt;p&gt;Nonprofit chatbots are moving into the mainstream as organizations are looking for ways to stay connected to constituents and donors, recruiting more people for the cause, and looking for better ways to live out their unique missions in the world. As your nonprofit considers launching your own chatbot, one of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Nonprofit chatbots are moving into the mainstream as organizations are looking for ways to stay connected to constituents and donors, recruiting more people for the cause, and looking for better ways to live out their unique missions in the world. As your nonprofit considers launching your own chatbot, one of the first decisions is what channel you should use. After being asked this question several times by our clients, we decided to share what we have learned in this post.&lt;/p&gt;
&lt;h4&gt;Key Questions When Decided on a Channel for Your Nonprofit Chatbot&lt;/h4&gt;
&lt;p&gt;Finding the right channel can mean the difference before the success or failure of your chatbot. As a first step,ourclient find that it is helpful to answer the following questions. The answers to these questions can help guide to an optimal choice of your channel.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What are the most popular platforms in the countries where your target audience resides?&lt;/strong&gt;&lt;br&gt;
Fortunately, a quick web search will show you lists and maps of popular messaging apps listed by country. For example, Whatsapp is prevalend in most African and East Asian countries, while being much less popular in the US. You are likely to find a higher rate of adoption using a platform that already has a high use rate in the countries you are targeting.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do you plan on engaging in repeated interactions with the chatbot?&lt;/strong&gt;&lt;br&gt;
As you look at features, it will be essential to consider whether you are expecting onetime communications via the nonprofit chatbot or whether it will be more for ongoing relationships.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Will your users be comfortable with the chatbot knowing personal details like name or email?&lt;/strong&gt;&lt;br&gt;
This is a critical question for some nonprofits. Consider an example: an international nonprofit launched a Facebook hatbot in an Asian country with semi-authoritarian regime to give people an opportunity to report corruption. However, they were not able to attract many users, as people weren't eager to share report corruption from their Facebook accounts, for fear of being identified.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do you plan to engage users proactively?&lt;/strong&gt;&lt;br&gt;
Once people are on board with your nonprofit chatbot, will you want the ability to send updates or reminders over the same platform? As you’ll see, many messaging platforms put limits on proactive outreach to prevent spam.&lt;/p&gt;
&lt;h4&gt;How will users find the bot?&lt;/h4&gt;
&lt;p&gt;As you look at some of the channel options, you will see that for many of them, you will need a plan to grow your chatbot’s audience. This will either happen organically, because your users are accustomed on interact with you on that channel;or you’ll need to create a campaign to attract your users.&lt;/p&gt;
&lt;h2&gt;5 Channel Options – Pros and Cons&lt;/h2&gt;
&lt;p&gt;Let’s examine 5 different channels you can use for your chatbot. If you are looking for examples of chatbots for each channel – feel free to head to our &lt;a href="https://tangibleai.com/social-impact-chatbot-database/" title="social impact chatbot database"&gt;social impact chatbot database&lt;/a&gt; and look for chatbots in your area of interest!&lt;/p&gt;
&lt;h4&gt;Chatbot on Your Website / Landing Page&lt;/h4&gt;
&lt;p&gt;The most obvious place for your nonprofit chatbot might be right on your organization's web page or landing page. In many cases, this will offer the most significant amount of exposure and more options.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Accessibility&lt;/em&gt; – The chatbot is accessible to everyone with web access and doesn't require a login or personal information to use.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Exposure&lt;/em&gt; – The feature can benefit from your existing website traffic. If you already have an established website audience, you can leverage is as a source of users for your chatbot.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Interaction with Existing Content&lt;/em&gt; – On your website, your nonprofit chatbot can pull information and content that already exists on your site. It can be served up to users in answer to their inquiries.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Interface Flexibility&lt;/em&gt; – Web-based chatbots often offer more features in the user interface, enabling functionality like polls, checkboxes, and other elements.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Drawbacks:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Computer or Smartphone Required&lt;/em&gt; – Users with older "feature phones" will not be able to access the chatbot.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;No Re-Engagement&lt;/em&gt; – If users don't need to log in or share personal information, there is no way to contact them again once they have clicked away.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bottom Line:&lt;/strong&gt; An existing (and popular) website or landing page can be a good placement for a nonprofit chatbot when the priority is one-time interactions with wide accessibility and/or the ability to remain anonymous. However, limitations around re-engagement may make this less effective for some use cases.&lt;/p&gt;
&lt;h4&gt;SMS – Text Messaging Chatbots&lt;/h4&gt;
&lt;p&gt;SMS may currently be the most available communications platform in the world. This&lt;br&gt;
will undoubtedly help with accessibility, but it comes with some drawbacks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Accessibility&lt;/em&gt; – Perhaps the most accessible platform available even to feature phone users!&lt;/li&gt;
&lt;li&gt;&lt;em&gt;No Internet Connectivity Needed&lt;/em&gt; – Since internet access is unnecessary, even phone users without data plans can access the nonprofit chatbot.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Repeated Engagement&lt;/em&gt; – It is easy to stay and contact with users, and it is not limited by the platform.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Proactive&lt;/em&gt; – You can initiate conversations with any user if you have their phone numbers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Drawbacks:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Costs Increasing with Scale&lt;/em&gt; – when using a programmable SMS provider, such as Twilio, you’re more likely to pay per message. For large audiences, this can quickly get expensive.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Lack of International Flexibility&lt;/em&gt; – International organizations may face the requirement of maintaining several numbers and accounts for the same bot.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;SMS Apathy&lt;/em&gt; – In some countries, the abundant SMS spam made people suspicious of and even annoyed by more text messages. Turn.io has showed that switching from SMS to Whatsapp can increase the engagement by as much as 16x.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bottom Line:&lt;/strong&gt; SMS can be a good choice for a nonprofit chatbot in underdeveloped regions with limited internet connectivity, or targeting an audience with limited smartphone adoption. It can also be a good solution for US-based projects where the audience has direct connection to your organization, like college students.&lt;/p&gt;
&lt;h4&gt;WhatsApp for Nonprofit Chatbots&lt;/h4&gt;
&lt;p&gt;This cross-platform messaging app is hugely popular around the world and offers some unique features. However, it does have some drawbacks that make it less than perfect for some applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Largest User Base&lt;/em&gt; – WhatsApp was the second-most downloaded app in 2020.mFor nonprofits doing work in Africa, it is important to note that it is particularly popular there. There are also a variety of knock-off versions popular on the continent.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;End-To-End Encryption&lt;/em&gt; – For situations where privacy is essential, like when dealing with and health-related communication, this type of security is critical.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Universal Acceptance&lt;/em&gt; – More users are already familiar with WhatsApp and may already have an account.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Drawbacks:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Severely Limited Follow-up Outreach&lt;/em&gt; – Follow-up messages are allowed but need to follow a template that is pre-approved by WhatsApp.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Lack of Interactive Capabilities&lt;/em&gt; – Even after all the time and effort for setup, the feature set is limited. Buttons were introduced into Whatsapp only recently and quick replies, galleries, and other options are still missing.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Higher Pricetag&lt;/em&gt; – whether you’re accessing Whatsapp through services like Twilio that charges per message, or through a platform like Turn.io whose price tiers depend on monthly users, it’s generally a bit more expensive than other&lt;br&gt;
  channels.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;More regulation&lt;/em&gt; – Whatsapp is more rigorous in supervising chatbot operators on the network. For example, it’s enforcing the policy that requires the chatbot to have clear escalation path.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bottom Line:&lt;/strong&gt; Due to its popularity and security, WhatsApp can be an excellent option for engaging large audiences but only for nonprofits with the time and resources to invest in their chatbot project.&lt;/p&gt;
&lt;h4&gt;Facebook Messenger Chatbots&lt;/h4&gt;
&lt;p&gt;Might the most popular social network in the world be the right home for your nonprofit chatbot? Facebook provides options loaded with features, but changing rules can complicate things.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Popularity&lt;/em&gt; – Facebook is the most popular social network in the world. Facebook's Messenger app, with more than 2 billion users, is currently the top downloaded app. In south-east Asia, &lt;a href="https://qz.com/333313/milliions-of-facebook-users-have-no-idea-theyre-using-the-internet/" title="Facebook is synonymous with the internet"&gt;Facebook is synonymous with the internet&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Interactivity&lt;/em&gt; – being the first platform to add chatbot capability, Facebook has continued to develop new features to make the service more interactive. Featuring the most advanced API, Messenger offers the ability to interact with users using quick replies, galleries, and other valuable features.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Connection to the Facebook Advertising mechanisms&lt;/em&gt; – When using Facebook Messenger for your nonprofit chatbot, you can take advantage of the integration with ads and comments. That means your bot can automatically reach out to a new user after clicking on an ad or commenting on a post.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Specialists and tools ecosystem&lt;/em&gt; – Since Facebook was the first to offer chatbot capability, it has developed an extensive network of specialists and tools to help launch and grow your nonprofit chatbot.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Drawbacks:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Changing Rules&lt;/em&gt; – Facebook's policies can change with little to no notice. In the past two years, Facebook has rolled out two significant policy changes, both of which had a drastic impact on chatbot capabilities. Those who depend on the service must stay up to date on the latest policy changes.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Ethical Considerations&lt;/em&gt; – following recent investigations by WSJ, users are abandoning the platform for ethical considerations, especially in developed countries.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bottom Line:&lt;/strong&gt; For nonprofits with an existing Facebook page and strategies, Facebook chatbots can be a great way to connect to existing content and take advantage of Facebook's welldeveloped social sharing infrastructure.&lt;/p&gt;
&lt;h4&gt;Telegram for Nonprofit Chatbots&lt;/h4&gt;
&lt;p&gt;Well known as a secure platform for communication, Telegram shows promise as a platform for a nonprofit chatbot. However, its lack of popularity in most countries may make adoption more difficult.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Interactivity&lt;/em&gt; – Like Facebook, Telegram offers some excellent interactive features like quick replies, buttons, and galleries. It also provides some more advanced features not found anywhere else.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Re-Engagement&lt;/em&gt; –Telegram has no limitations on pro-active re-engagement.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Available in Groups&lt;/em&gt; – With Telegram, your chatbot can be a part of groups and work as a community helper&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Drawbacks:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Lack of Popularity&lt;/em&gt; – Since Telegram doesn't enjoy the same level of adoption as other options, there may be friction in getting users to install and register for an additional app.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Security&lt;/em&gt; – Although known for security, with Telegram, the chatbot conversation with the user is actually not end-to-end encrypted. This may make it less than optimal for healthcare or other uses where privacy is critical.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bottom Line:&lt;/strong&gt; This can be a great option as a nonprofit chatbot for organizations that already have users on the Telegram app, or organizations that are ready to invest in Telegram adoption for the sake of the project. Its lack of limitations on re-engagement can make it an excellent choice when that is a priority.&lt;/p&gt;
&lt;h4&gt;Other Channels&lt;/h4&gt;
&lt;p&gt;This is, of course, not a complete list. Depending on the country or countries where you may be launching your nonprofit chatbot, there may be other effective options. Forexample, Viber is quite popular in many countries, and some countries like Japan and Vietnam have apps that are exclusively dominant in the country. So, in addition to spending time answering your own key questions, it is worth listening to your potential users to ensure that your platform of choice is a good fit.&lt;/p&gt;
&lt;h4&gt;Can I Have a Nonprofit Chatbot on More than One Channel?&lt;/h4&gt;
&lt;p&gt;Yes! Nothing is limiting your nonprofit to one chatbot on one channel. You can have multiple bots on multiple channels and even allow users to switch from one to another. Since the rules Facebook issued limit proactive re-engagement, some nonprofits have been combining Facebook Messenger with SMS. This way, they can re-engage users and, if helpful, send them back to the Facebook Messenger bot.&lt;/p&gt;
&lt;p&gt;Liked this blog post? Want to know more about our chatbot services? &lt;a href="/contact-us/"&gt;Talk to us about your use case!&lt;/a&gt;&lt;/p&gt;</content><category term="Nonprofits"/></entry><entry><title>Training a Python to Explore Holes in Dark Patterns</title><link href="https://tangibleai.com/posts/training-a-python-to-explore-holes-in-dark-patterns.html" rel="alternate"/><published>2021-01-24T00:00:00-05:00</published><updated>2021-01-24T00:00:00-05:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2021-01-24:/posts/training-a-python-to-explore-holes-in-dark-patterns.html</id><summary type="html">&lt;p&gt;Data Science students are always looking for new and interesting datasets to train machine learning models. There's tons of public data out there. Unfortunately, in the US, many of our "public" datasets are difficult to access. The most interesting data is hidden behind dark patterns on corporate and government websites …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Data Science students are always looking for new and interesting datasets to train machine learning models. There's tons of public data out there. Unfortunately, in the US, many of our "public" datasets are difficult to access. The most interesting data is hidden behind dark patterns on corporate and government websites.&lt;/p&gt;
&lt;p&gt;Here you'll see how to use &lt;code&gt;Pandas&lt;/code&gt; to easily pull down a lot of data from prosocial websites like wikipedia. Then you'll learn a little &lt;code&gt;BeautifulSoup&lt;/code&gt; to scrape out that sneaky data that hides behind dark patterns.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;pandas.read_html&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;If you build web pages with tables in them, they become accessible to anybody who knows how to use &lt;em&gt;Pandas&lt;/em&gt;, like this Wikipedia page:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Demographics of the World, wikipedia article with tabular data =1225x386" src="/images/wikipedia-screenshot-demographics-world.png"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;pandas&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;pd&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;base_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://en.wikipedia.org&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;page_title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;demographics of the world&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;page_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;/wiki/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;page_title&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;_&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;tables&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;page_url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tables&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;25&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then you can easily find the interesting tables and calculate some statistics:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; for df in tables:
&lt;span class="k"&gt;...&lt;/span&gt;     if len(df) &amp;gt; 10 and len(df.describe().columns) &amp;gt; 1:
&lt;span class="k"&gt;...&lt;/span&gt;         print(&amp;#39;=&amp;#39;*70)
&lt;span class="k"&gt;...&lt;/span&gt;         print(df.describe(include=&amp;#39;all&amp;#39;))
&lt;span class="k"&gt;...&lt;/span&gt;         print(&amp;#39;=&amp;#39;*70)
&lt;span class="k"&gt;...&lt;/span&gt;         print()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here's one of those tables of descriptive statistics:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;================================================================================================================================================================
                 Year           0        1000        1500        1600        1700        1820        1870        1913        1950        1973        1998
count              17   17.000000   17.000000   17.000000   17.000000   17.000000   17.000000   17.000000   17.000000   17.000000   17.000000   17.000000
unique             17         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN
top     United States         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN
freq                1         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN         NaN
mean              NaN   17.158824   16.752941   16.829412   16.858824   16.788235   17.064706   17.064706   17.064706   16.911765   16.905882   16.758824
std               NaN   28.360008   26.822684   26.260849   26.968131   26.524938   27.237197   25.845767   24.935666   24.582257   24.890397   25.281887
min               NaN    0.200000    0.200000    0.200000    0.100000    0.100000    0.100000    0.500000    0.800000    0.900000    1.000000    0.900000
25%               NaN    1.300000    2.400000    2.300000    1.100000    1.300000    1.400000    3.100000    4.400000    5.400000    5.400000    4.600000
50%               NaN    2.400000    4.200000    4.000000    3.700000    4.500000    5.300000    7.000000    7.000000    7.100000    7.900000    6.900000
75%               NaN   15.900000   15.400000   20.100000   20.000000   21.000000   20.100000   19.900000   17.000000   15.500000   17.300000   16.500000
max               NaN  100.000000  100.000000  100.000000  100.000000  100.000000  100.000000  100.000000  100.000000  100.000000  100.000000  100.000000
================================================================================================================================================================
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Dark Patterns&lt;/h3&gt;
&lt;p&gt;What's a &lt;em&gt;dark pattern&lt;/em&gt;? It's any UX that prevents people from getting things done without manipulation and distraction and &lt;em&gt;lock-in&lt;/em&gt;. For a Data Scientist a dark pattern prevents them from accessing data.&lt;/p&gt;
&lt;p&gt;When the Internet was new, and only teenagers and geeks knew how to use it, public officials could be forgiven for "publishing" data in PDFs or proprietary spreadsheets and databases. But we live in an era where elected officials responsible for securing voter registration data have the skill to deploy dark pattern websites that support their political agenda. And the skill to do this sort of sophisticated technical work is not limited to advanced, stable democracies like the United States. Officials in charge of data in most developing countries are also deploying sophisticated web applications that breach the public trust. Do a &lt;a href="https://duckduckgo.com/?q=Brian+Kemp+suppression"&gt;Duck search&lt;/a&gt; for &lt;a href="https://nymag.com/intelligencer/2019/12/georgia-voter-suppression-under-kemp.html"&gt;"Brian Kemp suppression"&lt;/a&gt; if you want to learn more. He was so adept at managing his IT department, he successfully made voter registration data accessible only to his supporters and campaign managers. And using predictive analytics on this data, he was able to delete the voter registrations for those that would likely vote against him in his campaign for Governor.&lt;/p&gt;
&lt;h1&gt;Illuminating the Dark&lt;/h1&gt;
&lt;p&gt;So I'll show you how easy it is to process data from prosocial public data sources like Wikipedia. And then I'll show you the problem with some dark patterns on the web. Some are intentional and some are not, but we'll help you illuminate the data you want and scrape it.&lt;/p&gt;
&lt;p&gt;There are no options for the &lt;code&gt;pd.read_html&lt;/code&gt; function that do what you want. So when I tried to get a list of business names from the California Department of State website, I get everything except the name when Pandas automatically parses the HTML:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;pandas&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;pd&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;bizname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;poss&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;https://businesssearch.sos.ca.gov/CBS/SearchResults?filing=&amp;amp;SearchType=CORP&amp;amp;SearchCriteria=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bizname&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;&amp;amp;SearchSubType=Begins&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;

    &lt;span class="n"&gt;Entity&lt;/span&gt; &lt;span class="n"&gt;Number&lt;/span&gt; &lt;span class="n"&gt;Registration&lt;/span&gt; &lt;span class="n"&gt;Date&lt;/span&gt;         &lt;span class="n"&gt;Status&lt;/span&gt;                                        &lt;span class="n"&gt;Entity&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="n"&gt;Jurisdiction&lt;/span&gt;      &lt;span class="n"&gt;Agent&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;Service&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;Process&lt;/span&gt;
&lt;span class="mi"&gt;0&lt;/span&gt;      &lt;span class="n"&gt;C2645412&lt;/span&gt;        &lt;span class="mi"&gt;04&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;02&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2004&lt;/span&gt;         &lt;span class="n"&gt;ACTIVE&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;02645412&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;      &lt;span class="n"&gt;GEORGIA&lt;/span&gt;   &lt;span class="n"&gt;ERESIDENTAGENT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;INC&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;C2702827&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt;      &lt;span class="n"&gt;C0786330&lt;/span&gt;        &lt;span class="mi"&gt;09&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1976&lt;/span&gt;      &lt;span class="n"&gt;DISSOLVED&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;00786330&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                        &lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;HALPERN&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;      &lt;span class="n"&gt;C2334141&lt;/span&gt;        &lt;span class="mi"&gt;03&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;01&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2001&lt;/span&gt;  &lt;span class="n"&gt;FTB&lt;/span&gt; &lt;span class="n"&gt;SUSPENDED&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;02334141&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                   &lt;span class="n"&gt;CLAIR&lt;/span&gt; &lt;span class="n"&gt;G&lt;/span&gt; &lt;span class="n"&gt;BURRILL&lt;/span&gt;
&lt;span class="mi"&gt;3&lt;/span&gt;      &lt;span class="n"&gt;C0658630&lt;/span&gt;        &lt;span class="mi"&gt;11&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;08&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1972&lt;/span&gt;  &lt;span class="n"&gt;FTB&lt;/span&gt; &lt;span class="n"&gt;SUSPENDED&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;00658630&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                               &lt;span class="n"&gt;NaN&lt;/span&gt;
&lt;span class="mi"&gt;4&lt;/span&gt;      &lt;span class="n"&gt;C1713121&lt;/span&gt;        &lt;span class="mi"&gt;09&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1992&lt;/span&gt;  &lt;span class="n"&gt;FTB&lt;/span&gt; &lt;span class="n"&gt;SUSPENDED&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;01713121&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                &lt;span class="n"&gt;LAWRENCE&lt;/span&gt; &lt;span class="n"&gt;J&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;TURNER&lt;/span&gt;
&lt;span class="mi"&gt;5&lt;/span&gt;      &lt;span class="n"&gt;C1207820&lt;/span&gt;        &lt;span class="mi"&gt;08&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;05&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1983&lt;/span&gt;      &lt;span class="n"&gt;DISSOLVED&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;01207820&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                          &lt;span class="n"&gt;R&lt;/span&gt; &lt;span class="n"&gt;L&lt;/span&gt; &lt;span class="n"&gt;CARL&lt;/span&gt;
&lt;span class="mi"&gt;6&lt;/span&gt;      &lt;span class="n"&gt;C3921531&lt;/span&gt;        &lt;span class="mi"&gt;06&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2016&lt;/span&gt;         &lt;span class="n"&gt;ACTIVE&lt;/span&gt;  &lt;span class="n"&gt;View&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entity&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="mi"&gt;03921531&lt;/span&gt;  &lt;span class="n"&gt;POSSU&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;  &lt;span class="n"&gt;REGISTERED&lt;/span&gt; &lt;span class="n"&gt;AGENTS&lt;/span&gt; &lt;span class="n"&gt;INC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;C3365816&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The website hides business names behind a button. But you can use &lt;code&gt;requests&lt;/code&gt; to download the raw html. Then you can use &lt;code&gt;bs4&lt;/code&gt; to extract the raw HTML table as well as any particular row(&lt;code&gt;&amp;lt; tr &amp;gt;&lt;/code&gt;) or cell(&lt;code&gt;&amp;lt; td &amp;gt;&lt;/code&gt;) that you want.&lt;/p&gt;
&lt;p&gt;First lets see how public APIs and the semantic web are supposed to work. Say I read a great SciFi novel, Three Body Problem and wanted to find other books that, like it, won the Hugo Award for best novel. This is how you search for something on wikipedia:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;requests&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;base_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://en.wikipedia.org&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;search_text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;hugo award best novel liu&amp;#39;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;search_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt;     &lt;span class="s1"&gt;&amp;#39;https://en.wikipedia.org/w/index.php&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt;     &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;search&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;search_text&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;search_results&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now we can programmatically find the page with the Hugo Awards using &lt;code&gt;BeautifulSoup4&lt;/code&gt;. Don't try to install &lt;code&gt;BeautifulSoup&lt;/code&gt; without tacking on that version 4 to the end. Otherwise you'll get some confusing error messages. And the import name is &lt;code&gt;bs4&lt;/code&gt;, not beautifulsoup. The &lt;code&gt;.find()&lt;/code&gt; method finds the first element in a &lt;code&gt;BeautifulSoup&lt;/code&gt; object. So if you want to walk through the list of search result, use &lt;code&gt;.findall()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You only need the first search result for this carefully crafted search; ):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;bs4&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bs4&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BeautifulSoup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;search_results&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;class&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;searchresults&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;class&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;searchresults&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ul&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;hugo_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;li&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;href&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;hugo_url&lt;/span&gt;

&lt;span class="s1"&gt;&amp;#39;/wiki/Hugo_Award_for_Best_Novel&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So now we can join the wikipedia path with the base_url to get to the page containing the data table we're looking for. And we can use Pandas to deal download and parse it directly, without any fancy BeaufulSouping.&lt;/p&gt;
&lt;p&gt;Some of this code is on stack overflow in the answer to&lt;a href="https: // stackoverflow.com / a / 65755142 / 623735"&gt;"Pandas read_html to return raw HTML"&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;soup&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bs4&lt;/span&gt;.&lt;span class="nv"&gt;BeautifulSoup&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;requests&lt;/span&gt;.&lt;span class="nv"&gt;get&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;.&lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;soup&lt;/span&gt;.&lt;span class="nv"&gt;find&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;.&lt;span class="nv"&gt;findAll&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;tr&amp;#39;&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;names&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[]
...&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;row&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;:
...&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nv"&gt;names&lt;/span&gt;.&lt;span class="nv"&gt;append&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;getattr&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;row&lt;/span&gt;.&lt;span class="nv"&gt;find&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;contents&amp;#39;&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;].&lt;span class="nv"&gt;strip&lt;/span&gt;&lt;span class="ss"&gt;())&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;names&lt;/span&gt;[&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;:]

[&lt;span class="s1"&gt;&amp;#39;POSSUM FILMS, INC&amp;#39;&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;POSSUM INC.&amp;#39;&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;POSSUM MEDIA, INC.&amp;#39;&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;POSSUM POINT PRODUCTIONS, INC.&amp;#39;&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;POSSUM PRODUCTIONS, INC.&amp;#39;&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;POSSUM-BILITY EXPRESS, INCORPORATED&amp;#39;&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;POSSUMS WELCOME&amp;#39;&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now you can replace that useless column with the correct Button Text, the names of the businesses we're interested in. You need to ignore the first row in the HTML table, because it contains the header "Entity Name" and does not have a button tag:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Entity Name&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:]&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tail&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;Entity&lt;/span&gt; &lt;span class="n"&gt;Number&lt;/span&gt; &lt;span class="n"&gt;Registration&lt;/span&gt; &lt;span class="n"&gt;Date&lt;/span&gt;         &lt;span class="n"&gt;Status&lt;/span&gt;                  &lt;span class="n"&gt;Entity&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="n"&gt;Jurisdiction&lt;/span&gt; &lt;span class="n"&gt;Agent&lt;/span&gt; &lt;span class="n"&gt;for&lt;/span&gt; &lt;span class="n"&gt;Service&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;Process&lt;/span&gt;
&lt;span class="mi"&gt;96&lt;/span&gt;       &lt;span class="n"&gt;C2334141&lt;/span&gt;        &lt;span class="mi"&gt;03&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;01&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2001&lt;/span&gt;  &lt;span class="n"&gt;FTB&lt;/span&gt; &lt;span class="n"&gt;SUSPENDED&lt;/span&gt;           &lt;span class="n"&gt;POSSUM&lt;/span&gt; &lt;span class="n"&gt;MEDIA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;INC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;              &lt;span class="n"&gt;CLAIR&lt;/span&gt; &lt;span class="n"&gt;G&lt;/span&gt; &lt;span class="n"&gt;BURRILL&lt;/span&gt;
&lt;span class="mi"&gt;97&lt;/span&gt;       &lt;span class="n"&gt;C0658630&lt;/span&gt;        &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1972&lt;/span&gt;  &lt;span class="n"&gt;FTB&lt;/span&gt; &lt;span class="n"&gt;SUSPENDED&lt;/span&gt;  &lt;span class="n"&gt;POSSUM&lt;/span&gt; &lt;span class="n"&gt;POINT&lt;/span&gt; &lt;span class="n"&gt;PRODUCTIONS&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                          &lt;span class="n"&gt;NaN&lt;/span&gt;
&lt;span class="mi"&gt;98&lt;/span&gt;       &lt;span class="n"&gt;C1713121&lt;/span&gt;        &lt;span class="mi"&gt;09&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1992&lt;/span&gt;  &lt;span class="n"&gt;FTB&lt;/span&gt; &lt;span class="n"&gt;SUSPENDED&lt;/span&gt;     &lt;span class="n"&gt;POSSUM&lt;/span&gt; &lt;span class="n"&gt;PRODUCTIONS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;INC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;           &lt;span class="n"&gt;LAWRENCE&lt;/span&gt; &lt;span class="n"&gt;J&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;TURNER&lt;/span&gt;
&lt;span class="mi"&gt;99&lt;/span&gt;       &lt;span class="n"&gt;C1207820&lt;/span&gt;        &lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;05&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1983&lt;/span&gt;      &lt;span class="n"&gt;DISSOLVED&lt;/span&gt;  &lt;span class="n"&gt;POSSUM&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;BILITY&lt;/span&gt; &lt;span class="n"&gt;EXPRESS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;                     &lt;span class="n"&gt;R&lt;/span&gt; &lt;span class="n"&gt;L&lt;/span&gt; &lt;span class="n"&gt;CARL&lt;/span&gt;
&lt;span class="mi"&gt;100&lt;/span&gt;      &lt;span class="n"&gt;C3921531&lt;/span&gt;        &lt;span class="mi"&gt;06&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;         &lt;span class="n"&gt;ACTIVE&lt;/span&gt;              &lt;span class="n"&gt;POSSUMS&lt;/span&gt; &lt;span class="n"&gt;WELCOME&lt;/span&gt;   &lt;span class="n"&gt;CALIFORNIA&lt;/span&gt;  &lt;span class="n"&gt;REGISTERED&lt;/span&gt; &lt;span class="n"&gt;AGENTS&lt;/span&gt; &lt;span class="kr"&gt;INC&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Resources&lt;/h3&gt;
&lt;p&gt;If you're working on an NLP problem, you can get data from Wikipedia the propper way... with a database dump: &lt;a href="https://towardsdatascience.com/wikipedia-data-science-working-with-the-worlds-largest-encyclopedia-c08efbac5f5c"&gt;TDS Post on working with Wikipedia data dumps&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="hackerpublicradio.org"&gt;Hacker Public Radio&lt;/a&gt; is awesome! I'm going to try to record my first podcast today, based on this blog post. I'll share these ideas for scraping public data out through the holes in dark patterns with Python (Pandas, Beautiful Soup). It'll be good practice for the &lt;a href="https://www.meetup.com/pythonsd/"&gt;monthly meetup&lt;/a&gt;&lt;br&gt;
&lt;a href="http://pythonsd.org"&gt;San Diego Python User Group&lt;/a&gt;.&lt;/p&gt;</content><category term="Data"/><category term="Data"/><category term="Natural Language Processing"/><category term="Python"/></entry><entry><title>Accelerate Your Creativity with Automation</title><link href="https://tangibleai.com/posts/accelerate-your-creativity-with-automation-classic-ai.html" rel="alternate"/><published>2020-09-11T00:00:00-04:00</published><updated>2020-09-11T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2020-09-11:/posts/accelerate-your-creativity-with-automation-classic-ai.html</id><summary type="html">&lt;p&gt;If you want to have more brain cycles for fun, creative stuff, you can &lt;a href="automatetheboringstuff.com"&gt;automate the boring stuff&lt;/a&gt;.&lt;br&gt;
Though you can't really call it a "cognitive assistant", it will definitely help you think better.&lt;br&gt;
Automating the boring stuff was the secret to the rise of powerhouse startups like GitHub, GitLab …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you want to have more brain cycles for fun, creative stuff, you can &lt;a href="automatetheboringstuff.com"&gt;automate the boring stuff&lt;/a&gt;.&lt;br&gt;
Though you can't really call it a "cognitive assistant", it will definitely help you think better.&lt;br&gt;
Automating the boring stuff was the secret to the rise of powerhouse startups like GitHub, GitLab, Puppet, and even Google (in the early days).&lt;br&gt;
Wildly efficient companies can generate millions in profit per employee.&lt;br&gt;
Companies that don't &lt;em&gt;get it&lt;/em&gt; find themselves stuggling to exceed 100k of revenue per employee.&lt;/p&gt;
&lt;p&gt;If you automate the drudgery, you will free up brain cycles for fun, creative stuff... like finding more things to automate.&lt;/p&gt;
&lt;p&gt;At &lt;a href="tangibleai.com"&gt;Tangible AI&lt;/a&gt;, our simplest, most popular automation has been the &lt;code&gt;workon&lt;/code&gt; command. &lt;a href="https://gitlab.com/jmayjr/"&gt;John&lt;/a&gt;, &lt;a href="https://gitlab.com/ovbondarenko"&gt;Olesya&lt;/a&gt;, and I use it a lot nearly every day as we switch back and forth between projects.&lt;br&gt;
And we share it with our interns as part of the onboarding process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Teaser&lt;/strong&gt;: I've added a &lt;em&gt;mind hack&lt;/em&gt; at the end of the post. It works well with the &lt;code&gt;workon&lt;/code&gt; command to rev up your creativity.&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;workon&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://pypi.org/project/virtualenvwrapper/"&gt;&lt;code&gt;virtualenvwrapper&lt;/code&gt;&lt;/a&gt; python package includes a command called &lt;code&gt;workon&lt;/code&gt;.&lt;br&gt;
And others have created a package called, appropriately &lt;a href="https://pypi.org/project/Workon/"&gt;&lt;code&gt;Workon&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But I use &lt;code&gt;conda&lt;/code&gt; rather than &lt;code&gt;virtualenv&lt;/code&gt; to organize my python environments.&lt;br&gt;
So I wrote a hacky shell script to take care of this.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gitlab.com/jmayjr"&gt;John&lt;/a&gt; and I are working on a python version of this.&lt;br&gt;
But don't hold your breath...&lt;br&gt;
If it ain't broke, we probably won't fix it.&lt;/p&gt;
&lt;h2&gt;Use case&lt;/h2&gt;
&lt;p&gt;Every time I open a new terminal, I find myself activating an environment and then switching to that directory.&lt;br&gt;
Remembering the right environment name and directory path can be a problem.&lt;br&gt;
I work on many different projects in a given day, and they change from day to day.&lt;/p&gt;
&lt;p&gt;So I created a &lt;code&gt;workon&lt;/code&gt; command that makes it easy for me to set up a project and come back to it later.&lt;br&gt;
All &lt;code&gt;workon&lt;/code&gt; does is find the paths to my conda environmnt and source code, for a particular project.&lt;br&gt;
It offloads my brain from memorizing paths and names and spellings that aren't helping me be creative.&lt;br&gt;
Plus it gets me started quickly.&lt;/p&gt;
&lt;p&gt;Now all I do is say &lt;code&gt;workon qary&lt;/code&gt; and I'm off and running.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Download the &lt;a href="https://gitlab.com/tangibleai/qary/-/raw/master/scripts/bash_functions.sh?inline=false"&gt;bash shell script&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wget https://gitlab.com/tangibleai/qary/-/raw/master/scripts/bash_functions.sh?inline=false
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I put mine in my personal &lt;code&gt;~/bin/&lt;/code&gt; directory where I keep all my automation scripts.&lt;br&gt;
Then make sure that script is sourced as part of your bash login in &lt;code&gt;.bashrc&lt;/code&gt; or &lt;code&gt;.bash_profile&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mv bash_functions.sh ~/bin/
chmod +x bash_functions.sh
echo &amp;quot;source ~/bin/bash_functions.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You may want to edit the &lt;code&gt;bash_functions.sh&lt;/code&gt; script on &lt;a href="https://gitlab.com/tangibleai/qary/-/blob/master/scripts/bash_functions.sh#L38"&gt;line 38&lt;/a&gt; to add paths where you keep your source code.&lt;br&gt;
You might also want to add a &lt;code&gt;git status&lt;/code&gt; command (or anything else you do a lot) below &lt;a href="https://gitlab.com/tangibleai/qary/-/blob/master/scripts/bash_functions.sh#L55"&gt;line 55&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;That should do it!&lt;/p&gt;
&lt;p&gt;Now, when you type &lt;code&gt;workon qary&lt;/code&gt; it will get you all set up for some creative, productive coding on a chatbot to save the world!&lt;/p&gt;
&lt;h2&gt;Mind hack&lt;/h2&gt;
&lt;p&gt;Sometimes when you &lt;code&gt;workon qary&lt;/code&gt; you end up staring at a blank screen or IDE.&lt;br&gt;
It's hard to know where to start.&lt;br&gt;
But if you do &lt;code&gt;git status&lt;/code&gt; right after &lt;code&gt;workon&lt;/code&gt; this highlights in green any files you've modified but not commited.&lt;br&gt;
Then, if you remember to leave an "easter egg" before you switch to another project or shutdown for the day, that'll pop up at the beginning of your next session.&lt;br&gt;
Right before I switch to a new project I'll add a TODO comment to my code, or even start a new line of code within incomplete syntax as a &lt;em&gt;note to self&lt;/em&gt;.&lt;br&gt;
Make sure you don't commit this reminder until you're in the zone and coding up some new automation to save the world.&lt;/p&gt;
&lt;p&gt;Smart authors like &lt;a href="https://www.manning.com/books/taming-text"&gt;Grant Ingersol&lt;/a&gt; often use this trick to seed their brain with creative ideas and avoid writer's block.&lt;br&gt;
A writer will finish the day with an unfinished sentence or the first line of a dialog.&lt;br&gt;
It's like a note to your future self.&lt;br&gt;
This can supercharge your creativity the next morning by reminding you where you left off.&lt;/p&gt;
&lt;p&gt;So when I'm about to switch projects I'll add an unfinished line of code or TODO, but won't &lt;code&gt;git commit&lt;/code&gt; it.&lt;br&gt;
That way it shows up when I do git status.&lt;br&gt;
If your past self forgot to do this, and &lt;code&gt;git status&lt;/code&gt; is empty, you can just do a &lt;code&gt;git log --stat&lt;/code&gt; to reorient yourself.&lt;br&gt;
And if that still doesn't work, sometimes when you build your project, your linters will flag any broken lines of code from the previous session.&lt;/p&gt;
&lt;h2&gt;Linting&lt;/h2&gt;
&lt;p&gt;You &lt;code&gt;lint&lt;/code&gt; don't you?!!!&lt;br&gt;
If not, I'll set you straight in a follow-up post.&lt;br&gt;
Linters are a crucial bit of automation that all the strong developers I know of lean on heavily.&lt;br&gt;
Thank you &lt;a href="https://stevenskoczen.com/"&gt;Steven&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/aleck-landgraf-1145799/"&gt;Aleck&lt;/a&gt; for indoctrinating me with this habit all those years ago.&lt;br&gt;
&lt;a href="https://www.python.org/dev/peps/pep-0008/"&gt;PEP8&lt;/a&gt; linting is mandatory for all interns and contractors at Tangible AI, as well as contributors to &lt;a href="http://gitlab.com/tangibleai/qary"&gt;&lt;code&gt;qary&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;</content><category term="AI"/></entry><entry><title>Which flavor of BERT should you use for your QA task?</title><link href="https://tangibleai.com/posts/benchmarking-bert-based-transformers-for-question-answering-and-reading-comprehension-tests.html" rel="alternate"/><published>2020-07-21T00:00:00-04:00</published><updated>2020-07-21T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2020-07-21:/posts/benchmarking-bert-based-transformers-for-question-answering-and-reading-comprehension-tests.html</id><summary type="html">&lt;p&gt;Making an intelligent chatbot has never been easier, thanks to the abundance of open source natural language processing libraries, curated datasets and the power of transfer learning. Building a basic question-answering functionality with Transformers library can be as simple as this:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 1: Load Pretrained Transformer QA Model&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;transformers …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Making an intelligent chatbot has never been easier, thanks to the abundance of open source natural language processing libraries, curated datasets and the power of transfer learning. Building a basic question-answering functionality with Transformers library can be as simple as this:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 1: Load Pretrained Transformer QA Model&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;transformers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pipeline&lt;/span&gt;

&lt;span class="c1"&gt;# Context: a snippet from a Wikipedia article about Stan Lee&lt;/span&gt;
&lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="s2"&gt;    Stan Lee[1] (born Stanley Martin Lieber /ˈliːbər/; December 28, 1922 - November 12, 2018) was an American comic book &lt;/span&gt;
&lt;span class="s2"&gt;    writer, editor, publisher, and producer. He rose through the ranks of a family-run business to become Marvel Comics&amp;#39; &lt;/span&gt;
&lt;span class="s2"&gt;    primary creative leader for two decades, leading its expansion from a small division of a publishing house to&lt;/span&gt;
&lt;span class="s2"&gt;    multimedia corporation that dominated the comics industry.&lt;/span&gt;
&lt;span class="s2"&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span class="n"&gt;nlp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;question-answering&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nlp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Who is Stan Lee?&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="s2"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4&gt;&lt;strong&gt;&lt;em&gt;&lt;code&gt;Output 1: Report for Default Transformer QA Model&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;{&lt;span class="s1"&gt;&amp;#39;score&amp;#39;&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;2854291316652837&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;start&amp;#39;&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;95&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;end&amp;#39;&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;159&lt;/span&gt;,
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;answer&amp;#39;&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;an American comic book writer, editor, publisher, and producer.&amp;#39;&lt;/span&gt;}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;BOOM! It works! That low confidence score is a little worrisome, though. You’ll see how that comes into play later, when we talk about BERT’s ability to detect impossible questions and irrelevant contexts.
However, taking some time to choose the right model for your task will ensure that you are getting the best possible out of the box performance from your conversational agent. Your choice of both language models and a benchmarking dataset will make or break the performance of your chatbot.
BERT (Bidirectional Encoding Representations for Transformers) models perform very well on complex information extraction tasks. They can capture not only meaning of words, but also the context. Before choosing model (or settling for the default option) you probably want to evaluate your candidate model for accuracy and resources (RAM and CPU cycles) to make sure that it actually meets your expectations. In this article you will see how we benchmarked our qa model using &lt;a href="https://rajpurkar.github.io/SQuAD-explorer/"&gt;Stanford Question Answering Dataset (SQuAD)&lt;/a&gt;. There are many other good question-answering datasets you might want to use, including Microsoft’s &lt;a href="https://www.microsoft.com/en-us/research/project/newsqa-dataset/"&gt;NewsQA&lt;/a&gt;, &lt;a href="https://www.tau-nlp.org/commonsenseqa"&gt;CommonsenseQA&lt;/a&gt;, &lt;a href="https://www.tau-nlp.org/compwebq"&gt;ComplexWebQA&lt;/a&gt;, and many others. To maximize accuracy for your application you’ll want to choose a benchmarking dataset representative of the questions, answers, and contexts you expect in your application.
&lt;a href="https://github.com/huggingface/transformers"&gt;Huggingface Transformers library&lt;/a&gt; has a large catalogue of pretrained models for a variety of tasks: sentiment analysis, text summarization, paraphrasing, and, of course, question answering. We chose a few candidate question-answering models from the repository of available &lt;a href="https://huggingface.co/models?filter=question-answering"&gt;models&lt;/a&gt;. Lo and behold, many of them have already been fine-tuned on the SQuAD dataset. Awesome! Here are a few SQuAD fine-tuned models we are going to evaluate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;distilbert-base-cased-distilled-squad&lt;/li&gt;
&lt;li&gt;bert-large-uncased-whole-word-masking-finetuned-squad&lt;/li&gt;
&lt;li&gt;ktrapeznikov/albert-xlarge-v2-squad-v2&lt;/li&gt;
&lt;li&gt;mrm8488/bert-tiny-5-finetuned-squadv2&lt;/li&gt;
&lt;li&gt;twmkn9/albert-base-v2-squad2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We ran predictions with our selected models on both versions of SQuAD (version 1 and version 2). The difference between them is that SQuAD-v1 contains only answerable questions, while SQuAD-v2 contains unanswerable questions as well. To illustrate this, let us look at the below example from the SQuAD-v2 dataset. An answer to Question 2 is impossible to derive from the given context from Wikipedia:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Question 1:&lt;/strong&gt; “In what country is Normandy located?”
&lt;strong&gt;Question 2:&lt;/strong&gt; “Who gave their name to Normandy in the 1000’s and 1100’s”
&lt;strong&gt;Context:&lt;/strong&gt; “The Normans (Norman: Nourmands; French: Normands; Latin: Normanni) were the people who in the 10th and 11th centuries gave their name to Normandy, a region in France. They were descended from Norse (“Norman” comes from “Norseman”) raiders and pirates from Denmark, Iceland and Norway who, under their leader Rollo, agreed to swear fealty to King Charles III of West Francia. Through generations of assimilation and mixing with the native Frankish and Roman-Gaulish populations, their descendants would gradually merge with the Carolingian-based cultures of West Francia. The distinct cultural and ethnic identity of the Normans emerged initially in the first half of the 10th century, and it continued to evolve over the succeeding centuries.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Our ideal model should be able to understand that context well enough to compose an answer.
Let us get started!
To define a model and a tokenizer in Transformers, we can use AutoClasses. In most cases Automodels can derive the settings automatically from the model name. We need only a few lines of code to set it up:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 2: Load Large Uncased BERT Transformer Pretuned for SQuAD&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;tqdm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tqdm&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;transformers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AutoTokenizer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;AutoModelForQuestionAnswering&lt;/span&gt;

&lt;span class="n"&gt;modelname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;bert-large-uncased-whole-word-masking-finetuned-squad&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;tokenizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AutoTokenizer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;modelname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AutoModelForQuestionAnswering&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;modelname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We will use the human level performance as our target for accuracy. SQuAD leaderboard provides human level performance for this task, which is 87% accuracy of finding the exact answer and 89% f1 score.
You might ask, “How do they know what human performance is?” and “What humans are they talking about?” Those Stanford researchers are clever. They just used the same crowd-sourced humans that labeled the SQuAD dataset. For each question in the test set they had multiple humans provide alternative answers. For the human score they just left one of those answers out and checked to see if it matched any of the others using the same text comparison algorithm that they used to evaluate the machine model. The average accuracy for this “leave one human out” dataset is what determined the human level score that the machines are shooting for.
To run predictions on our datasets, first we have to transform the SQuAD downloaded files into computer-interpretable features. Luckily, the Transformers library already has a handy set of functions to do exactly that:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 3: Load and Preprocess SQuAD v2&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;transformers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;squad_convert_examples_to_features&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;transformers.data.processors.squad&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SquadV2Processor&lt;/span&gt;

&lt;span class="n"&gt;processor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SquadV2Processor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;examples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;processor&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_dev_examples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;features&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dataset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;squad_convert_examples_to_features&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_seq_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;doc_stride&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_query_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;is_training&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;return_dataset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;pt&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;threads&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;# number of CPU cores to use&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We will use PyTorch and its GPU capability (optional) to make predictions:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 4: Prediction (Inference) with a Transformer&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;torch&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;torch.utils.data&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DataLoader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SequentialSampler&lt;/span&gt;

&lt;span class="n"&gt;eval_sampler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SequentialSampler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;eval_dataloader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DataLoader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sampler&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;eval_sampler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;all_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;to_list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;detach&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cpu&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tolist&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tqdm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eval_dataloader&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;batch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;no_grad&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="n"&gt;inputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;input_ids&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;attention_mask&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;token_type_ids&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;# NOTE: skip token_type_ids for distilbert&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="n"&gt;example_indices&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

        &lt;span class="n"&gt;outputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# this is where the magic happens&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;example_index&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;example_indices&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;eval_feature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;features&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;example_index&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;
            &lt;span class="n"&gt;unique_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eval_feature&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unique_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Importantly, the model inputs should be adjusted for a DistilBERT model (such as &lt;code&gt;distilbert-base-cased-distilled-squad&lt;/code&gt;). We should exclude the “token_type_ids” field due to the difference in DistilBERT implementation compared to BERT or ALBERT to avoid the script erroring out. Everything else will stay exactly the same.
Finally, to evaluate the results, we can apply &lt;code&gt;squad_evaluate()&lt;/code&gt; function from Transformers library:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 5: transformers.squad_evaluate()&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;transformers.data.metrics.squad_metrics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;squad_evaluate&lt;/span&gt;

&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;squad_evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
                         &lt;span class="n"&gt;predictions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                         &lt;span class="n"&gt;no_answer_probs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;null_odds&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here is an example report generated by squad_evaluate:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Output 5: Accuracy Report from transformers.squad_evaluate()&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;OrderedDict([(&amp;#39;exact&amp;#39;, 65.69527499368314),
             (&amp;#39;f1&amp;#39;, 67.12954950681876),
             (&amp;#39;total&amp;#39;, 11873),
             (&amp;#39;HasAns_exact&amp;#39;, 62.48313090418353),
             (&amp;#39;HasAns_f1&amp;#39;, 65.35579306586668),
             (&amp;#39;HasAns_total&amp;#39;, 5928),
             (&amp;#39;NoAns_exact&amp;#39;, 68.8982338099243),
             (&amp;#39;NoAns_f1&amp;#39;, 68.8982338099243),
             (&amp;#39;NoAns_total&amp;#39;, 5945),
             (&amp;#39;best_exact&amp;#39;, 65.83003453213173),
             (&amp;#39;best_exact_thresh&amp;#39;, -21.529870867729187),
             (&amp;#39;best_f1&amp;#39;, 67.12954950681889),
             (&amp;#39;best_f1_thresh&amp;#39;, -21.030719757080078)])
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now let us compare exact answer accuracy scores (“exact”) and f1 scores for the predictions generated for our two benchmarking datasets, SQuAD-v1 and SQuAD-v2. All models perform substantially better on the dataset without negatives (SQuAD-v1), but we do have a clear winner (ktrapeznikov/albert-xlarge-v2-squad-v2). Overall, it performs better on both datasets. Another great news is that our generated report for this model matches exactly the &lt;a href="https://huggingface.co/ktrapeznikov/albert-xlarge-v2-squad-v2"&gt;report&lt;/a&gt; posted by the author. The accuracy and f1 fall just a little short of the human level performance, but is still a great result for a challenging dataset like SQuAD.
&lt;img alt="Table 1: Columns for exact and F1 accuracy scores for SQuAD v1 and v2. A row for human performance plus each of the five pretrained transformers mentioned earlier." src="/images/table3.png"&gt;&lt;/p&gt;
&lt;p&gt;Table 1: Accuracy Scores for Each of 5 Models on SQuAD v1 &amp;amp; v2&lt;/p&gt;
&lt;p&gt;We are going to compare the full reports for SQuAD-v2 predictions in the next table. Looks like ktrapeznikov/albert-xlarge-v2-squad-v2 did almost equally well on both tasks: (1) identifying the correct answers to the answerable questions, and (2) weeding out the answerable questions. Interestingly though, bert-large-uncased-whole-word-masking-finetuned-squad offers a significant (approximately 5%) boost to the prediction accuracy on the first task (answerable questions), but completely failing on the second task.&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img alt="Table 2: Columns for exact and F1 accuracy scores for SQuAD v2 separated into those contexts that contain a valid answer and those that do not. A row for human performance plus each of the five pretrained models." src="/images/table2.png"&gt;&lt;/p&gt;
&lt;p&gt;Table 2: Separate Accuracy Scores for Impossible Questions&lt;/p&gt;
&lt;p&gt;We can optimize the model to perform better on identifying unanswerable questions by adjusting the null threshold for the best f1 score. Remember, the best f1 threshold is one of the outputs computed by the squad_evaluate function (best_f1_thresh). Here is how the prediction metrics for SQuAD-v2 change when we apply the best_f1_thresh from the SQuAD-v2 report:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 6: Accuracy Report from transformers.squad_evaluate()&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;report = dict(squad_evaluate(
    examples, 
    predictions, 
    no_answer_probs=null_odds, 
    no_answer_probability_threshold=best_f1_thresh))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;img alt="Table 3: Table 2 augemented with additional columns for adjusted scores (both exact and F1)." src="/images/table1.png"&gt;&lt;/p&gt;
&lt;p&gt;Table 3: Adjusted Accuracy Scores&lt;/p&gt;
&lt;p&gt;While this adjustment helps the model more accurately identify the unanswerable questions, it does so at the expense of the accuracy of answered questions. This trade-off should be carefully considered in the context of your application.
Let’s use the Transformers QA pipeline to test drive the three best models with a few questions of our own. We picked the following the following passage from a Wikipedia article on computational linguistics:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Input 7: Computational Linguistics Questions (an unseen test example)&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="s1"&gt;Computational linguistics is often grouped within the field of artificial intelligence &lt;/span&gt;
&lt;span class="s1"&gt;but was present before the development of artificial intelligence.&lt;/span&gt;
&lt;span class="s1"&gt;Computational linguistics originated with efforts in the United States in the 1950s to use computers to automatically translate texts from foreign languages, particularly Russian scientific journals, into English.[3] Since computers can make arithmetic (systematic) calculations much faster and more accurately than humans, it was thought to be only a short matter of time before they could also begin to process language.[4] Computational and quantitative methods are also used historically in the attempted reconstruction of earlier forms of modern languages and sub-grouping modern languages into language families.&lt;/span&gt;
&lt;span class="s1"&gt;Earlier methods, such as lexicostatistics and glottochronology, have been proven to be premature and inaccurate. &lt;/span&gt;
&lt;span class="s1"&gt;However, recent interdisciplinary studies that borrow concepts from biological studies, especially gene mapping, have proved to produce more sophisticated analytical tools and more reliable results.[5]&lt;/span&gt;
&lt;span class="s1"&gt;&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;When was computational linguistics invented?&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Which problems computational linguistics is trying to solve?&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Which methods existed before the emergence of computational linguistics ?&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Who invented computational linguistics?&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Who invented gene mapping?&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note that the last two questions are impossible to answer from the given context. Here is what we got from each model we tested:&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;&lt;code&gt;Output 7: Computational Linguistics Questions (last two are impossible questions)&lt;/code&gt;&lt;/em&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bert&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;large&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;uncased&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;whole&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;masking&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;finetuned&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squad&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;
&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;When&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1950&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.7105585285134239&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;problems&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;trying&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;solve&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;earlier&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;forms&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;modern&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;languages&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sub&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;grouping&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;modern&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;languages&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;into&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;families&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.034796690637104444&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;methods&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;existed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;emergence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lexicostatistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;glottochronology&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.8949566496998465&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;United&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;States&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.5333964470000865&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;gene&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;biological&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;studies&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.02638426599066701&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ktrapeznikov&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;albert&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;xlarge&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squad&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;
&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;When&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1950&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.6412413898187204&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;problems&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;trying&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;solve&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;translate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;texts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;foreign&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;languages&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.1307672173261354&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;methods&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;existed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;emergence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.6308010582306451&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.9748902345310917&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;gene&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.9988990117797236&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mrm8488&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bert&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tiny&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;finetuned&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squadv2&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;
&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;When&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1950&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.5100432430158293&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;problems&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;trying&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;solve&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;artificial&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;intelligence&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.03275686739784334&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;methods&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;existed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;emergence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.06689302592967117&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.05630986208743849&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;gene&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.8440988190788303&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;twmkn9&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;albert&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squad2&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;
&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;When&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1950&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.630521506320747&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;problems&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;trying&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;solve&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.5901262729978356&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;methods&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;existed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;emergence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.2787252009804586&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.9395531361082305&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;gene&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.9998772777192002&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;distilbert&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cased&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;distilled&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squad&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;
&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;When&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1950&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.7759537003546768&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;problems&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;trying&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;solve&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;gene&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.4235580072416312&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;methods&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;existed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;emergence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;lexicostatistics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;glottochronology&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.8573431178602817&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computational&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linguistics&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;computers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.7313878935375229&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Question&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Who&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invented&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;gene&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Answer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;biological&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;studies&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.4788379586462099&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As you can see, it is hard to evaluate a model based on a single data point, since the results are all over the map. While each model gave the correct answer to the first question (“When was computational linguistics invented?”), the other questions proved to be more difficult. This means that even our best model probably should be fine-tuned again on a custom dataset to improve further.&lt;/p&gt;
&lt;h3&gt;Take away:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Open source pretrained (and fine-tuned!) models can kickstart your natural language processing project.&lt;/li&gt;
&lt;li&gt;Before anything else, try to reproduce the original results reported by the author, if available.&lt;/li&gt;
&lt;li&gt;Benchmark your models for accuracy. Even models fine-tuned on the exact same dataset can perform very differently.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Leave a comment or send me an e-mail if I can help you get started with pretrained transformers!
 
Leave a comment or send me an e-mail if I can help you get started with pretrained transformers!
 &lt;/p&gt;
&lt;hr&gt;
&lt;h4&gt;&lt;em&gt;About The Author&lt;/em&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ovbondarenko/"&gt;Olesya Bondarenko&lt;/a&gt; is Lead Developer at Tangible AI where she leads the effort to make &lt;a href="http://gitlab.com/tangibleai/qary"&gt;&lt;code&gt;QAry&lt;/code&gt;&lt;/a&gt; smarter. &lt;code&gt;QAry&lt;/code&gt; is an open source question answering system you can trust with your most private data and questions.&lt;/p&gt;</content><category term="AI"/><category term="AI"/><category term="Natural Language Processing"/></entry><entry><title>Getting Started with Python and Data Analysis</title><link href="https://tangibleai.com/posts/getting-started-with-python-and-data-analysis.html" rel="alternate"/><published>2020-07-15T00:00:00-04:00</published><updated>2020-07-15T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2020-07-15:/posts/getting-started-with-python-and-data-analysis.html</id><summary type="html">&lt;p&gt;We not only help international organizations to start using machine intelligence, we also help new developers and Data Scientists get their start.&lt;br&gt;
Here are our favorite tutorials and resources to help you get started if you're new to Python or data science.&lt;/p&gt;
&lt;p&gt;If you like working on some of these …&lt;/p&gt;</summary><content type="html">&lt;p&gt;We not only help international organizations to start using machine intelligence, we also help new developers and Data Scientists get their start.&lt;br&gt;
Here are our favorite tutorials and resources to help you get started if you're new to Python or data science.&lt;/p&gt;
&lt;p&gt;If you like working on some of these exercises and want to find some ways to use python for social impact, consider applying for our quarterly internship. Each qaurter we take on two unpaid interns that we guide on their journey from zero to data science hero in only two and a half months.&lt;br&gt;
We even have a chatbot to help you along the way with daily encouragement, guidance and exercises.&lt;/p&gt;
&lt;h2&gt;Programming&lt;/h2&gt;
&lt;p&gt;Here you should find everything you need to get started in programming.&lt;br&gt;
And there will be ways for programmers of all skill level to develop their craft.&lt;br&gt;
Even I use the resources in this list to "level up" my skills now and then.&lt;/p&gt;
&lt;h3&gt;Complete Beginner&lt;/h3&gt;
&lt;p&gt;If you have no programming experience at all, this is a great place to start.&lt;br&gt;
Python was designed to be the most readable and learnable programming language.&lt;br&gt;
Plus you'll be learning the most powerful and popular programming language&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ossu/data-science"&gt;Open Source Society University: Everything for complete free college degree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/Z1Yd7upQsXY"&gt;CSDojo YouTube: Complete Beginner Intro to Python&lt;/a&gt; &lt;strong&gt;RECOMMENDED&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pythonspot.com/simple-text-game/"&gt;PythonSpot: Simple text game&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://courses.edx.org/courses/course-v1:MITx+6.00.1x+2T2020/course"&gt;Introduction to Computer Science and Programming using Python&lt;/a&gt; &lt;strong&gt;RECOMMENDED by David Valdez&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Interactive Python Self-Learning&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://codingbat.com/python"&gt;Coding Bat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pythonprogramming.net/"&gt;Free Python Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.codecademy.com/"&gt;Codecademy&lt;/a&gt;&lt;br&gt;
  code-camps&lt;br&gt;
&lt;a href="https://www.codecademy.com/"&gt;https://www.codecademy.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Intermediate Python and Beginner Data Science&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jakevdp.github.io/PythonDataScienceHandbook/"&gt;Python Data Science Handbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook"&gt;Jupyter Notebooks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.learnpython.org/en/Pandas_Basics"&gt;Pandas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/python/python_classes.asp"&gt;W3 School, Python Classes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/donnemartin/interactive-coding-challenges"&gt;Donne Martin's Code Challenges&lt;/a&gt; (requires familiarity with git and github)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Certificated Online Learning&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="edx.org"&gt;EdX and Open Courseware&lt;/a&gt; &lt;strong&gt;RECOMMENDED&lt;/strong&gt;  by David&lt;/li&gt;
&lt;li&gt;&lt;a href="coursera.org"&gt;Coursera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="udacity.com"&gt;Udacity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Datasets &amp;amp; Project Ideas&lt;/h2&gt;
&lt;p&gt;Here are some datasets, blog posts, and tutorials that might spark some ideas for projects of your own.&lt;br&gt;
One of the most reliable ways to learn something is to duplicate someone else's work and then play with it or break it.&lt;br&gt;
Eventually you may be able to modify, extend, or generalize it in some way that extends the state of the art.&lt;/p&gt;
&lt;h3&gt;NLP&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://commoncrawl.org/the-data/tutorials/"&gt;web page text by Common Crawl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/dev/api/"&gt;reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Meta&lt;/h2&gt;
&lt;h3&gt;How to Think and Learn&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Interactive_Learning"&gt;Inter&lt;strong&gt;active&lt;/strong&gt; Learning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.coursera.org/learn/learning-how-to-learn/"&gt;Learning how to learn&lt;/a&gt; &lt;strong&gt;RECOMMENDED&lt;/strong&gt; by Katherine&lt;/li&gt;
&lt;li&gt;&lt;a href="https://smile.amazon.com/Make-Stick-Peter-C-Brown-ebook/dp/B00JQ3FN7M"&gt;Make It Stick&lt;/a&gt; e-book RECOMMENDED by Diane&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Design_Patterns https://en.wikipedia.org/wiki/SOLID"&gt;SOLID&lt;/a&gt; learning technigque RECOMMENDED by by David&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Learning-How-Learn-Spending-Studying/dp/0143132547/ref=sr_1_3?dchild=1&amp;amp;keywords=learning+how+to+learn+for+kids&amp;amp;qid=1595703635&amp;amp;s=books&amp;amp;sr=1-3"&gt;Learning how to learn  for children&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Algorithms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.codility.com/programmers/"&gt;Codility&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Design Patterns&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://smile.amazon.com/Robert-C-Martin/e/B000APG87E?ref=sr_ntt_srch_lnk_2&amp;amp;qid=1595702956&amp;amp;sr=8-2"&gt;Clean Code&lt;/a&gt; by Robert C Martin RECOMMENDED by Diane Chen&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Mentoring Schools&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.codementor.io/"&gt;Code Mentor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="thinkful.com"&gt;Thinkful&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="springboard.com"&gt;Springboard&lt;/a&gt; &lt;strong&gt;RECOMMENDED&lt;/strong&gt; by Hobson&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Python Resource Lists&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.pythonsd.org/index.html"&gt;https://www.pythonsd.org/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pythonmorsels.com/resources/"&gt;https://www.pythonmorsels.com/resources/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="Data"/><category term="Data"/><category term="Python"/></entry><entry><title>How nonprofits are using chatbots to scale their impact</title><link href="https://tangibleai.com/posts/how-nonprofits-are-using-chatbots-to-scale-their-impact.html" rel="alternate"/><published>2019-05-20T00:00:00-04:00</published><updated>2019-05-20T00:00:00-04:00</updated><author><name>TangibleAI</name></author><id>tag:tangibleai.com,2019-05-20:/posts/how-nonprofits-are-using-chatbots-to-scale-their-impact.html</id><summary type="html">&lt;p&gt;Artificial intelligence-powered chatbots have become ubiquitous in today’s world. Increasingly, more non-profit organizations are creating chatbots for different purposes. AI-powered chatbots help fundraising efforts, help assist with education, and provide an artificial support staff that is available around the clock. One of the biggest benefits that non-profits see is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Artificial intelligence-powered chatbots have become ubiquitous in today’s world. Increasingly, more non-profit organizations are creating chatbots for different purposes. AI-powered chatbots help fundraising efforts, help assist with education, and provide an artificial support staff that is available around the clock. One of the biggest benefits that non-profits see is that chatbots allow them to scale their impact, serve more people than ever, all without increasing business costs.&lt;/p&gt;
&lt;p&gt;In this article, we show you 5 examples of real-world use cases for chatbots that have already been tried and implemented in the nonprofit sector. As you will see, chatbots and artificial intelligence are not distant future - they're here, and they are here to stay.&lt;/p&gt;
&lt;h2&gt;Automating Large-Scale Campaigns&lt;/h2&gt;
&lt;p&gt;Large-scale campaigns typically require a large support base which means putting a lot of feet on the ground. It can be impossible to support the target audience when these many resources are required. Chatbots can automate that support role, providing a low-cost, virtual, and always available experience that is both engaging and interactive.&lt;/p&gt;
&lt;p&gt;Recently, the Fight for Future Foundation &lt;a href="https://www.hello.vote/"&gt;launched a chatbot to help with their voter registration campaign&lt;/a&gt;. Their goal was to increase voter registration and encourage citizens to visit their local polling office and vote. Launching this type of campaign meant a large scale, pro-active outreach, though.&lt;/p&gt;
&lt;p&gt;Fight for Future Foundation settled on virtualizing their outreach programs through chatbots. It is estimated that more than 150,000 unique people interacted with their chatbot which resulted in more than 50,000 new registrations. Employing a live workforce to handle numbers at this scale would have been infeasible for almost any organization.&lt;/p&gt;
&lt;h2&gt;Personalize Support Without Increased Staff&lt;/h2&gt;
&lt;p&gt;Non-profits require a more personalized support mechanism than any other business segment. NGOs must connect with their audience on a personal level. Yet, scaling to provide that kind of personal interaction can be extremely difficult and expensive. By providing small, digestible pieces of information, and easy-to-use user experience, chatbots can help a targeted audience find exactly the information they need quickly.&lt;/p&gt;
&lt;p&gt;Take &lt;a href="https://www.facebook.com/Hi-Rainbow-432320813914652/"&gt;rAInbow&lt;/a&gt;) for example. This chatbot is part of a campaign that helps create awareness about domestic violence. That can be a very difficult conversation to have with people, much less convince victims to come forward! Rainbow has created a chatbot that helps people learn more about their cause in a personal way and helps victims come forward.&lt;/p&gt;
&lt;h2&gt;Connecting to Younger Audiences&lt;/h2&gt;
&lt;p&gt;Younger generations have fully embraced the web, including all its technologies it has to offer. As a result, millennials (now in the 25-35 year age group) use chatbots more than most. 47% of millennials have reported that they interact with a chatbot regularly. Considering this age group is now the target audience for most organizations, it would be wise to interact with them in a familiar way.&lt;/p&gt;
&lt;p&gt;Consider Roo as an example. Roo is a chatbot created by Planned Parenthood that &lt;a href="https://venturebeat.com/2019/07/10/roo-is-this-normal-how-teens-are-talking-to-a-planned-parenthood-chatbot-about-safe-sex"&gt;helps young people find answers&lt;/a&gt; to sexual and parenting questions. These can be rather personal conversations. Yet Roo can help this target audience 24x7 and has had so much success that it answered more than 800,000 questions in the first 6 months after being launched. Roo has also helped people find new primary practitioners that offer better services and have scheduled more than 1,000 appointments, too!&lt;/p&gt;
&lt;h2&gt;Increasing Awareness and Advocacy for Organization's Cause&lt;/h2&gt;
&lt;p&gt;Advocacy is one of the most important parts of any mission for an NGO. Advocacy is what explains the mission of a non-profit and convinces people to stand behind them. It creates legitimacy. In many cases, though, it can be hard to educate the target audience about crucial and complex subjects. Chatbots can help people learn about any given subject and create a sort of empathy that could not be translated through human interaction. These experiences can be broken down into digestible stories that engage the audience and offer unique resources in understanding.&lt;/p&gt;
&lt;p&gt;Mencap’s chatbot, Irene, is a great example of this. Irene acts as &lt;a href="https://www.mencap.org.uk/understandme/"&gt;a guided example through understanding learning disabilities&lt;/a&gt;. It poses common responses that viewers can select in something that almost resembles a game. Yet the language Irene uses is both engaging and informative.&lt;/p&gt;
&lt;h2&gt;Building an Engaged Community&lt;/h2&gt;
&lt;p&gt;Engagement is one of the hardest challenges facing any organization, much less non-profits. It can be difficult to get people to listen to how you can help them and get a response back. Farm.Ink understood this problem. They built a chatbot that supports a community of more than 50,000 farmers in Sub-Saharan Africa. Farm.ink's chatbot connected to &lt;a href="http://m.me/africafarmersclub"&gt;Africa Farmers Club group&lt;/a&gt; helps farmers find critical information inside the group, hear the latest news, and learn new things.&lt;/p&gt;
&lt;p&gt;Other platforms, like &lt;a href="https://resist.bot/"&gt;Resistbot&lt;/a&gt;, are similar but serve a different audience. Resistbot is a real-time notification system for political activism. It will tell people about events in their vicinity and help protesters organize.&lt;/p&gt;
&lt;p&gt;Eager to build a chatbot for your own organization? You don’t need an AI expert with a computer science degree to build one for your non-profit. It’s easier than ever today! Tools like ManyChat and Chatfuel let you make a messenger bot in minutes. If you need a more complex tool, one that can listen and respond to natural language, services like Google’s Dialogflow are free and easy to start with.&lt;/p&gt;
&lt;p&gt;Do you feel like you need a more complex solution? Contact us and we will be happy to help build out a successful chatbot for your NGO.&lt;/p&gt;</content><category term="Chatbots"/><category term="Chatbots"/><category term="Nonprofits"/></entry></feed>