Skip to content

DSL to facilitate the execution of the ToT framework for domain modeling

Notifications You must be signed in to change notification settings

BESSER-PEARL/dsl-tot-dm

Repository files navigation

Application of ToT to LLM-enabled DM

We propose a DSL to facilitate the configuration and automate the execution of the ToT framework based on the task decomposition required for a modeling process. The modeling process is divided by tasks, as shown in the following example:

  task: 
      level: 1
      name: "Classes"
      description: "A class represents objects that share a common structure and behavior."
      assessments:
          "Classes are retrieved from nouns in the domain description."
          "The principal concepts of the domain are represented in classes."
  task: 
      level: 2
      name: "Association"
      description: "Associate is used when a class is related to another."
      assessments:
          "Associations and cardinalities are included in the model."

Setup

Prerequisites

Request OpenAI or Azure keys to have access to the LLM API. Instructions are in the following links:

Create the .env file with the variables indicated in this file:

Run the project

  1. Install Python 3.11 and create a virtual environment
  2. Install the required packages:
    pip install -r requirements.txt
  3. Create your model, see the how-to section.
  4. Run the application with your model:
    python run.py --model ER_3lev.dmtot #Replace by your model name
  5. A log will capture all the thoughts created by the LLM for the task decomposition configured.

How to create a new model for the DSL

The DSL is created with TextX, and the concrete syntax follows a grammar with a structured format where a Model is composed of a Tree, a Problem, multiple Tasks, and a Notation.

Examples of Entity Relationships diagram, UML class diagram, UML activity diagram, and BPMN workflow diagram are located here.

Paper Experiments

The results of the experiments include the reference models and the output from the experiments. To run the experiments, use the input data with the domain descriptions and models. Then execute the experiment:

python run.py --model exercise2_asocclass_5lev.dmtot

About

DSL to facilitate the execution of the ToT framework for domain modeling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages