IP Library Granted Patent US 10,831,564
Granted Patent B2
US 10,831,564 · App. 15/843,126 · Granted Nov 10, 2020

Bootstrapping a conversation service using documentation of a rest API

Inventors: Carmine Dimascio (West Roxbury, MA); Benjamin L. Johnson (Baltimore City, MD); Florian Pinel (New York, NY)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F9/541G06F40/35G06F40/56G06N20/00G10L15/063G10L15/1815G10L15/22
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,831,564
App. No.
15/843,126
Granted
Nov 10, 2020
Kind
B2
Abstract

Systems, methods, and computer-readable media for constructing a conversation model using documentation of an application programming interface (API) are disclosed. The conversation model can be used to train a natural language classifier. API endpoints may be represented in the API documentation as (verb, resource, element) tuples. These tuples can be converted into intent and parameters of the API endpoints can be converted into entities. In addition, example utterances may be created for each intent. The conversation model can be generated using the intents, example utterances, and/or entities.

Claims (60)

1. A computer-implemented method for constructing a conversation model using documentation of an application programming interface (API), the method comprising:

generating a respective intent for each API endpoint in a set of API endpoints identified in the documentation of the API;

generating a respective set of utterance examples for each respective intent; and

generating the conversation model using each respective intent and each respective set of utterance examples; and

utilizing the conversation model to train a natural language classifier, the natural language classifier being used to classify an input utterance as corresponding to a particular API endpoint, wherein utilizing the conversation model to train the natural language classifier further comprises using positive training examples and negative training examples to train the natural language classifier.

2. The computer-implemented method of claim 1 , further comprising:

receiving the input utterance;

determining, using the trained natural language classifier, that the input utterance can be handled by the API;

determining, using the conversation model, a particular intent corresponding to the input utterance;

determining, using the conversation model, the particular API endpoint corresponding to the particular intent;

making a call to the particular API endpoint; and

generating a natural language API response to the input utterance.

3. The computer-implemented method of claim 2 , wherein utilizing the conversation model to train the natural language classifier comprises utilizing each respective set of utterance examples as the positive training examples.

4. The computer-implemented method of claim 1 , wherein generating the respective intent for each API endpoint comprises converting a respective resource of each API endpoint into the respective intent.

5. The computer-implemented method of claim 1 , further comprising generating a respective set of one or more entities for each API endpoint, wherein the conversation model is generated further based at least in part on each respective set of one or more entities.

6. The computer-implemented method of claim 5 , wherein generating a respective set of one or more entities for each API endpoint comprises converting a respective one or more parameters of each API endpoint into the respective set of one or more entities.

7. The computer-implemented method of claim 1 , wherein generating the conversation model comprises:

generating a top-level node in a conversation tree of the conversation model for each respective intent;

generating a respective set of one or more sub-nodes for each top-level node, wherein each sub-node corresponds to a mandatory input field; and

generating a respective terminal node corresponding to each top-level node and each respective set of one or more sub-nodes, wherein each respective terminal node stores a respective API endpoint to which the respective intent corresponds.

8. A system for constructing a conversation model using documentation of an application programming interface (API), the system comprising:

at least one memory storing computer-executable instructions; and

at least one processor configured to access the at least one memory and execute the computer-executable instructions to:

generate a respective intent for each API endpoint in a set of API endpoints identified in the documentation of the API;

generate a respective set of utterance examples for each respective intent;

generate the conversation model using each respective intent and each respective set of utterance examples; and

utilize the conversation model to train a natural language classifier, the natural language classifier being used to classify an input utterance as corresponding to a particular API endpoint, wherein utilizing the conversation model to train the natural language classifier further comprises using positive training examples and negative training examples to train the natural language classifier.

9. The system of claim 8 , wherein the at least one processor is further configured to execute the computer-executable instructions to:

receiving the input utterance;

determine, using the trained natural language classifier, that the input utterance can be handled by the API;

determine, using the conversation model, a particular intent corresponding to the input utterance;

determine, using the conversation model, the particular API endpoint corresponding to the particular intent;

make a call to the particular API endpoint; and

generate a natural language API response to the input utterance.

10. The system of claim 9 , wherein the at least one processor is further configured to utilize the conversation model to train the natural language classifier by executing the computer-executable instructions to utilize each respective set of utterance examples as the positive training examples.

11. The system of claim 8 , wherein the at least one processor is configured to generate the respective intent for each API endpoint by executing the computer-executable instructions to convert a respective resource of each API endpoint into the respective intent.

12. The system of claim 8 , wherein the at least one processor is further configured to execute the computer-executable instructions to generate a respective set of one or more entities for each API endpoint, and wherein the conversation model is generated further based at least in part on each respective set of one or more entities.

13. The system of claim 12 , wherein the at least one processor is configured to generate a respective set of one or more entities for each API endpoint by executing the computer-executable instructions to convert a respective one or more parameters of each API endpoint into the respective set of one or more entities.

14. The system of claim 8 , wherein the at least one processor is configured to generate the conversation model by executing the computer-executable instructions to:

generate a top-level node in a conversation tree of the conversation model for each respective intent;

generate a respective set of one or more sub-nodes for each top-level node, wherein each sub-node corresponds to a mandatory input field; and

generate a respective terminal node corresponding to each top-level node and each respective set of one or more sub-nodes, wherein each respective terminal node stores a respective API endpoint to which the respective intent corresponds.

15. A computer program product for constructing a conversation model using documentation of an application programming interface (API), the computer program product comprising a storage medium readable by a processing circuit, the storage medium storing instructions executable by the processing circuit to cause a method to be performed, the method comprising:

generating a respective intent for each API endpoint in a set of API endpoints identified in the documentation of the API;

generating a respective set of utterance examples for each respective intent;

generating the conversation model using each respective intent and each respective set of utterance examples; and

utilizing the conversation model to train a natural language classifier, the natural language classifier being used to classify an input utterance as corresponding to a particular API endpoint, wherein utilizing the conversation model to train the natural language classifier further comprises using positive training examples and negative training examples to train the natural language classifier.

16. The computer program product of claim 15 , the method further comprising:

receiving the input utterance;

determining, using the trained natural language classifier, that the input utterance can be handled by the API; determining, using the conversation model, a particular intent corresponding to the input utterance;

determining, using the conversation model, the particular API endpoint corresponding to the particular intent;

making a call to the particular API endpoint; and

generating a natural language API response to the input utterance.

17. The computer program product of claim 16 , wherein utilizing the conversation model to train the natural language classifier comprises utilizing each respective set of utterance examples as the positive training examples.

18. The computer program product of claim 15 , wherein generating the respective intent for each API endpoint comprises converting a respective resource of each API endpoint into the respective intent.

19. The computer program product of claim 15 , the method further comprising generating a respective set of one or more entities for each API endpoint, wherein the conversation model is generated further based at least in part on each respective set of one or more entities.

20. The computer program product of claim 15 , wherein generating the conversation model comprises:

generating a top-level node in a conversation tree of the conversation model for each respective intent;

generating a respective set of one or more sub-nodes for each top-level node, wherein each sub-node corresponds to a mandatory input field; and

generating a respective terminal node corresponding to each top-level node and each respective set of one or more sub-nodes, wherein each respective terminal node stores a respective API endpoint to which the respective intent corresponds.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 15, 2017
From: DIMASCIO, CARMINE; JOHNSON, BENJAMIN L.; PINEL, FLORIAN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 044407/0679 →
Continuity (1)
Related Publication 20190188056A1 · Jun 20, 2019
Cited By (1)
US 12,321,708