How I taught ChatGPT

For many years I have been developing event semantics [1, 2]event logic [3]activity description language specifications, and the Event Flow architecture [4], on the basis of which the semantic workflow engine is built. All this grew out of the idea of ​​a subject-event approach to modeling complex systems. [5]which can be conditionally considered the engineering successor of the philosophical temporal ontology [6, 7].

And so, some time ago, I decided to conduct an experiment and teach ChatGPT to create and execute event models. I’ll tell you the result right away: I did it, although not without a headache, with constant begging, tips, reminders … But in order.

The mentioned Event Flow engine works with event semantic models that describe the entities or actions of any subject area. It swallows the next model event (according to the conditions specified in this event) and either builds a screen form field based on it, if the value needs to be received from a person, or performs a request to existing data, eventually creating a new subject event. Thus, after executing all the events of one model, we get an individual of an entity or action, and in fact, a fragment of business logic is executed. (The Appendix has a few words about event semantics from ChatGPT itself).

What was required from ChatGPT? (1) Remember the event recording format; (2) master the syntax for initiating properties and acts, the rules for building models and creating individuals; (3) to learn how to build models from a textual description and (4) when providing specific values ​​in a textual form, to create individuals. At the same time, which is essential, the model may have queries for the values ​​of already created individuals.

All this ChatGPT with grief in half, but learned (I will write about the problems below). And so, in the end, I ask him to create a person model with one property “name”, a document model with the properties “title”, “document text” and an act “signed”, but only on the condition that the name and text of the document have already been entered, and the meaning of the act should not change. I get the result (the syntax is slightly simplified, but functionally accurate):

I propose to generate two persons and two documents from the models (he came up with the values ​​himself):

Next, we create a report model for documents with him (the request format in my specification was different – the one that he himself suggested in the example):

And the last chord – I ask you to add one more person, one document (here I set the values ​​myself) and create a report:

Here is ChatGPT’s full answer in a translation made by him (the text was practically not edited):

ChatGPT: The following steps can be followed to create models and individuals:

1. Model creation: The first step is to create models for the entities to be used. In this case, the person, document, and report models. Each model defines the attributes and relationships that entities of that type have.

2. Creation of individuals: after the models have been defined, individuals can be created based on these models. In this case, persons, documents, and report individuals are created, each of which has specific values ​​for its attributes.

3. Queries in the report model: The report model uses queries to retrieve relevant information from document individuals and persons. Queries are used to retrieve the eid (entity identifier) ​​of individual documents, the name of each document in the list, and the number of documents in the list. These queries allow you to automatically generate a report using information about individuals.

Once the models and individuals have been created, a report can be generated by querying the information stored in the individuals. The report will contain a list of documents, including the name of the document, the person who signed the document, and the number of documents in the list.”

Next, I try to spin it into a description of the ideal option for working with action models, but it got stuck, and it went into unconsciousness, they say, “I am an AI language model and can only provide written text based on the information provided to me“. However, a reminder and a direct question once again help.

Here is the translation of the answer:

ChatGPT: I, as a language model, have been trained on huge corpora of textual data and have learned to generate text based on the patterns and relationships present in this data. When you describe a complex event model with attributes, relationships, actions, and conditions, I use my understanding of event structure and my ability to generate text to transform the description into a formal representation, such as the colonized event ontology syntax.

When you provide specific values ​​in your query, I can use that information to create new individuals based on existing models, replacing the placeholders in the view with the specified values. In this way, I can help you create new individuals in a structured and organized way, following the given patterns.

I clarify: “that is, it turns out that if you have several event models in memory (with conditions and queries), as well as many individuals created according to the models, then you, in fact, will be able to execute the business logic described by these models as a workflow engine , but without involving the program code, only using the values ​​of attributes and properties that are passed to you by the text, right?”.

ChatGPT: Yes, it is true. Theoretically, if you have several event models with conditions and queries, and a set of entity individuals created from the models, I can effectively act as a workflow engine without the need for programming. Instead, I will only rely on attribute and property values ​​passed to me via text, using my understanding of event and entity models to perform the necessary logic.

Like this.

And now my comment. First about the problems. First, the current version of ChatGPT remembers what you told it only for the duration of the session. If you closed the page, you have to start all over from scratch. Secondly, even during one session, ChatGPT can hallucinate. In our case, he continually came up with his own syntax, added new properties to the model at his discretion, and so on. True, after pointing out mistakes, he apologized, rewrote everything correctly and promised to be more attentive in the future. And oddly enough, he sometimes succeeded. Plus, there is a proven method of dealing with arbitrariness – you need to add examples with the correct record format to each request. And one more piece of advice: requests can be written in Russian (he understands well), but ask for answers in English. So he answers faster, more fully and more accurately.

Well, about the main thing – about the result. First of all, ChatGPT understands perfectly well what they want from it (both in Russian and in English). And even if he is mistaken, he fantasizes, he still does it strictly on the topic. But this is a common place that everyone has already tested. What did my case with him show?

Firstly, ChatGPT can quite correctly use not only the knowledge that was fed to it with tons of texts, but also the unique ones obtained during the session, which he did not know about before. In fact, he learned a new semantic language for describing the subject area and was able to create models on it based on a textual description. And this means that calling ChatGPT a “statistical parrot” is not good. He learns practically from one show, although, of course, you cannot call him a diligent student.

Secondly, and most importantly, ChatGPT demonstrated and himself explained to us that he is able not only to create models according to a text description (just like he writes code in programming languages ​​known to him), but also to execute these models himself. Now it took a lot of effort, but there is no doubt that with some refinement (mainly related to the provision of long-term memory), ChatGPT will be able to build business logic models on the fly, request data from external sources, process them by models, issue analytics, that is, to do what my Event Flow engine written by the programmer is doing now.

And the conclusion here is curious: ChatGPT, or rather, its future more advanced version (maybe not from OpenAI), will press programmers not because it will generate code for them according to the text description of the algorithm, but because this code will not be used by anyone. will be needed – the bot itself will be able to fulfill the request. Just write what to do, indicate where the data is, and get the result. And what’s under the hood is none of our human business. Although, of course, you can require a verifiable report, for example, in the language of event ontology.

Application

ChatGPT: An event ontology is one of the forms of activity description, which is focused on tracking changes in the state of entities and their relationships in the system. It allows you to consistently and in detail track changes in the system and their impact on other entities and processes. Adding acts will make it more complete and detailed for describing activities. They describe the actions that take place in the system and change the state of individuals or create new individuals. In an event ontology, acts are described in the same format as other events, with an identifier, act name, values, and conditions.

Literature

  1. Boldachev A.V. Event ontology vs object ontology. URL: https://habr.com/en/post/706916/

  2. Boldachev A.V. Acts, classes and semantic sugar. URL: https://habr.com/ru/post/708026/

  3. Boldachev A.V.. Semantics of event logic. URL: http://philosophystorm.org/node/18820

  4. Boldachev A.V. Architecture based on event semantics. open systems. DBMS, No. 03, 2021.

  5. Boldachev A.V. Subject-event approach to modeling complex systems. URL: https://habr.com/ru/post/256509/

  6. Boldachev A.V. Temporality and philosophy of absolute relativism. — M.: URSS, 2011

  7. Boldachev A.V. Introduction to temporal ontology // Who makes philosophy in Russia today. Volume III / Author and compiler A. S. Nilogov. – M .: Sam Polygraphist LLC, 2015

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *