# US 2019/0171758 A1 · Generating a chatbot from an faq

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0171758 A1
- Document ID: US20190171758A1
- Status: Published application
- Kind: A1
- Application number: 15/832,192
- Filed: 2017-12-05
- Published: 2019-06-06
- Earliest claimed: 2017-12-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Florian Pinel; Donna K. Byron; Carmine Dimascio; Benjamin L. Johnson
- Web page: https://patentgrep.com/patent/US20190171758A1

## CPC

- G06F 16/3329: Natural language query formulation
- G06F 16/2246: {Trees, e.g. B+trees}
- G06N 3/006: based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
- G06N 5/02: Knowledge representation; Symbolic representation
- G06N 20/00: Machine learning
- H04L 51/02: using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A chatbot answer database can be generated from a question and answer document. A question/answer processor can receive a document that includes questions and answers. A set of entities can be determined from the answers in the document. A set of triplets can be constructed from the answers, and stored in a chatbot database. For each answer, the question/answer processor can determine text for slots of the triplet based on the entities extracted from the answer. The triplet can be stored as a tree structure in a database of tree structures associated with the document. A chatbot can receive questions, and provide answers based on the database of tree structures associated with the document.

## Claims

### Claim 1

A method for generating a chatbot from a question and answer document, the method comprising:
receiving, by one or more processors, at least one document comprising a plurality of questions and a plurality of answers to the plurality of questions;
determining, by the one or more processors, a plurality of entities in the plurality of answers to the plurality of questions; and
for an answer of the plurality of answers:
determining, by the one or more processors, text for slots of a triplet based, at least in part, on one or more entities extracted from the answer, and
storing, by the one or more processors, the triplet as a tree structure in a database of tree structures associated with the at least one document.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining a set of one or more focus entities from the plurality of entities;
determining if the triplet includes a focus entity of the set of one or more focus entities; and
in response to determining that the triplet does not contain a focus entity, discarding the triplet.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
determining if a first slot of the triplet comprises a focus entity of the set of one or more focus entities; and
in response to determining that the first slot of the triplet does not comprise a focus entity, rewriting the triplet so that the first slot of the triplet is the focus entity.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
disambiguating an entity to produce text for a slot of the triplet.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
flattening the answer to create a plurality of concepts, wherein a first concept is used for the triplet and a second concept is used for at least one additional triplet.

### Claim 6 (depends on 1)

The method of claim 1, wherein storing the triplet as the tree structure in the database of tree structures includes storing a focus entity as a top level node of the tree structure.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
receiving, by the one or more processors, a question;
creating, by the one or more processors, a question triplet from the question;
determining, by the one or more processors, if an answer triplet in the database of tree structures is a match to the question triplet; and
providing an answer response to the question in response determining that the answer triplet matches the question triplet.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
determining that two slots of the question triplet match two slots of the answer triplet; and
providing answer text associated with the answer triplet in response determining that the two slots of the question triplet match the two slots of the answer triplet.

### Claim 9 (depends on 7)

The method of claim 7, further comprising:
determining that one slot of the question triplet matches one slot a plurality of answer triplets;
presenting the plurality of answer triplets to a user;
receiving an indication of a user selection of the plurality of answer triplets; and
providing answer text associated with the selected answer triplet.

### Claim 10

A machine readable storage medium including computer executable instructions that, when executed by one or more processors, cause the one or more processors to perform operations for generating a chatbot from a question and answer document, the operations comprising:
receive at least one document comprising a plurality of questions and a plurality of answers to the plurality of questions;
determine a plurality of entities in the plurality of answers to the plurality of questions; and
for an answer of the plurality of answers:
determine text for slots of a triplet based, at least in part, on one or more entities extracted from the answer, and
store the triplet as a tree structure in a database of tree structures associated with the at least one document.

### Claim 11 (depends on 10)

The machine readable storage medium of claim 10, wherein the operations further comprise:
determine a set of one or more focus entities from the plurality of entities;
determine if the triplet includes a focus entity of the set of one or more focus entities; and
in response to a determination that the triplet does not contain a focus entity, discard the triplet.

### Claim 12 (depends on 11)

The machine readable storage medium of claim 11, wherein the operations further comprise:
determine if a first slot of the triplet comprises a focus entity of the set of one or more focus entities; and
in response to a determination that the first slot of the triplet does not comprise a focus entity, rewrite the triplet so that the first slot of the triplet is the focus entity.

### Claim 13 (depends on 10)

The machine readable storage medium of claim 10, wherein the operations further comprise:
store answer text associated with the answer used to create the triplet in the database; and
associate the answer text with the triplet in the database.

### Claim 14 (depends on 10)

The machine readable storage medium of claim 10, wherein the operations to store the triplet as the tree structure in the database of tree structures includes operations to store a focus entity as a top level node of the tree structure.

### Claim 15 (depends on 10)

The machine readable storage medium of claim 10, wherein the operations further comprise:
receive a question;
create a question triplet from the question;
determine if an answer triplet in the database of tree structures is a match to the question triplet; and
provide an answer response to the question in response determining that the answer triplet matches the question triplet.

### Claim 16

A system for generating a chatbot from a question and answer document, the system comprising:
one or more processors; and
a machine readable storage medium including a computer program product having computer executable instructions that, when executed by the one or more processors, perform operations comprising:
receive at least one document comprising a plurality of questions and a plurality of answers to the plurality of questions;
determine a plurality of entities in the plurality of answers to the plurality of questions; and
for an answer of the plurality of answers:
determine text for slots of a triplet based, at least in part, on one or more entities extracted from the answer, and
store the triplet as a tree structure in a database of tree structures associated with the at least one document.

### Claim 17 (depends on 16)

The system of claim 16, wherein the operations further comprise:
determine a set of one or more focus entities from the plurality of entities;
determine if the triplet includes a focus entity of the set of one or more focus entities; and
in response to a determination that the triplet does not contain a focus entity, discard the triplet.

### Claim 18 (depends on 17)

The system of claim 17, wherein the operations further comprise:
determine if a first slot of the triplet comprises a focus entity of the set of one or more focus entities; and
in response to a determination that the first slot of the triplet does not comprise a focus entity, rewrite the triplet so that the first slot of the triplet is the focus entity.

### Claim 19 (depends on 16)

The system of claim 16, wherein the operations to store the triplet as the tree structure in the database of tree structures includes operations to store a focus entity as a top level node of the tree structure.

### Claim 20 (depends on 16)

The system of claim 16, wherein the operations further comprise:
receive a question;
create a question triplet from the question;
determine if an answer triplet in the database of tree structures is a match to the question triplet; and
provide an answer response to the question in response determining that the answer triplet matches the question triplet.
