IP Library › Granted Patent US 10,388,285
Granted Patent B2
US 10,388,285 · App. 15/692,410 · Granted Aug 20, 2019

Generating chat bots from web API specifications

Inventors: Martin Hirzel (Ossining, NY); Louis Mandel (New York, NY); Avraham E. Shinnar (Hawthorne, NY); Jerome Simeon (New York, NY); Mandana Vaziri (White Plains, NY); Charles Wiecha (Lexington, MA)
Assignee: International Business Machines Corporation
G10L17/22G06F8/30G06F8/35G10L15/22G06F16/24522G06F16/90332G06F17/27G06N3/0427H04L51/02H04L51/046
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,388,285
App. No.
15/692,410
Granted
Aug 20, 2019
Kind
B2
Abstract

Automatic generation of a chat bot from an API specification to carry out a dialog with a user and invoke an API call described in the API specification. Based on input API specification, a conversational bot specification representing a dialog flow is constructed. A natural language expression is received and transformed into instructions based on the conversational bot specification. Based on the instructions, a natural language prompt to the user and executable computer code for invoking the API call may be generated.

Claims (40)

1. A method of automatically generating a conversational bot for an application programming interface (API), the method executed by at least one hardware processor, the method comprising:

receiving an API specification associated with an API, the API specification specifying at least information associated with invoking an API call, the information providing at least an operation parameter associated with invoking the API call;

parsing the API specification;

based on parsing the API specification, constructing a conversational bot specification specifying at least a conversational bot's dialog flow, wherein the conversational bot's dialog flow is created dynamically based on the information associated with invoking the API call, to conduct a natural language dialog with a user for facilitating a use of the API, wherein the conversational bot's dialog flow that is dynamically created can be different based on receiving a different API specification;

receiving a natural language expression from a user;

based on the conversational bot specification, transforming the natural language expression into instructions;

generating a natural language prompt based on the instructions responsive to determining that the instructions contain a prompt to present to the user; and

executing a computer code to invoke the API call based on the instructions responsive to determining that the instructions contain executing the API call.

2. The method of claim 1 , wherein the receiving of the natural language expression from the user, the transforming of the natural language expression into instructions, the generating of the natural language prompt and the presenting of the natural language prompt to the user, are repeated based on the conversational bot specification to carry on a dialogue flow for invoking the API call.

3. The method of claim 1 , wherein the computer code to invoke the API call comprises a hypertext transfer protocol (HTTP) call to a service endpoint providing a service associated with the API call.

4. The method of claim 1 , wherein the API specification comprises a web API specification.

5. The method of claim 1 , wherein the method further comprises presenting the natural language prompt to the user responsive to generating the natural language prompt.

6. The method of claim 1 , wherein the constructing the conversational bot specification comprises constructing a finite state machine (FSM) comprising a plurality of states and state transitions, the finite state machine specifying a dialogue flow for the conversational bot, wherein the transforming of the natural language expressions into instructions comprises transforming the natural language expression into symbols at least based on a natural language processing and transforming the symbols into the instructions based on the FSM, wherein symbols comprise entities representing objects in the natural language expression and an intent representing a purpose in the natural language expression.

7. The method of claim 1 , wherein the conversational bot specification comprises invoking multiple API calls, wherein the multiple API calls are invoked in a single dialogue.

8. A computer readable storage medium storing a program of instructions executable by a machine to perform a method of automatically generating a conversational bot for an application programming interface (API), the method comprising:

receiving an API specification associated with an API, the API specification specifying at least information associated with invoking an API call, the information providing at least an operation parameter associated with invoking the API call;

parsing the API specification;

based on parsing the API specification, constructing a conversational bot specification specifying at least a conversational bot's dialog flow, wherein the conversational bot's dialog flow is created dynamically based on the information associated with invoking the API call, to conduct a natural language dialog with a user for facilitating a use of the API wherein the conversational bot's dialog flow that is dynamically created can be different based on receiving a different API specification;

receiving a natural language expression from a user;

based on the conversational bot specification, transforming the natural language expression into instructions;

generating the natural language prompt based on the instructions responsive to determining that the instructions contain a prompt to present to the user; and

executing a computer code to invoke the API call based on the instructions responsive to determining that the instructions contain executing the API call.

9. The computer readable storage medium of claim 8 , wherein the receiving of the natural language expression from the user, the transforming of the natural language utterance into instructions, the generating of the natural language prompt and the presenting of the natural language prompt to the user, are repeated based on the conversational bot specification to carry on a dialogue flow for invoking the API call.

10. The computer readable storage medium of claim 8 , wherein the computer code to invoke the API call comprises a hypertext transfer protocol (HTTP) call to a service endpoint providing a service associated with the API call.

11. The computer readable storage medium of claim 8 , wherein the API specification comprises a web API specification.

12. The computer readable storage medium of claim 8 , wherein the method further comprises presenting the natural language prompt to the user responsive to generating the natural language prompt.

13. The computer readable storage medium of claim 8 , wherein constructing the conversational bot specification comprises constructing a finite state machine (FSM) comprising a plurality of states and state transitions, the finite state machine specifying a dialogue flow for the conversational bot, wherein the transforming of the natural language expressions into instructions comprises transforming the natural language expression into symbols at least based on a natural language processing and transforming the symbols into the instructions based on the FSM, wherein the symbols comprise entities representing objects in the natural language utterance and an intent representing a purpose in the natural language utterance.

14. The computer readable storage medium of claim 8 , wherein the conversational bot specification comprises invoking multiple API calls, wherein the multiple API calls are invoked in a single dialogue.

15. A system of automatically generating a conversational bot for an application programming interface (API), comprising:

at least one hardware processor;

a memory device coupled to the at least one hardware processor;

the at least one hardware processor operable to receive an API specification associated with an API, the API specification specifying at least information associated with invoking an API call, the information providing at least an operation parameter associated with invoking the API call;

the at least one hardware processor operable to parse the API specification;

based on parsing the API specification, the at least one hardware processor operable to construct a conversational bot specification specifying at least a conversational bot's dialog flow, wherein the conversational bot's dialog flow is created dynamically based on the information associated with invoking the API call, to conduct a natural language dialog with a user for facilitating a use of the API wherein the conversational bot's dialog flow that is dynamically created can be different based on receiving a different API specification and store the conversational bot specification on the memory device;

the at least one hardware processor operable to receive a natural language expression from a user; based on the conversational bot specification, the at least one hardware processor operable to transform the natural language expression into instructions; the at least one hardware processor operable to generate the natural language prompt based on the instructions responsive to determining that the instructions contain a prompt to present to the user; and the at least one hardware processor operable to execute a computer code to invoke the API call based on the instructions responsive to determining that the instructions contain executing the API call.

16. The system of claim 15 , wherein the at least one hardware processor is operable to repeat receiving of the natural language expression from the user, transforming of the natural language expression into instructions, and generating of the natural language prompt, based on the conversational bot specification to carry on the dialogue flow for invoking the API call.

17. The system of claim 15 , wherein the computer code to invoke the API call comprises a hypertext transfer protocol (HTTP) call to a service endpoint providing a service associated with the API call.

18. The system of claim 15 , wherein the API specification comprises a web API specification and the API call comprises a Representational State Transfer call.

19. The system of claim 15 , wherein the at least one hardware processor operable to present the natural language prompt to the user responsive to generating the natural language prompt.

20. The system of claim 15 , wherein constructing the conversational bot specification comprises constructing a finite state machine (FSM) comprising a plurality of states and state transitions, the finite state machine specifying a dialogue flow for the conversational bot, wherein transforming of the natural language expressions into instructions comprises transforming the natural language expression into symbols at least based on a natural language processing and transforming the symbols into the instructions based on the FSM, wherein the symbols comprise entities representing objects in the natural language utterance and an intent representing a purpose in the natural language utterance.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2017
From: HIRZEL, MARTIN; MANDEL, LOUIS; SHINNAR, AVRAHAM E.; SIMEON, JEROME; VAZIRI, MANDANA; WIECHA, CHARLES
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 043464/0271 →
Continuity (1)
Related Publication 20190066694A1 · Feb 28, 2019
Cited By (4)
US 12,254,334 US 12,592,899 US 12,688,849 US 12,749,038