facebookresearch / ParlAI

A framework for training and evaluating AI models on a variety of openly available dialogue datasets.
https://parl.ai
MIT License
10.49k stars 2.1k forks source link

BlenderBot summarization? #4552

Closed fraziermatthew closed 2 years ago

fraziermatthew commented 2 years ago

Hello,

I am conducting research on Computer Science Principles to see if Blenderbot can be a useful tool for helping students with retrieving examples to general questions able online. I am trying to see how effective Blenderbot is at retrieving useful examples. For example:

image

Interestingly, the search query that Blenderbot produces is accurate. The 2nd and 4th websites that was retrieved by Blenderbot do contain an example to the answer of that question. Specifically, these websites: https://www.cuemath.com/decimal-to-binary-formula/ and https://www.cuemath.com/numbers/decimal-to-binary/

image image image

Also, interestingly, see this below from the response. The steps are written within the body of the text:

"Steps that are\nused to convert decimal to the binary number using decimal to the binary\nformula are shown below,\nStep 1: Divide the given decimal number by 2, note down the remainder.\nStep 2: Now divide the quotient thus obtained in the above step by 2, note\ndown the remainder.\nStep 3: Repeat the above steps until we get 0 or 1 as a quotient.\nStep 4: Write down the last quotient in line with remainders from last to the\nfirst, this is our binary conversion of the given decimal number."

My question is: It's clear to me that BlenderBot is able to retrieve relevant websites and produce relevant search queries that contain the textual answers to specific questions but Blenderbot sometimes struggles with responding to the user with the specific answer of perhaps summarizing the appropriate text from a given webpage's results.

Do you have any insights on things that can be done to help fix this example retrieval situation in Blenderbot? Are there parameters that I can set to help this or a different way that I can train the model to gear it towards providing specific examples? I want to be able to minimize the hallucination of the chatbot and provide specific useful information while also retain an interactive, chatty chatbot.

Full text where the above snippet was produced from below:


[I 220516 13:53:37 agents:40] Sending new message: {'id': 'BlenderBot2Fid', 'episode_done': False, 'text': 'There are a lot of ways to do it, but the easiest way is to use a calculator.', 'beam_texts': [('There are a lot of ways to do it, but the easiest way is to use a calculator.', -8.013882637023926), ('There are a lot of ways to do it, but the simplest is to divide the number by two or three.', -8.590115547180176), ('There are a lot of ways to do it, but the simplest is to divide the number by two.', -8.667094230651855), ('There are a lot of ways to do it, but the easiest way is to use a calculator. ', -8.702324867248535), ('There are a lot of ways to do it, but the simplest is to divide it by two or three.', -8.71706771850586), ('There are a lot of ways to do it, but the simplest is to divide the number by two or four.', -8.735162734985352), ('There are a lot of ways to do it, but the most common is to divide the number by two or three.', -8.76321792602539), ('There are a lot of ways to do it, but the simplest is to divide it by two.', -8.763249397277832), ('There are a lot of ways to do it, but the simplest is to divide the number by two, then add one.', -9.101014137268066), ('There are a lot of ways to do it, but the most common is to divide the number by two, then add one.', -9.254731178283691)], 'top_docs': ['Binary to Decimal and How to Convert Binary to Decimal_0 | X\nRegister to download premium content!\n* Tutorials\n* AC Circuits\n* Amplifiers\n* Attenuators\n* Binary Numbers\n* Boolean Algebra\n* Capacitors\n* Combinational Logic\n* Counters\n* DC Circuits\n* Diodes\n* Electromagnetism\n* Filters\n* Inductors\n* Input/Output Devices\n* Logic Gates\n* Miscellaneous Circuits\n* Operational Amplifiers\n* Oscillator\n* Power Electronics\n* Power Supplies\n* RC Networks\n* Resistors\n* Sequential Logic\n* Systems\n* Transformers\n* Transistors\n* Waveform Generators\n* Premium content\n* Further Education\n* Sitemap\n* Contact Us\n* English\n* English\n* Deutsch\n* Polski\n* Log In\n* Register\nRegister to download premium content!\nX\n* Deutsch\n* Polski\n* Register\n* Log In\n* AC Circuits\n* Amplifiers\n* Attenuators\n* Binary Numbers\n* Boolean Algebra\n* Capacitors\n* Combinational Logic\n* Connectivity\n* Counters\n* DC Circuits\n* Diodes\n* Electromagnetism\n* Filters\n* Inductors\n* Input/Output Devices\n* Logic Gates\n* Miscellaneous Circuits\n* Operational Amplifiers\n* Oscillator\n* Power Electronics\n* Power Supplies\n* Premium\n* RC Networks\n* Resistors\n* Resources\n* Sequential Logic\n* Systems\n* Transformers\n* Transistors\n* Waveform Generators\n* Premium Content\n* Further Education\n* Sitemap\n* Contact Us\nHome / Binary Numbers / Binary to Decimal Conversion\n# Binary to Decimal Conversion\nBinary to Decimal Conversion of numbers uses weighted columns to identify the\norder of the digits to determine the final value of the number\nConversion of binary to decimal (base-2 to base-10) numbers and back is an\nimportant concept to understand as the binary numbering system forms the basis\nfor all computer and digital systems.\nThe decimal or "denary" counting system uses the Base-of-10 numbering system\nwhere each digit in a number takes on one of ten possible values, called\n"digits", from 0 to 9, eg. 21310 (Two Hundred and Thirteen).\nBut as well as having 10 digits ( 0 through 9 ), the decimal numbering system\nalso has the operations of addition ( + ), subtraction ( - ), multiplication (\n× ) and division ( ÷ ).\nIn a decimal system each digit', 'Decimal to Binary - Formula, Conversion, Table, Examples_0 | LearnPracticeDownload\n# Decimal to Binary\nDecimal to binary conversion is done through various methods. One of the\nmethods to convert decimal to binary is by dividing the given decimal number\nrecursively by 2. Then, the remainders are noted down till we get 0 as the\nfinal quotient. After this step, these remainders are written in reverse order\nto get the binary value of the given decimal number. A number system is a\nmathematical way of representing numbers using a set of digits or symbols.\nThere are different number systems like the decimal number system, the binary\nnumber system, the octal, and the hexadecimal number system. These are\nidentified with the help of the base that they have. Numbers can be easily\nconverted from one base to another using some defined rules.\n1. Decimal to Binary Conversion\n2. Decimal to Binary Table\n3. How to Convert Decimal to Binary?\n4. FAQs on Decimal to Binary\n## Decimal to Binary Conversion\nAll number systems have a base which is determined by the total number of\ndigits that are used in the number system. For example, the binary number\nsystem has a base of 2 since it uses only two digits to represent a number.\nSimilarly, the decimal number system has a base of 10, because it has 10\ndigits to represent a number. Let us understand the decimal number system and\nthe binary number system and then move on to the conversion of decimal to\nbinary.\n### Decimal Number System Definition\nThe decimal number system is a number system that represents a number with a\nbase of 10 and uses 10 symbols - 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.', 'Binary to Decimal - Conversion, Formula, Conversion Chart, Examples_0 | LearnPracticeDownload\n# Binary to Decimal\nBinary to decimal conversion is done to convert a number given in the binary\nnumber system to its equivalent value in the decimal number system. A number\nsystem is a format to represent numbers in a certain way. The binary number\nsystem is used in computers and electronic systems to represent data and it\nconsists of only two digits which are 0 and 1. The decimal number system is\nthe most commonly used number system around the world which is easily\nunderstandable to people. It consists of digits from 0 to 9. Binary to decimal\nconversion can be done in the simplest way by adding the products of each\nbinary digit with its weight (which is of the form - binary digit × 2 raised\nto a power of the position of the digit) starting from the right-most digit\nwhich has a weight of 20.\nBinary to decimal conversion can be done by two methods - the positional\nnotation method and the doubling method. Let us understand the different\nmethods for binary to decimal conversion.\n1. What is Binary to Decimal Conversion?\n2. Binary to Decimal Conversion Methods\n3. Binary to Decimal Formula\n4. Binary to Decimal Conversion Chart\n5. Binary to Decimal Converter\n6. FAQs on Binary to Decimal\n## What is Binary to Decimal Conversion?\nBinary to decimal conversion is done to represent a number given in Binary\nNumber System to its equivalent in the Decimal Number System. A number system\nis very essential to represent numbers. Every number system has a base and the\nbase of a number system is determined by the total number of digits used in\nthe number system. For example, the', 'What is Decimal to Binary Formula? Examples_0 | # Decimal to Binary Formula\nThe decimal to the binary formula is used to convert decimal numbers to binary\nnumbers. Decimal numbers can be easily converted into binary numbers by using\nthe remainder formula. In the method, we divide the given decimal number\nrecursively by 2 and note down the remainders until we get 0 or 1 as the\nquotient. We will learn more about the decimal to the binary formula along\nwith a few solved examples in the following section.\n## What is Decimal to Binary Formula?\nIn the formula to convert decimal to the binary method, we will perform\ndivision on the given decimal number recursively by 2 and note down the\nremainders till we have either 0 or 1 as the final quotient. Steps that are\nused to convert decimal to the binary number using decimal to the binary\nformula are shown below,\nStep 1: Divide the given decimal number by 2, note down the remainder.\nStep 2: Now divide the quotient thus obtained in the above step by 2, note\ndown the remainder.\nStep 3: Repeat the above steps until we get 0 or 1 as a quotient.\nStep 4: Write down the last quotient in line with remainders from last to the\nfirst, this is our binary conversion of the given decimal number.\nLet us have a look at a few solved examples to understand decimal to the\nbinary formula better.\nBreakdown tough concepts through simple visuals.\nMath will no longer be a tough subject, especially when you understand the\nconcepts through visualizations.\nBook a Free Trial Class\n## Solved Examples on Decimal to Binary Formula\nExample 1: Using decimal to binary formula, convert 29 decimal into', 'Remainder - Meaning, Formula, Properties, Examples_0 | LearnPracticeDownload\n# Remainder\nRemainder refers to the remaining part, after the completion of the division\nprocess. If we divide 5 pens among 4 children equally, we are left with 1 pen.\nThis example is translated into math, the remaining 1 pen is the remainder.\nAlso, if you divide the number 20, with a number 3, the quotient is 6 and the\nremainder is 2. The remainder is always lesser than the divisor.\nIn math, the remainder is something that is left over after the calculations.\nIn numerous instances, the remainders are ignored or rounded, to give only a\nwhole number answer. In the decimal number 5.02, the number 2 after the\ndecimal is the remainder and is sometimes ignored to give only the whole\nnumber answer 5. Let us learn more about remainder and its use in Mathematics\n1. What is Remainder in Division?\n2. Finding Remainder using Long Division?\n3. How to Represent Remainder?\n4. Properties of Remainder\n5. FAQs on Remainder\n## What is Remainder in Division?\nThe remainder, as its name suggests, is something that "remains" after\ncompleting a task. In math, the number 17 cannot be exactly divided by the\nnumber 3. After division, the number 2 is left aside as a remainder. As an\nexample, let us assume that you have 15 cookies that you want to share with 3\nof your friends, Mary, David, and Jake. You want to share the cookies equally\namong your friends and yourself. You will be distributing them in the\nfollowing way.\nHere, you can see that there are 3 cookies "remaining" after the distribution.\nThese 3 cookies cannot be further shared equally among the 4 of you. Hence, 3\nis called'], 'search_queries': 'how to convert a decimal number to binary number', 'metrics': {'clen': AverageMetric(396), 'ctrunc': AverageMetric(1), 'ctrunclen': AverageMetric(268)}}
fraziermatthew commented 2 years ago

Full conversation with the bot below: You what is a binary number

Model Binary number is a number that can be represented as a decimal or as binary.

You What are the components of the binary number system?

Model Binary numbers are represented by 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30

You What is the base of a number?

Model I'm not sure what you mean by base. Do you mean the number of digits in the sequence?

You When do you use binary numbers?

Model I don't think I've ever used them, but I know they're used in cryptography.

You What is the purpose of the binary number system?

Model It's just a way of representing numbers. It's the same as decimal numbers.

You How do I create a binary number from a decimal number?

Model There are two ways to do it. One is to convert a number to binary and then convert it back.

You What is an example of a binary number?

Model Binary numbers are numbers that are divisible by 2, 3, 4, or 5.

You What is a decimal number?

Model It's a number that can be divided into two, three, four, or five parts.

You What is the process of converting a decimal number to a binary number?

Model It's the same process as dividing a number into two parts, three parts, or four parts.

You Can you show me example how to convert a decimal number to binary number?

Model There are a lot of ways to do it, but the easiest way is to use a calculator.

klshuster commented 2 years ago

If I understand correctly, you're asking how to get BlenderBot (2) to condition its responses more on the documents than you have seen so far?

One way we've been able to fix this is through using different pre-trained models. You may find the BlenderBot2 400M model may base its answers more on the retrieved documents than the BlenderBot2 3B model.

Another way to fix this is to decompose the problem into separate steps (generating relevant knowledge, then subsequently generating a response). You can find more information in our SeeKeR project. These models are shown to have much higher proportion of their responses with information from the retrieved knowledge.

github-actions[bot] commented 2 years ago

This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.