https://github.com/besser-pearl/tot-q
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: BESSER-PEARL
- Language: Python
- Default Branch: main
- Size: 2.12 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Towards Human-in-the-Loop LLM-enabled Domain Modeling
We propose to improve LLM-enabled domain model generation with a refinement loop. The workflow is organized in three main phases:
- Initial Modeling Phase: Start with a domain description to create a draft domain model.
- Iterative Improvement Phase: Refine the domain model via a Q&A feedback loop.
- Final Modeling Phase: Presents the domain model with changes incorporated from domain expert's answer.

The ToT-Q framework is supported by four components:
- ToT & Confidence Quantification – Creates the domain model using ToT4DM framework and estimates confidence of the recommended elements.
- Modeling Pattern Matching – Detects modeling patterns in the domain model and prepares relevant data for question generation.
- Question Generation & Selection – Generates questions from matched patterns using a rule-based agent, prioritizing the areas of uncertainty in the domain model.
- Model Refinement – Updates the domain model and confidence scores based on domain expert’s answers, until all questions are addressed or a limit is reached.
The ToT-Q tool is developed using the ToT4DM DSL tool and BESSER Agentic framework.
Setup
Prerequisites
Request OpenAI or Azure keys to have access to the LLM API. Instructions are in the following links:
To configure the ToT DSL: - Create the .env file as instructed in the Tot4DM repo. - Review the examples to configure the ToT4DM DSL.
To configure the BESSER Agentic framework: - Configure the config.ini file with the websocket options indicated in the BESSER Agentic framework docs.
How to configure templates
To configure the templates, you can modify the question variables in the following python file.
How to configure question triggers
Add in the .env file the following variables to configure the trigger of questions:
```python
Maximum number of questions in the Q&A loop
MAX_QUESTIONS = 10
Confidence threshold for asking questions
CONFIDENCE_THRESHOLD = 0.8 # Suggested range: (0.5, 0.9]
Confidence values used when updating the model based on expert answers
HIGHCONFIDENCE = 0.9 # Suggested range: (0.5, 1.0] LOWCONFIDENCE = 0.4 # Suggested range: [0.1, 0.5]
Expert simulation mode (0 = No simulation, 1 = Simulation)
SIMULATED_EXPERT = 1 ```
Run the project
- Install Python 3.11 and create a virtual environment
- Install the required packages:
sh pip install -r requirements.txt - Configure the templates and question triggers in the .env file.
- Run the rule-based agent (this agent call the LLM agents):
sh python tot_rules_q/rule_agent.py - Run the chat application:
sh python chat.py - A log will capture all the thoughts created by the LLM and questions triggered by the rule-based agent.
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. Then execute the experiment:
ssh
python tot_rules_q/rule_agent.py
python chat.py
Owner
- Name: BESSER-PEARL
- Login: BESSER-PEARL
- Kind: organization
- Email: jordi.cabot@list.lu
- Location: Luxembourg
- Repositories: 1
- Profile: https://github.com/BESSER-PEARL
GitHub Events
Total
- Watch event: 1
- Push event: 1
- Public event: 1
Last Year
- Watch event: 1
- Push event: 1
- Public event: 1
Dependencies
- Jinja2 ==3.1.4
- aiohttp ==3.11.12
- backoff ==2.2.1
- besser ==2.5.1
- besser-agentic-framework ==3.0.1
- dateparser ==1.1.8
- langdetect ==1.0.9
- nltk ==3.9.1
- numpy ==1.24.3
- numpy ==1.26.1
- openai ==1.30.5
- pandas ==2.1.1
- psycopg2-binary ==2.9.9
- python-dotenv ==1.0.1
- pyvis ==0.3.2
- requests ==2.31.0
- snowballstemmer ==2.2.0
- sqlalchemy ==2.0.29
- streamlit ==1.40.0
- streamlit-antd-components ==0.3.2
- text2num ==2.5.0
- textX ==4.0.1
- tree-of-thoughts-llm ==0.1.0
- websocket-client ==1.6.4
- websockets ==11.0.3