Methods and systems for managing chatbots with respect to rare entities

Embodiments for managing chatbots are provided. A set of documents is received. A plurality of entities are identified within the set of documents. At least one of the plurality of entities is selected based on a rareness criteria. Contextual data associated with each of the selected at least one of the plurality of entities is identified within the set of documents. At least one question-answer (QA) pair associated with each of the selected at least one of the plurality of entities is generated based on the identified contextual data.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates in general to computing systems, and more particularly, to various embodiments for managing chatbots with respect to rare entities.

Description of the Related Art

Chatbots, also known as talkbots, chatterbots, bots, instant messaging (IM) bots, interactive agents, Artificial Conversational Entities (ACEs), voice response systems, etc., are computer nodes (i.e., devices and/or programs) or artificial intelligence modules which are able to, for example, conduct conversations with individuals (or users) and/or provide other types of functionality through auditory (e.g., speech/voice) or text-based methods. For example, with such systems equipped with “question answering” functionality (i.e., question answering systems), users may ask questions, and the system may respond based on its knowledge base and/or by analyzing the question, providing the best answer it can generate.

Question answering systems (or other chatbot-like systems that are configured to perform such functionality) are often make use of question-answer (QA) pairs to train (or generate) models that are utilized to train the system on how to respond to user inquiries and test the system. In some instances, thousands of QA pairs are required to train systems for particular domains (or topics, subjects, etc.). This process may be very labor and time intensive. This may be particularly true when attempting to generate valid and useful questions related to entities that are mentioned only a few times in a given corpus (i.e., collection of documents ingested to generate QA pairs).

SUMMARY OF THE INVENTION

Various embodiments for managing chatbots are provided. A set of documents is received. A plurality of entities are identified within the set of documents. At least one of the plurality of entities is selected based on a rareness criteria. Contextual data associated with each of the selected at least one of the plurality of entities is identified within the set of documents. At least one question-answer (QA) pair associated with each of the selected at least one of the plurality of entities is generated based on the identified contextual data.

In addition to the foregoing exemplary embodiment, various other system and computer program product embodiments are provided and supply related advantages. The foregoing Summary has been provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. The claimed subject matter is not limited to implementations that solve any or all disadvantages noted in the background.

DETAILED DESCRIPTION OF THE DRAWINGS

As discussed above, chatbots, also known as talkbots, chatterbots, bots, instant messaging (IM) bots, interactive agents, Artificial Conversational Entities (ACEs), voice response systems, etc., are computer nodes (i.e., devices and/or programs) or artificial intelligence modules which are able to, for example, conduct conversations with individuals (or users) and/or provide other types of functionality through auditory (e.g., speech/voice) or text-based methods. For example, with such systems equipped with “question answering” functionality (i.e., question answering systems), users may ask questions, and the system may respond based on its knowledge base and/or by analyzing the question, providing the best answer it can generate.

Question answering systems (or other chatbot-like systems that are configured to perform such functionality) are often make use of question-answer (QA) pairs to train (or generate) models that are utilized to train the system on how to respond to user inquiries and test the system. In some instances, thousands of QA pairs are required to train systems for particular domains (or topics, subjects, etc.). This process may be very labor and time intensive. This may be particularly true when attempting to generate valid and useful questions related to entities that are mentioned only a few times in a given corpus (i.e., collection of documents ingested to generate QA pairs).

To address these needs and/or the shortcomings in the prior art, in some embodiments described herein, methods and/or systems are disclosed that, for example, manage chatbots (and/or other similar systems) in such a way to improve the performance thereof and/or facilitate their training with respect to “rare” entities (e.g., entities that are referenced and/or mentioned less than a particular number of times in the given set of documents or corpus).

Although some embodiments described herein are referenced with respect to “chatbots” or “chatbot systems,” it should be understood that the methods and systems described herein may be applied to various types of computing systems to which a user provides a question, command, etc., and the system generates an answer or response. Other examples include, but are not limited to, question answering systems, talkbots, chatterbots, bots, instant messaging (IM) bots, interactive agents, Artificial Conversational Entities (ACEs), voice response systems, and search engines (e.g., Internet search engines).

In some embodiments, a corpus (e.g., one or more document, perhaps related to a particular domain) is received (or retrieved, identified, etc.) and processed (or “ingested”). In particular, entities (e.g., individuals, objects, locations, etc.) within the corpus are identified (or extracted), and perhaps labeled with an associated lexical entity type. “Rare” entities are then selected from the identified entities and used to generate questions and answers (or question-answer (QA) pairs) based on the context with which those entities are found within the corpus (e.g., contextual information associated with the rare entities within the corpus). In some embodiments, the methods and systems described herein focus on the automated generation of the questions/answers after ingestion of a corpus has been completed.

The methods and systems described herein may save a considerable amount of time with respect to the generation of QA pairs used to train, test, etc. chatbot-like systems for new domains. Additionally, the number of individuals needed to perform the manual task of reading documents and generating QA pairs may be reduced. Further, QA pairs are generated in a consistent manner, as opposed to having significant variations due to multiple, different individuals generating the QA pairs, and the quality of the questions (or OA pairs) may be improved due to an automated system creating the questions using a repeatable process without (or at least with reduced) human variation. Also, the methods and systems described herein may reduce the need for subject matter experts to generate questions with respect to particular domains.

More particularly, in some embodiments, a corpus is first identified, received, etc. and ingested/processed. During the ingestion, entities are extracted, and a “type” for each of the entities may be determined (e.g., based on contextual data within the corpus), as will be appreciated by one skilled in the art. The “frequency” of each of the entities within the corpus may also be determined. That is, the system may count (and/or keep track of) the number of references to (or mentions of) each of the entities (e.g., each time a name or other descriptor referring to an entity appears in the corpus).

In some embodiments, the entities are then evaluated against a “rareness” criterion (or criteria) and/or at least some of the entities are selected as rare entities within the corpus. For example, in some embodiments, rare entities are defined as those of the extracted entities that are referenced less than a first (or maximum) predetermined threshold and more than a second (or minimum) threshold. As a more specific example, the rare entities may be selected as portion (e.g., a percentage) of the least occurring entities within the corpus (e.g., if a total of 100 entities are identified, the 10 entities with the fewest references or the “bottom” 10% are selected as the rare entities), perhaps so long as those entities are referenced more than a minimum number of times (e.g., more than one reference). The rareness criteria may be a configurable setting (e.g., via a setting/preferences functionality).

In some embodiments, a list of the entities selected as rare entities is generated and provided to the user (e.g., rendered in a user interface, by a computing device, etc). The user may then be provided with the ability to adjust the selection of the rare entities (e.g., remove and/or add entities to the list). Also, the system may search the corpus for matches to the rare entities (e.g., regardless of whether or not the user adjusts the list of rare entities). For example, a “fuzzy” matching algorithm may be utilized, which may take into consideration entity types (e.g., if an entity discovered via the fuzzy matching is of a type different than that of the respective rare entity, it may not be considered a match). Additionally, any entities discovered utilizing the fuzzy matching that have high reference counts (e.g., higher than the rareness criteria) may be discarded (or the user may be provided with an opportunity to discard or keep such entities via the user interface).

In some embodiments, the system (also) generates a list of “near miss” rare entities, which may be utilized by the user to further adjust the rare entities for which QA pairs are generated. For example, if the initial identification of rare entities included entities that are referenced more than once in the corpus and less than the bottom n percent (e.g., 10%), the system may provide a list of entities that are referenced more than once and less than the bottom n+x percent (e.g., 10%+1%). The user may then opt whether or not to include such entities in the QA generation process.

After the list of rare entities is determined (perhaps including the user modifications described above), contextual data associated with each of the rare entities is identified within the corpus. It is then determined whether or not such contextual data indicates that a question (or query) may be asked (or submitted) with respect to the contextual data (e.g., whether or not a “who is . . . ,” “what is . . . ,” “how much . . . ,” “how many . . . ,” etc. question be asked about the entity).

One or more question that is answered by (or related to) the identified contextual data is then generated for each of the rare entities (or at least the rare entities for which appropriate contextual data is identified). In other words, one or more QA pair is generated for each rare entity (if possible). In some embodiments, this process includes capturing (or tracking/storing) the particular document from which each question (or QA pair) was generated. In some embodiments, if possible, additional/multiple forms of each question are generated (e.g., utilizing known question forms/templates, utilization of detected/available acronyms, etc.).

At least some of the aspects of functionality described herein may be performed utilizing a cognitive analysis (or machine learning technique). The cognitive analysis may include natural language processing (NLP) and/or natural language understanding (NLU) (or NLP/NLU technique, such classifying natural language, analyzing tone, and analyzing sentiment (e.g., scanning for keywords, key phrases, etc.) with respect to, for example, content (or data), communications sent to and/or received by users, and/or other available data sources. In some embodiments, Mel-frequency cepstral coefficients (MFCCs) (e.g., for audio content detected by a microphone), and/or region-based convolutional neural network (R-CNN) pixel mapping (e.g., for object detection/classification in images/videos), as are commonly understood, are used.

The processes described herein may utilize various information or data sources associated with entities, users, and/or content. For example, the data sources may include, but are not limited to, communication sessions and/or the content (or communications) thereof (e.g., chatbot interactions, phone calls, video calls, text messaging, emails, in person/face-to-face conversations, etc.), a profile of or basic information (e.g., job title, place of work, length of time at current position, family role, etc.), a schedule or calendar (i.e., the items listed thereon, time frames, etc.), projects (e.g., past, current, or future work-related projects), location (e.g., previous and/or current location), social media activity (e.g., posts, reactions, comments, groups, etc.), browsing history (e.g., web pages visited), and online purchases.

As such, in some embodiments, the methods and/or systems described herein may utilize a “cognitive analysis,” “cognitive system,” “machine learning,” “cognitive modeling,” “predictive analytics,” and/or “data analytics,” as is commonly understood by one skilled in the art. Generally, these processes may include, for example, receiving and/or retrieving multiple sets of inputs, and the associated outputs, of one or more systems and processing the data (e.g., using a computing system and/or processor) to generate or extract models, rules, etc. that correspond to, govern, and/or estimate the operation of the system(s), or with respect to the embodiments described herein, managing and/or training chatbots, as described herein. Utilizing the models, the performance (or operation) of the system (e.g., utilizing/based on new inputs) may be predicted and/or the performance of the system may be optimized by investigating how changes in the input(s) effect the output(s). Feedback received from (or provided by) users and/or administrators may also be utilized, which may allow for the performance of the system to further improve with continued use.

It should be understood that as used herein, the term “computing node” (or simply “node”) may refer to a computing device, such as a mobile electronic device, desktop computer, etc. and/or an application, such as a chatbot, an email application, a social media application, a web browser, etc. In other words, as used herein, examples of computing nodes include, for example, computing devices such as mobile phones, tablet devices, desktop computers, or other devices, such as appliances (IoT appliances) that are owned and/or otherwise associated with individuals (or users), and/or various applications that are utilized by such computing devices.

Additionally, although particular embodiments and examples described herein may describe chatbot systems as being utilized via spoken or audible communications (e.g., utterances), it should be understood that the methods and systems described herein may be applied to similar systems in which the communications are provided via text-based methods (e.g., using a keyboard). Further, it should be understood that the methods and systems described herein may be applicable to any computing system/device or application that performs various types of tasks (e.g., besides answering questions, conducting conversations, etc.) in response to receiving such communications, such as controlling IoT devices, playing media, placing online orders, etc.

In particular, in some embodiments, a method for managing a chatbot, by a processor, is provided. A set of documents is received. A plurality of entities are identified within the set of documents. At least one of the plurality of entities is selected based on a rareness criteria. Contextual data associated with each of the selected at least one of the plurality of entities is identified within the set of documents. At least one question-answer (QA) pair associated with each of the selected at least one of the plurality of entities is generated based on the identified contextual data.

The identifying of the plurality of entities may include determining a number of references to each of the plurality of entities within the set of documents. The selecting of the at least one of the plurality of entities based on the rareness criteria may include selecting those of the plurality of entities for which the number of references within the set of documents is less than a first predetermined threshold and greater than a second predetermined threshold.

The selecting of the at least one of the plurality of entities based on a rareness criteria may include associating a first of the plurality of entities with a second of the plurality of entities based on a fuzzy matching algorithm. The first of the plurality of entities may have a first number of references in the set of documents, and the second of the plurality of entities may have a second number of references in the set of documents. The second number of references may be added to the first number of references to calculate a composite number of references for the first of the plurality of entities. The composite number of references may be utilized to determine if the first of the plurality of entities meets the rareness criteria.

A user interface that allows a user to modify the selecting of the at least one of the plurality of entities may be provided. The identifying of the contextual data associated with the selected at least one of the plurality of entities within the set of documents may include identifying contextual data associated with the modified at least one of the plurality of entities. The generating of the at least one QA pair may include generating a QA pair associated with each of the modified at least one of the plurality of entities.

A chatbot system may be caused to be trained utilizing the generated at least one QA pair. Each of the plurality of entities may include at least one of an individual, an object, and a location.

Characteristics are as follows:

Service Models are as follows:

Deployment Models are as follows:

System memory28can include computer system readable media in the form of volatile memory, such as random access memory (RAM)30and/or cache memory32.

In the context of the present invention, and as one of skill in the art will appreciate, various components depicted inFIG. 1may be located in, for example, personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, mobile electronic devices such as mobile (or cellular and/or smart) phones, personal data assistants (PDAs), tablets, wearable technology devices, laptops, handheld game consoles, portable media players, etc., as well as computing systems in vehicles, such as automobiles, aircraft, watercrafts, etc. However, in some embodiments, some of the components depicted inFIG. 1may be located in a computing device in, for example, a satellite, such as a Global Position System (GPS) satellite. For example, some of the processing and data storage capabilities associated with mechanisms of the illustrated embodiments may take place locally via local processing components, while the same components are connected via a network to remotely located, distributed computing data processing and storage components to accomplish various purposes of the present invention. Again, as will be appreciated by one of ordinary skill in the art, the present illustration is intended to convey only a subset of what may be an entire connected network of distributed computing components that accomplish various inventive aspects collectively.

Referring now toFIG. 2, illustrative cloud computing environment50is depicted. As shown, cloud computing environment50comprises one or more cloud computing nodes10with which local computing devices used by cloud consumers, such as, for example, cellular (or mobile) telephone or PDA54A, desktop computer54B, laptop computer54C, and vehicular computing system (e.g., integrated within automobiles, aircraft, watercraft, etc.)54N may communicate.

Still referring toFIG. 2, nodes10may communicate with one another. They may be grouped (not shown) physically or virtually, in one or more networks, such as Private, Community, Public, or Hybrid clouds as described hereinabove, or a combination thereof. This allows cloud computing environment50to offer infrastructure, platforms and/or software as services for which a cloud consumer does not need to maintain resources on a local computing device. It is understood that the types of computing devices54A-N shown inFIG. 2are intended to be illustrative only and that computing nodes10and cloud computing environment50can communicate with any type of computerized device over any type of network and/or network addressable connection (e.g., using a web browser).

Device layer55as shown includes sensor52, actuator53, “learning” thermostat56with integrated processing, sensor, and networking electronics, camera57, controllable household outlet/receptacle58, and controllable electrical switch59as shown. Other possible devices may include, but are not limited to, various additional sensor devices, networking devices, electronics devices (such as a remote control device), additional actuator devices, so called “smart” appliances such as a refrigerator, washer/dryer, or air conditioning unit, and a wide variety of other possible interconnected devices/objects.

As previously mentioned, in some embodiments, methods and/or systems are provided for managing (and/or training) chatbots (or other similar systems). In some embodiments, a corpus (e.g., one or more document, perhaps related to a particular domain) is received (or retrieved, identified, etc.) and processed (or “ingested”). In particular, entities (e.g., individuals, objects, locations, etc.) within the corpus are identified (or extracted), and perhaps labeled with an associated lexical entity type. “Rare” entities are then selected from the identified entities and used to generate questions and answers (or question-answer (QA) pairs) based on the context with which those entities are found within the corpus (e.g., contextual information associated with the rare entities within the corpus).

FIG. 4illustrates an exemplary method (and/or system)400for managing chatbots according to an embodiment of the present invention. At block402, one or more documents (or a set of documents or corpus) is identified (or selected, received, retrieved, etc.) by, for example, a computing system (e.g., a cognitive module) performing the functionality described herein. The document(s) may include one or more of any type of suitable document, file, database, etc., such as unstructured documents, websites, word processing documents, spreadsheets, electronic communications (e.g., emails, text messages, etc.), audio/video files, etc., that may be accessed and/or is/are searchable by the computing system performing the functionality described herein.

At block404, the document(s) are ingesting and/or processed via, for example, a NLP or NLU technique, as is commonly understood. The processing of the documents may include identifying and/or extracting entities and determining a “type” for each entity. Entity types (and/or entities) may include, for example, persons/individuals, objects, locations/addresses, organizations, events, works of art, consumer goods, phone numbers, dates/times, number, prices, etc. In some embodiments, the processing of the documents also includes determining a frequency for each of the identified entities. That is, the system may count/keep track of the number of references to and/or mentions of each of the entities (perhaps accounting for spelling errors, typographical errors, appositives, pronouns, etc.), as will be appreciated by one skilled in the art.

At block406, rare entities are identified (or determined, selected, etc.) from the entities identified within the documents. As is described in greater detail below, rare entities may be defined and/or determined utilizing a rareness criterion (or criteria, algorithm, calculation, formula, etc.) that is based on entity frequency and/or mention count, perhaps combined with, for example, user input and the use of a matching algorithm.

At block408, context (or contextual data/information) associated with the rare entities (e.g., each of the rare entities if possible) is determined or identified within the documents. The contextual data may include terms, phrases, etc., such as nouns, noun phrases, verb, verb phrases, and other descriptors, that are found “near” or “around” mentions of the rare entities within the documents, which provide information or “context” about the entities. For example, contextual data may appear in the same sentence, phrase, paragraph, etc. as an entity mention and/or within a predetermined “distance” of an entity mention (e.g., based on word count, alphanumeric character count, appearance in the previous or next sentence, etc.). Also at block408, it may be determined whether or not the identified contextual data indicates a question or query that may be asked/posed related to the entity (e.g., “who is . . . ,” “what is . . . ,” “how much . . . ,” “how many . . . ,” etc.) and/or whether or not the contextual data includes any terms that could be used in such a question.

At block,410one or more question (or QA pair) associated with the rare entities (e.g., each of the rare entities, if possible) is generated. More specifically, question(s) may be generated based on the contextual data associated with the rare entities that was identified within the documents. In other words, questions are generated, which are answered by or within the identified contextual data associated with the rare entities. The type of question(s) generated may be determined by and/or based on entity type (i.e., the entity type of the rare entity and/or the entity type of any entity identified within the contextual data). Keywords, key phrases, etc. used or appearing in the questions may be captured or extracted from the contextual data found in the documents. In some embodiments, the system also identifies, tracks, and/or stores which particular document(s) within the corpus include the contextual data utilized to generate each question (or QA pair).

At block412, additional forms of the questions are generated. More specifically, in some embodiments, for each answer associated with a particular generated question, additional forms (or phrasings, wording, etc.) of the question are generated (and stored). This process may be performed utilizing, for example, known question templates and detection/identification of acronyms, as is commonly understood.

The generated question(s) (and answer(s)) (or QA pair(s)) may then be utilized to train a chatbot or other similar system with respect to, for example, the particular domain(s) associated with the corpus. It should be understood that in some embodiments, the methods and systems described herein may be utilized in combination with other techniques used to manage and/or train chatbots, including the generation of QA pairs associated with entities that appear more frequently in the corpus (e.g., non-rare entities), as is commonly understood. After such a system is trained, a user may provide a question (e.g., via text-based methods, voice commands, etc.), and the system may utilize the QA pairs to generate an answer or other response/reply (e.g., via displaying the answer/response on a display screen of a computing device, generating an aural response, etc.).

FIG. 5illustrates a method (and/or system)500for identifying and/or determining rare entities (e.g., from all of the entities identified within a given corpus) according to an embodiment of the present invention. In the example shown, the method500includes an initial rare entity determination (block502), an error correction process (block504), and a user validation process (block506). The method500shown inFIG. 5may be performed, for example, within (or by) block406shown inFIG. 4.

Still referring toFIG. 5, at block502, the initial rare entity determination (or identification) process is performed. As described above, the rare entity determination may be performed (automatically) utilizing a rareness criterion (or criteria) that is based on entity frequency and/or mention count. In some embodiments, one or more mention count thresholds are utilized. For example, the rare entities may be determined to be the entities that are mentioned less than a first (or maximum) threshold number of times and more than a second (or minimum) threshold number of times (e.g., one mention). As a more specific example, the rare entities may be selected as portion (e.g., a percentage, such as 10%) of the least occurring entities within the corpus, which may be combined with a minimum threshold. For example, if a total of 100 entities are identified within the corpus, the 10 entities with the fewest references (or the “bottom” 10%) may be determined to be rare entities, with entities that are mentioned only once in the corpus being discarded (or not included within the determined rare entities). In some embodiments, the manner in which the rare entities are initially determined/selected (or the rareness criteria) may be a configurable setting (e.g., via a setting/preferences functionality) so that the user(s) may adjust the initial determination of rare entities based on the particular application, personal preference, etc.

At block504, the error correction is performed. In some embodiments, the error correction process includes generating a list of the entities selected as rare entities (e.g., at block502) and providing the list to the user(s). For example, the list may be rendered or displayed utilizing a user interface (and/or computing device)508. The user may be provided with the ability to adjust the selection (or list) of rare entities utilizing the user interface (e.g., via an appropriate user input device, such as a keyboard, mouse, etc.). As one example, the user may determine that one or more of the entities included on the list as rare entities is invalid and/or insignificant and manually remove such entities from the list. Similarly, if there is one or more entity that the user determines should be included, which is not on the list, the user may add such to the list.

Also (e.g., at block504or elsewhere in the method), the system may search the corpus for matches to the rare entities (e.g., regardless of whether or not the user adjusts the list of rare entities). For example, a “fuzzy” matching algorithm (or any other suitable algorithm/technique) may be utilized, which may take into consideration entity types (e.g., if an entity discovered via the fuzzy matching is of a type different than that of the respective rare entity, it may not be considered a match). Additionally, any entities discovered utilizing the fuzzy matching that have high reference counts (e.g., higher than the rareness criteria) may be discarded (or the user may be provided with an opportunity to discard or keep such entities via the user interface).

Additionally, the matching may be utilized to generate “composite” mention/reference counts for entities. For example, the matching may be utilized to associate a first entity identified within the corpus to a second entity within the corpus. In such an instance, the mention/reference counts of the entities may be added, and the sum may be associated with either of the entities (e.g., while the other entity is discarded). This composite count may then be utilized to determine if the first and/or second entity should be considered a rare entity (e.g., by applying the rareness criteria to the composite mention count).

Still referring toFIG. 5, at block506, the user validation process is performed. In some embodiments, the user validation includes, for example, a list of “near miss” rare entities being generated and provided, which may be utilized by the user to further adjust (e.g., via the user interface508) the rare entities for which QA pairs are generated. For example, if the initial identification of rare entities included entities that are referenced more than once in the corpus and less than the bottom n percent (e.g., 10%), the system may provide a list of entities that are referenced more than once and less than the bottom n+x percent (e.g., 10%+1%). The user may then opt whether or not to include such entities in the QA generation process (e.g., via the user interface508). After the validation of the rare entities, the question (or QA pair) generation process may be performed as described above.

As one example of utilization of the methods and systems described herein, consider a domain related to a particular, exemplary organization, “Advanced Control Machines Enterprises” (or “ACME”). A corpus utilized to generate QA pairs may include research data from the organization (e.g., academic or scientific papers) and one or more website (or particular web page(s)) that includes information about the organization.

After identifying all of the entities within the corpus, the system may (e.g., utilizing the methods described above) determine the rare entities to include: Palo Alto, Calif. (or CA); Charlotte, N.C. (or NC); Knoxville, Tenn. (or TN); and Lenox, Mass. (or MA). The entity type for each of the rare entities may be determined to be “geopolitical entity” (or GPE) (or a location), as is commonly understood. Contextual data (or context) associated with the rare entities may include “ACME's principal offices and laboratories are located in Palo Alto, Calif.; Charlotte, N.C.; Knoxville, Tenn.; and Lenox, Mass.” Identified context terms may include “context_term_org: ACME” and “”context_term_thing: principal offices, laboratories.” Acronym conversion utilized may convert “ACME” to “Advanced Control Machines Enterprises.”

In such a scenario, the entity type and variations may be related to GPE. An applicable question template may include “Where is the {context_term_thing} located for {context_term_org}?” As a result, a generated QA pair may include the question “Where is the principal office for ACME?” and the answer “Palo Alto, Calif.; Charlotte, N.C.; Knoxville, Tenn.; and Lenox, Mass.” Additional forms or variations of the question may include, for example: “At what location is the principal office located for ACME?”; “At what location is the principal office located for Advanced Control Machines Enterprises?”; “Where is the principal office for ACME?”; “Where is the principal office for Advanced Control Machines Enterprises?”; “Where are ACME's labs at?”; “Where are ACME's laboratories?”; and “Where are ACME's laboratories located?”

As described above, such questions (or QA pairs) may be utilized to train chatbot-like systems, as well any other computing systems that are equipped with a question answering functionality (including Internet search engines).

Referring now toFIG. 6, an exemplary environment (e.g., computing environment or chatbot system)600, which may make use of the methods and systems described herein, is shown. The environment includes (and/or has therein) a computing device602, a speaker604, a cognitive module606, and a database608. The computing device602may be any suitable computing device in (and/or through) which a chatbot (or any other similar system, including search engines) may be implemented (and/or utilized). In the example shown, the computing device602is a mobile electronic device (e.g., a mobile phone). Although not shown, the computing device602may include a microphone that may be used to detect or receive utterances (e.g., questions, voice commands, communications, etc.) from a user610. However, it should be understood that in some embodiments communications may (also) be received through text-based methods (e.g., via a keyboard or touch pad on the computing device602).

The speaker604may be any suitable electro-acoustic transducer (or loudspeaker) that is configured to render auditory (or audible or aural) responses from the chatbot. Although shown as a separate component, it should be understood that the speaker604may be integrated with the computing device602, or another computing device, such as a desktop PC, audio system, smart television, etc.

The cognitive module606may include any suitable computing system or device that may be configured to any suitable processing on communications received from the user610(e.g., NLP processing, etc.). Although shown as a separate component (e.g., remotely located, on the “cloud,” etc.), the cognitive module606may be (at least partially) integrated with the computing device602. The cognitive module606is in operable communication (either directly or indirectly) with the computing device602, the speaker604, and the database608. The database608may include any suitable memory or storage device (e.g., on the cloud) for storing data related to, for example, generating answers for received questions (e.g., via a display screen on the computing device602and/or the speaker604) and/or performing other actions.

Turning toFIG. 7, a flowchart diagram of an exemplary method700for managing (or training) chatbots (or other similar systems) is provided. The method700begins (step702) with, for example, a set of documents (or a corpus, one or more documents, etc.) being selected to be utilized to train and/or generate QA pairs for a chatbot system.

The set of documents is received (or retrieved, identified, etc.) (step704). The document(s) may include one or more of any type of suitable document, file, database, etc., such as unstructured documents, websites, word processing documents, spreadsheets, electronic communications (e.g., emails, text messages, etc.), audio/video files, etc., that may be accessed (or received, etc.) and/or is searchable by the computing system performing the functionality described herein.

A plurality of entities are (or at least one entity is) identified within (and/or extracted from) the set of documents (step706). This process may include determining a “type” for each entity. The entities (and/or the entity types) may include, for example, persons/individuals, objects, locations/addresses, organizations, events, works of art, consumer goods, phone numbers, dates/times, number, prices, etc. In some embodiments, the processing of the documents also includes determining a frequency for each of the identified entities. For example, the system may count/keep track of the number of references to and/or mentions of each of the entities (perhaps accounting for spelling errors, typographical errors, appositives, pronouns, etc.), as will be appreciated by one skilled in the art.

At least one of the plurality of entities is selected based on a rareness criteria (or criterion) (step708). The selecting of the at least one of the plurality of entities based on the rareness criteria may include selecting those of the plurality of entities for which the number of references within the set of documents is less than a first predetermined threshold and greater than a second predetermined threshold. As a more specific example, the rare entities may be selected as portion (e.g., a percentage, such as 10%) of the least occurring entities within the corpus, which may be combined with a minimum threshold. For example, if a total of 100 entities are identified within the corpus, the 10 entities with the fewest references (or the “bottom” 10%) may be determined to be rare entities), with entities that are mentioned only once in the corpus being discarded (or not included within the determined/selected rare entities).

The selecting of the at least one of the plurality of entities based on a rareness criteria may include associating a first of the plurality of entities with a second of the plurality of entities based on a fuzzy matching algorithm. The first of the plurality of entities may have a first number of references in the set of documents, and the second of the plurality of entities may have a second number of references in the set of documents. The second number of references may be added to the first number of references to calculate a composite number of references for the first of the plurality of entities. The composite number of references may be utilized to determine if the first of the plurality of entities meets the rareness criteria.

Contextual data associated with each of the selected at least one of the plurality of entities is identified within the set of documents (step710). The contextual data may include terms, phrases, etc., such as nouns, noun phrases, verb, verb phrases, and other descriptors, that are found “near” or “around” mentions of the rare entities within the documents, which provide information or “context” about the entities. For example, contextual data may appear in the same sentence, phrase, paragraph, etc. as an entity mention and/or within a predetermined “distance” of an entity mention (e.g., based on word count, alphanumeric character count, appearance in the previous or next sentence, etc.).

At least one question-answer (QA) pair associated with each of the selected at least one of the plurality of entities (i.e., the rare entities) is generated based on the identified contextual data (step712). In other words, at least one question (or QA pairs) is generated, which is answered by or within the identified contextual data associated with the rare entities. The type of question(s) generated may be determined by and/or based on entity type (i.e., the entity type of the rare entity and/or the entity type of any entity identified within the contextual data). Keywords, key phrases, etc. used or appearing in the questions may be captured or extracted from the contextual data found in the documents. In some embodiments, the system also identifies, tracks, and/or stores which particular document(s) within the corpus include the contextual data utilized to generate each question (or QA pair). A chatbot system may then be caused to be trained utilizing the generated at least one QA pair.

In some embodiments, a user interface that allows a user to modify the selecting of the at least one of the plurality of entities (i.e., the rare entities) may be provided. The identifying of the contextual data associated with the selected at least one of the plurality of entities within the set of documents may include identifying contextual data associated with the modified at least one of the plurality of entities (i.e., the modified list of rare entities). The generating of the QA pair(s) may include generating a QA pair associated with each of the modified at least one of the plurality of entities.

Method700ends (step714) with, for example, the trained chatbot system being utilized. For example, a user may provide an utterance (e.g., a question) to the system, for which the system generates a response (or answer) based on the generated QA pair(s). In some embodiments, feedback from users may (also) be utilized to improve the performance of the system over time.