Domain specific intelligence using natural language
Techniques for generating a result for a search query. These techniques include identifying a complex search query including more than two parameters, dividing the complex search query into one or more components, and determining an intent for each of the one or more components using machine learning (ML), the ML including at least one of: a large language model (LLM) or natural language processing (NLP) neural network. The techniques further include generating a result for the search query based on routing each component through a pipeline using the respective intent, the pipeline including both a query against a graph database and a search against a vector database.
1 . A method, comprising:
identifying a complex search query comprising more than two parameters;
dividing the complex search query into a first component and a second component;
determining a first intent for the first component by processing the first component using machine learning (ML), the ML comprising at least one of: a large language model (LLM) or natural language processing (NLP) neural network;
determining a second intent for the second component by processing the second component using the ML; and
generating a result for the complex search query, comprising routing the first and second components through a pipeline based on the first and second intents, comprising:
based on the first intent for the first component, generating and executing a query against a graph database; and
based on the second intent for the second component, generating and executing a search against a vector database.
2 . The method of claim 1 , wherein determining the first intent for the first component comprises using both the LLM and the NLP neural network.
3 . The method of claim 2 , wherein determining the first intent comprises:
validating one or more intents determined using the LLM against one or more intents determined using the NLP neural network.
4 . The method of claim 1 , further comprising:
enhancing the complex search query, comprising:
conducting a fuzzy search using one or more terms in the complex search query.
5 . The method of claim 4 , wherein enhancing the complex search query further comprises:
removing one or more terms from the complex search query.
6 . The method of claim 1 , wherein generating the result for the complex search query based on routing the first and second components through the pipeline based on the first and second intents further comprises:
identifying, for the second component, a next step in the pipeline based on a current step in the pipeline and the second intent.
7 . The method of claim 6 , wherein identifying the next step in the pipeline comprises:
generating a graph database query based on the current step in the pipeline and the second intent.
8 . The method of claim 7 , comprising:
generating the graph database query using an LLM.
9 . The method of claim 6 , wherein identifying the next step in the pipeline is further based on data generated during a previous step in the pipeline.
10 . The method of claim 1 , wherein the parameters comprise both a temporal parameter and a domain-specific vernacular parameter.
11 . A non-transitory computer program product comprising:
one or more non-transitory computer readable media containing, in any combination, computer program code that, when executed by operation of any combination of one or more processors, performs operations comprising:
identifying a complex search query comprising more than two parameters;
dividing the complex search query into a first component and a second component;
determining a first intent for the first component using by processing the first component using machine learning (ML), the ML comprising at least one of: a large language model (LLM) or natural language processing (NLP) neural network;
determining a second intent for the second component by processing the second component using the ML; and
generating a result for the complex search query, comprising routing the first and second components through a pipeline based on the first and second intents, comprising:
based on the first intent for the first component, generating and executing a query against a graph database; and
based on the second intent for the second component, generating and executing a search against a vector database.
12 . The non-transitory computer program product of claim 11 , wherein determining the first intent for the first component comprises using both the LLM and the NLP neural network.
13 . The non-transitory computer program product of claim 11 , the operations further comprising:
enhancing the complex search query, comprising at least one of:
conducting a fuzzy search using one or more terms in the complex search query; or
removing one or more terms from the complex search query.
14 . The non-transitory computer program product of claim 11 , wherein generating the result for the complex search query based on routing the first and second components through the pipeline based on the the first and second intents further comprises:
identifying, for the second component, a next step in the pipeline based on a current step in the pipeline and the second intent.
15 . The non-transitory computer program product of claim 14 , wherein identifying the next step in the pipeline comprises:
generating a graph database query based on the current step in the pipeline and the second intent.
16 . A system, comprising:
one or more processors; and
one or more memories storing a program, which, when executed on any combination of the one or more processors, performs operations, the operations comprising:
identifying a complex search query comprising more than two parameters;
dividing the complex search query into a first component and a second component;
determining a first intent for the first component by processing the first component using machine learning (ML), the ML comprising at least one of: a large language model (LLM) or natural language processing (NLP) neural network;
determining a second intent for the second component by processing the second component using the ML; and
generating a result for the complex search query, comprising routing the first and second components through a pipeline based on the first and second intents, comprising:
based on the first intent for the first component, generating and executing a query against a graph database; and
based on the second intent for the second component-of the one, generating and executing a search against a vector database.
17 . The system of claim 16 , wherein determining the first intent for the first component comprises using both the LLM and the NLP neural network.
18 . The system of claim 16 , the operations further comprising:
enhancing the complex search query, comprising at least one of:
conducting a fuzzy search using one or more terms in the complex search query; or
removing one or more terms from the complex search query.
19 . The system of claim 16 , wherein generating the result for the complex search query based on routing the first and second components through the pipeline based on the first and second intents further comprises:
identifying, for the second component, a next step in the pipeline based on a current step in the pipeline and the second intent.
20 . The system of claim 19 , wherein identifying the next step in the pipeline comprises:
generating a graph database query based on the current step in the pipeline and the second intent.