Pre-emptive graph search for guided natural language interactions with connected data systems
Abstract
Techniques are disclosed to provide guided natural language interactions with a connected data system, such as a graph database. In various embodiments, natural language input associated with a graph database query associated with a graph data set is received. The natural language input is processed to generate a set of candidate strings. At least a subset of the candidate strings is mapped to an entity in the graph data set. The entity and data comprising the graph data are used set to determine a candidate graph pattern associated with the graph database query. The candidate graph pattern is used to guide a user associated with the natural language input to refine the graph database query.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A system, comprising:
a memory configured to store a graph data set;
a display device configured to display a displayed user interface configured to receive natural language input associated with a graph database query associated with the graph data set, the natural language input including at least one string comprising a partially-entered word entered by a user in a query input field comprising the displayed user interface; and
a processor coupled to the memory and the display device interface and configured to:
process the natural language input to generate a set of candidate strings;
programmatically map at least a subset of the candidate strings to an entity in the graph data set;
use the entity and data comprising the graph data set to determine a candidate graph pattern to be included in the graph database query, including by inserting into the candidate graph pattern additional node patterns or relationship patterns from the graph data set when the natural language input does not conform to the structure of the candidate path pattern;
sort the candidate graph pattern in a ranked order; and
use the candidate graph pattern to guide the user associated with the natural language input to refine the graph database query at least in part by displaying to the user a graph representation of the candidate graph pattern in the ranked order via a displayed user interface element selectable by the user to select the candidate graph pattern;
wherein the candidate graph pattern comprises a partially formed query represented at least in part as a punctuation-less path pattern including the plain text labels of a pattern that includes the entity in the graph data set, the pattern being expressed without graph query language punctuation; and
wherein the processor is further configured to maintain a bilateral mapping between the candidate graph pattern as represented by the punctuation-less path pattern and a corresponding representation of the candidate graph pattern expressed with graph query language punctuation, the corresponding representation of the candidate graph pattern expressed with graph query language punctuation being usable by a graph database system to perform a query with which the candidate graph pattern is associated.
2. The system of claim 1 , wherein the natural language input is received via a network communication from a remote client system with which the graph database query is associated.
3. The system of claim 1 , wherein processing the natural language input includes one or more of stemming, grouping, stop word elimination, spelling correction, and term expansion.
4. The system of claim 1 , wherein the processor is configured map at least a subset of the candidate strings to the entity in the graph data set at least in part by using an index to locate one or more entities having a label or attribute value that matches a string in the at least a subset of the candidate strings.
5. The system of claim 1 , wherein the processor is configured map at least a subset of the candidate strings to an entity in the graph data set at least in part by stemming a label or attribute value in the graph data and matching the stem to a string in the at least a subset of the candidate strings.
6. The system of claim 1 , wherein the processor is configured to use the entity and data comprising the graph data set to determine a candidate graph pattern associated with the graph database query at least in part by using the entity as a starting point and exploring paths that exist in the graph database and which include the starting point.
7. The system of claim 6 , wherein the entity comprises a first entity and the processor is further configured to determine the candidate graph pattern at least in part by mapping a next part of the natural language input to a value associated with one or both of a relationship and a node comprising the candidate graph pattern.
8. The system of claim 1 , wherein the punctuation-less path pattern representation of the candidate graph pattern that includes text corresponding to one or both of entities and relationships in the graph database but omits at least a part of punctuation characters associated with a corresponding graph database query language representation of the candidate graph pattern.
9. The system of claim 1 , wherein using the candidate graph pattern to guide the user associated with the natural language input to refine the graph database query includes displaying a graphical representation of the candidate graph pattern to the user via an interactive interface that enables the user to select the graphical representation of the candidate graph pattern to indicate the candidate graph pattern corresponds to the user's intent.
10. A method, comprising:
storing a graph data set in a memory;
receiving via a displayed user interface natural language input associated with a graph database query associated with the graph data set, the natural language input including at least one string comprising a partially-entered word entered by a user in a query input field comprising the displayed user interface;
processing the natural language input to generate a set of candidate strings;
programmatically mapping at least a subset of the candidate strings to an entity in the graph data set;
using the entity and data comprising the graph data set to determine a candidate graph pattern to be included in the graph database query, including by inserting into the candidate graph pattern additional node patterns or relationship patterns from the graph data set when the natural language input does not conform to the structure of the candidate path pattern;
sorting the candidate graph pattern in a ranked order; and
using the candidate graph pattern to guide a user associated with the natural language input to refine the graph database query at least in part by displaying to the user a graph representation of the candidate graph pattern in the ranked order via a displayed user interface element selectable by the user to select the candidate graph pattern;
wherein the candidate graph pattern comprises a partially formed query represented at least in part as a punctuation-less path pattern including the plain text labels of a pattern that includes an entity in the graph data set, the pattern being expressed without graph query language punctuation; and
further comprising maintaining a bilateral mapping between the candidate graph pattern as represented by the punctuation-less path pattern and a corresponding representation of the candidate graph pattern expressed with graph query language punctuation, the corresponding representation of the candidate graph pattern expressed with graph query language punctuation being usable by a graph database system to perform a query with which the candidate graph pattern is associated.
11. The method of claim 10 , wherein processing the natural language input includes one or more of stemming, grouping, stop word elimination, spelling correction, and term expansion.
12. The method of claim 10 , wherein the at least a subset of the candidate strings is mapped to the entity in the graph data set at least in part by using an index to locate one or more entities having a label or attribute value that matches a string in the at least a subset of the candidate strings.
13. The method of claim 10 , wherein the at least a subset of the candidate strings is mapped to the entity in the graph data set at least in part by stemming a label or attribute value in the graph data and matching the stem to a string in the at least a subset of the candidate strings.
14. The method of claim 10 , wherein using the entity and data comprising the graph data set to determine a candidate graph pattern associated with the graph database query includes using the entity as a starting point and exploring paths that exist in the graph database and which include the starting point.
15. The method of claim 14 , wherein the entity comprises a first entity and the candidate graph pattern is determined at least in part by mapping a next part of the natural language input to a value associated with one or both of a relationship and a node comprising the candidate graph pattern.
16. A method, comprising:
storing a graph data set in a memory;
receiving via a displayed user interface natural language input associated with a graph database query associated with the graph data set, the natural language input including at least one string comprising a partially-entered word entered by a user in a query input field comprising the displayed user interface;
processing the natural language input to generate a set of candidate strings;
programmatically mapping at least a subset of the candidate strings to an entity in the graph data set;
using the entity and data comprising the graph data set to determine a candidate graph pattern to be included in the graph database query, including by inserting into the candidate graph pattern additional node patterns or relationship patterns from the graph data set when the natural language input does not conform to the structure of the candidate path pattern;
sorting the candidate graph pattern in a ranked order; and
using the candidate graph pattern to guide a user associated with the natural language input to refine the graph database query at least in part by displaying to the user a graph representation of the candidate graph pattern in the ranked order via a displayed user interface element selectable by the user to select the candidate graph pattern;
wherein the candidate graph pattern comprises a partially formed query represented at least in part as a punctuation-less path pattern including the plain text labels of a pattern that includes an entity in the graph data set, the pattern being expressed without graph query language punctuation; and
further comprising maintaining a bilateral mapping between the candidate graph pattern as represented by the punctuation-less path pattern and a corresponding representation of the candidate graph pattern expressed with graph query language punctuation, the corresponding representation of the candidate graph pattern expressed with graph query language punctuation being usable by a graph database system to perform a query with which the candidate graph pattern is associated.
17. The computer program product of claim 16 , wherein processing the natural language input includes one or more of stemming, grouping, stop word elimination, spelling correction, and term expansion.
18. The computer program product of claim 16 , wherein the at least a subset of the candidate strings is mapped to the entity in the graph data set at least in part by using an index to locate one or more entities having a label or attribute value that matches a string in the at least a subset of the candidate strings.
19. The computer program product of claim 16 , wherein the at least a subset of the candidate strings is mapped to the entity in the graph data set at least in part by stemming a label or attribute value in the graph data and matching the stem to a string in the at least a subset of the candidate strings.
20. The computer program product of claim 16 , wherein using the entity and data comprising the graph data set to determine a candidate graph pattern associated with the graph database query includes using the entity as a starting point and exploring paths that exist in the graph database and which include the starting point.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.