US 12,405,983 B1
Interacting with ontology-based databases using machine learning
Samuel Zhao, Brooklyn, NY (US); Sumedh Nikhil Shah, New York, NY (US); Donn Green, New York, NY (US); Alexander Morgan, New York, NY (US); Joshua Eimer, New York, NY (US); Maya Choudhury, Winter Park, FL (US); Raj Narayan, New York, NY (US); Sidney Packer, Jersey City, NJ (US); Amrit Krishnan, New York, NY (US); and Jake Brooks, Cherry Hill, NJ (US)
Assigned to Palantir Technologies Inc., Denver, CO (US)
Filed by Palantir Technologies Inc., Denver, CO (US)
Filed on Mar. 27, 2024, as Appl. No. 18/618,661.
Claims priority of provisional application 63/559,708, filed on Feb. 29, 2024.
Int. Cl. G06F 16/334 (2025.01); G06F 8/30 (2018.01)
CPC G06F 16/3344 (2019.01) [G06F 8/311 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method of processing queries of ontology-based databases, comprising:
obtaining a prompt indicating that when a user query satisfies a set of criteria, the user query is to be translated into a set of graph queries in a graph query language;
receiving a specific user query in natural language,
the specific user query leading to an update of an ontology and satisfying the set of criteria,
the ontology defining a plurality of object types of objects and a plurality of link types of links between objects,
the ontology including a set of objects instantiated from one or more object types of the plurality of object types and a set of links instantiated from one or more link types of the plurality of link types,
data of the ontology being stored in one or more databases, including a graph database;
incorporating the specific user query into the prompt to obtain an extended prompt;
executing, with the extended prompt, a first large language model (LLM) that accepts a query in natural language and generates code in one or more programming languages, including the graph query language;
obtaining, from the executing, a set of database queries including one or more graph queries in the graph query language to update one or more links in the ontology and one or more database queries to update metadata of the ontology;
submitting the set of database queries to a set of databases of the one or more databases to obtain a database query result;
transmitting the database query result in response to the specific user query,
wherein the method is performed by one or more processors.