| CPC G06F 16/211 (2019.01) [G06F 16/215 (2019.01); G06F 16/2365 (2019.01); G06F 16/24564 (2019.01)] | 28 Claims |

|
1. A method of database constraint generation executed by at least one processor on at least one computing device and accessing one or more large language models (LLMs), the method comprising:
(i) accessing a database and retrieving at least one from data and/or metadata from the database,
(ii) generating prompts to be answered by the one or more LLMs, wherein at least one prompt is generated from a parameterized prompt by replacing parameters in the parameterized prompt with concrete values,
(iii) interacting with the one or more LLMs by sending the generated prompts to the one or more LLMs, receiving prompt-answers from the one or more LLMs, and analyzing the prompt-answers,
(iv) obtaining intelligence about a nature of data and relationships in the database or in a sub-structure of the database by automatically performing data intelligence information processing for gathering verbal descriptions of structural database elements and providing the verbal descriptions to the one or more LLMs, the data intelligence information processing comprising generating one or more data-intelligence prompts of prompt types selected from a set of prompt types comprising:
(a) prompts containing retrieved data from the database to inform one or more LLMs about the nature of the data and the relationships contained in the database or the database sub-structure,
(b) prompts that use one or more retrieved metadata items from the database to inform one or more LLMs about the nature of the data and the relationships contained in the database, and
(c) prompts that ask for one or more natural-language descriptions of at least one from database elements and/or database schema elements, wherein the at least one from database elements and/or database schema elements, when the database is relational, comprises data relations and attributes, the one or more natural-language descriptions to be used within subsequently generated prompts, and
(v) generating, using one or more parameterized prompts, at least one database constraint, the at least one database constraint belonging to at least one constraint class from a set of constraint classes comprising:
(a) attribute-domain restrictions that restrict the possible domain values of attributes of entities, when the database is a relational database the possible domain values of attributes of a data relation, the constraint class of attribute-domain restrictions comprising constraint of constraint types comprising:
semantic attribute-domain restrictions that restrict data items or data values to be of a certain semantic category, the category being expressed in natural language, and
syntactic attribute-value constraints, that express restrictions to attribute-values, the restrictions being syntactically verifiable or checkable,
(b) when the database is relational, intra-relational constraints that express data dependencies within a data table or data relation, and
(c) when the database is relational, inter-relational data dependencies that express data dependencies between different data relations.
|