RecGen: No-Coding Shell of Rule-Based Expert System with Digital Twin and Capability-Driven Approach Elements for Building Recommendation Systems
Source abstract
Abstract
Translating knowledge into formal representation for the purpose of building an expert system is a daunting task for domain experts and requires information technology (IT) competence and software developer support. The availability of open and robust expert system shells is a way to solve this task. A new architecture of a rule-based expert system combining the digital twin paradigm and a capability-driven approach is presented in this study. The aim of the architecture is to provide a user-friendly framework for domain experts to build upon without the need to delve into technical aspects. To support this architecture, an open-source no-coding shell RecGen has been developed (Python and Django framework). RecGen was validated on a use case of an expert system for providing recommendations to reduce plate waste in schools. In addition, the article presents experiments with large language models (LLMs) by implementing a question-answering functionality in an attempt to improve the user experience while working with large expert system knowledge bases. A mean classification accuracy of 74.1% was achieved experimentally using the injection method with language prefixes. The ablation test was applied in order to investigate the effect of augmentation, injection, a linear layer size, and lowercase text on LLM accuracy. However, the analysis of the results showed that clustering algorithms would be a more suitable solution for future improvements of the expert system shell RecGen.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Big Data and Business Intelligence · Economic and Technological Systems Analysis · Advanced Research in Systems and Signal Processing
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Engineering Centre, Rezekne Academy of Riga Technical University, LV-4601 Rezekne, Latvia
Centre for Economics and Governance, Rezekne Academy of Riga Technical University, LV-4601 Rezekne, Latvia
Funding
Latvian Council of Science
References (63)
Show source-provided references
1. Ioshchikhes, B., Frank, M., and Weigold, M. (2024). A Systematic Review of Expert Systems for Improving Energy Efficiency in the Manufacturing Industry. Energies, 17.10.20944/preprints202408.1783.v2 ↗
2. Industrial Expert Systems Review: A Comprehensive Analysis of Typical Applications10.1109/ACCESS.2024.3419047 ↗
3. Rule-Based Systems10.1145/4284.4286 ↗
4. Sydenham, P.H., and Thorn, R. (2005). Rule-Based Expert Systems. Handbook of Measuring System Design, John Wiley & Sons, Ltd.10.1002/0471497398 ↗
5. Colmerauer, A., and Roussel, P. (1996). The Birth of Prolog. History of Programming Languages—II, ACM.10.1145/234286.1057820 ↗
6. Hudgick, J.A.T. (1987). A Comparative Study of Four Major Knowledge Representation Techniques Used in Expert Systems with an Implementation Prolog. [Master’s Thesis, Rochester Institute of Technology]. Available online: https://repository.rit.edu/cgi/viewcontent.cgi?article=1581&context=theses.
7. Merritt, D. (1989). Using Prolog’s Inference Engine. Springer Compass International, Springer.10.1007/978-1-4613-8911-8_2 ↗
8. Bratko, I. (1986). Prolog Programming for Artificial Intelligence, Addison-Wesley Publishing Company.
9. Kahtan, H., Zamli, K.Z., Wan Ahmad Fatthi, W.N.A., Abdullah, A., Abdulleteef, M., and Kamarulzaman, N.S. (2018, January 8–10). Heart Disease Diagnosis System Using Fuzzy Logic. Proceedings of the 2018 7th International Conference on Software and Computer Applications (ICSCA ’18), Kuantan, Malaysia.10.1145/3185089.3185118 ↗
10. Fantahun, Z. (2025, August 30). Application of Data Mining with Knowledge Based System for Diagnosis and Treatment of Cattle Diseases: The Case of International Livestock Research Institute (ILRI) Animal Health Center Addis Ababa. Available online: http://repository.smuc.edu.et/handle/123456789/6429.
11. Expert Systems Applied to Plant Disease Diagnosis: Survey and Critical View10.1109/TLA.2016.7483534 ↗
12. A Data-Driven and Knowledge-Based Decision Support System for Optimized Construction Planning and Control10.1016/j.autcon.2025.106066 ↗
13. Palazzo, L., Dolcini, G., Claudi, A., Biancucci, G., Sernani, P., Ippoliti, L., Salladini, L., and Dragoni, A.F. (August, January 30). Spyke3D: A New Computer Games Oriented BDI Agent Framework. Proceedings of the CGAMES’2013 USA, Louisville, KY, USA.10.1109/CGames.2013.6632604 ↗
14. Applications and Analysis of Expert Systems: Literature Review10.21608/bjas.2023.203708.1146 ↗
15. ACRES: A Framework for (Semi)Automatic Generation of Rule-based Expert Systems with Uncertainty from Datasets10.1111/exsy.13723 ↗
16. Stirna, J., Grabis, J., Henkel, M., and Zdravkovic, J. (2012). Capability Driven Development—An Approach to Support Evolving Organizations. Lecture Notes in Business Information Processing, Springer.10.1007/978-3-642-34549-4_9 ↗
17. The Risk-Based Management Control System: A Stakeholders’ Perspective to Design Management Control Systems
18. Digital Twins in Smart Farming10.1016/j.agsy.2020.103046 ↗
19. (2025, September 21). Flpp GitHub—Flpp20191/RecGen. Available online: https://github.com/flpp20191/RecGen.
20. Kodors, S., Zvaigzne, A., Litavniece, L., Lonska, J., Silicka, I., Kotane, I., and Deksne, J. (2022). Plate Waste Forecasting Using the Monte Carlo Method for Effective Decision Making in Latvian Schools. Nutrients, 14.10.3390/nu14030587 ↗
21. Prescriptive Maintenance for Complex Products with Digital Twin Considering Production Planning and Resource Constraints10.1088/1361-6501/aced5f ↗
22. Béné, C., and Devereux, S. (2023). The Global Food System Is Not Broken but Its Resilience Is Threatened. Resilience and Food Security in a Food Systems Context, Palgrave Macmillan.10.1007/978-3-031-23535-1 ↗
23. Dury, S., Bendjebbar, P., Hainzelin, E., Giordano, T., and Bricas, N. (2019). Food Systems at Risk: New Trends and Challenges.10.19182/agritrop/00080 ↗
24. HLPE (2014). Food Losses and Waste in the Context of Sustainable Food Systems. A Report by the High Level Panel of Experts on Food Security and Nutrition of the Committee on World Food Security and Nutrition, Available online: https://www.fao.org/cfs/cfs-hlpe/publications/hlpe-8/en.
25. (2025, January 09). LIFE FOSTER Home Page. Available online: https://www.lifefoster.eu/major-challenges-of-the-world-food-system/.
26. FAO (2011). Global Food Losses and Food Waste—Extent, Causes and Prevention, Food and Agriculture Organization of the United Nations.
27. Food Waste at School. The Environmental and Cost Impact of a Canteen Meal10.1016/j.wasman.2019.09.027 ↗
28. Quantification of Food Waste in School Canteens: A Mass Flow Analysis10.1016/j.resconrec.2020.105176 ↗
29. Conserving Natural Resources through Food Loss Reduction: Production and Consumption Stages of the Food Supply Chain10.1016/j.iswcr.2018.06.002 ↗
30. Yahia, E.M., and Mourad, M. (2019). Food Waste at the Consumer Level. Preventing Food Losses and Waste to Achieve Food Security and Sustainability, Burleigh Dodds Science Publishing.10.19103/AS.2019.0053 ↗
31. Eurostat (2024). Food Waste and Food Waste Prevention—Estimates. Statistics Explained, Eurostat. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Food_waste_and_food_waste_prevention_-_estimates.
32. Towards More Sustainable Food Systems. Addressing Food Waste at School Canteens10.1016/j.appet.2018.06.022 ↗
33. Lonska, J., Kodors, S., Deksne, J., Litavniece, L., Zvaigzne, A., Silicka, I., and Kotane, I. (2025). Reducing Plate Waste in Latvian Schools: Evaluating Interventions to Promote Sustainable Food Consumption Practices. Foods, 14.10.3390/foods14010126 ↗
34. Prescott, M.P., Burg, X., Metcalfe, J.J., Lipka, A.E., Herritt, C., and Cunningham-Sabo, L. (2019). Healthy Planet, Healthy Youth: A Food Systems Education and Promotion Intervention to Improve Adolescent Diet Quality and Reduce Food Waste. Nutrients, 11.10.3390/nu11081869 ↗
35. Närvänen, E., Mesiranta, N., Mattila, M., and Heikkinen, A. (2020). Assumptions About Consumers in Food Waste Campaigns: A Visual Analysis. Food Waste Management: Solving the Wicked Problem, Springer International Publishing.10.1007/978-3-030-20561-4 ↗
36. Testing Interventions to Reduce Food Waste in School Catering10.1016/j.resconrec.2021.105997 ↗
37. The Effectiveness of Canteen Manager Audit and Feedback Reports and Online Menu-Labels in Encouraging Healthier Food Choices within Students’ Online Lunch Orders: A Pilot Cluster Randomised Controlled Trial in Primary School Canteens in New South Wales, Australia10.1016/j.appet.2021.105856 ↗
38. Serebrennikov, D., Katare, B., Kirkham, L., and Schmitt, S. (2020). Effect of Classroom Intervention on Student Food Selection and Plate Waste: Evidence from a Randomized Control Trial. PLoS ONE, 15.10.1371/journal.pone.0226181 ↗
39. Chu, C.-M., Chih, C., and Teng, C.-C. (2023). Food Waste Management: A Case of Taiwanese High School Food Catering Service. Sustainability, 15.10.3390/su15075947 ↗
40. Participant Perspectives on the Impact of a School-Based, Experiential Food Education Program across Childhood, Adolescence, and Young Adulthood10.1016/j.jneb.2023.10.012 ↗
41. Elnakib, S.A., Quick, V., Mendez, M., Downs, S., Wackowski, O.A., and Robson, M.G. (2021). Food Waste in Schools: A Pre-/Post-Test Study Design Examining the Impact of a Food Service Training Intervention to Reduce Food Waste. Int. J. Environ. Res. Public Health, 18.10.3390/ijerph18126389 ↗
42. Gardner, G., Burton, W., Sinclair, M., and Bryant, M. (2023). Interventions to Strengthen Environmental Sustainability of School Food Systems: Narrative Scoping Review. Int. J. Environ. Res. Public Health, 20.10.3390/ijerph20115916 ↗
43. The Impact of a Portion Plate on Plate Waste in a University Dining Hall
44. Food Waste Reduction and Economic Savings in Times of Crisis: The Potential of Machine Learning Methods to Plan Guest Attendance in Swedish Public Catering during the Covid-19 Pandemic10.1016/j.seps.2021.101041 ↗
45. Autonomous Dishwasher Loading from Cluttered Trays Using Pre-trained Deep Neural Networks10.1002/eng2.12321 ↗
46. Automated Quantification Tool to Monitor Plate Waste in School Canteens10.1016/j.resconrec.2023.107288 ↗
47. University Restaurants Menu Planning Using Mathematical Modelling
48. Reducing Food Waste in the HORECA Sector Using AI-Based Waste-Tracking Devices10.1016/j.wasman.2025.02.044 ↗
49. Zhang, Y., Jin, H., Meng, D., Wang, J., and Tan, J. (2025). A Comprehensive Survey on Process-Oriented Automatic Text Summarization with Exploration of LLM-Based Methods. arXiv.
50. Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y., Sun, J., Wang, M., and Wang, H. (2024). Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv.
51. Laudon, K.C., and Laudon, J.P. (2010). Management Information Systems: Managing the Digital Firm, Pearson Education. [11th ed.]. Chapter 11.4.
52. How Short or Long Should Be a Questionnaire for Any Research? Researchers’ Dilemma in Deciding the Appropriate Questionnaire Length10.4103/sja.sja_163_21 ↗
53. Wu, L., Zheng, Z., Qiu, Z., Wang, H., Gu, H., Shen, T., Qin, C., Zhu, C., Zhu, H., and Liu, Q. (2023). A Survey on Large Language Models for Recommendation. arXiv.10.1007/s11280-024-01291-2 ↗
54. Liu, P., Zhang, L., and Gulla, J.A. (2023). Pre-train, Prompt and Recommendation: A Comprehensive Survey of Language Modelling Paradigm Adaptations in Recommender Systems. arXiv.10.1162/tacl_a_00619 ↗
55. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv.
56. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems 30 (NeurIPS 2017), Curran Associates, Inc.
57. Kudo, T. (2018). Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidates. arXiv.10.18653/v1/P18-1007 ↗
58. Pires, T., Schlinger, E., and Garrette, D. (2019). How Multilingual Is Multilingual BERT?. arXiv.10.18653/v1/P19-1493 ↗
59. Znotiņš, A., and Barzdiņš, G. (2020). LVBERT: Transformer-Based Model for Latvian Language Understanding. Frontiers in Artificial Intelligence and Applications, IOS Press.10.3233/FAIA200610 ↗
60. Jiao, X., Yin, Y., Shang, L., Jiang, X., Chen, X., Li, L., Wang, F., and Liu, Q. (2020). TinyBERT: Distilling BERT for Natural Language Understanding. arXiv.10.18653/v1/2020.findings-emnlp.372 ↗
61. Hinton, G., Vinyals, O., and Dean, J. (2015). Distilling the Knowledge in a Neural Network. arXiv.
62. Ester, M., Kriegel, H.-P., Sander, J., and Xu, X. A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. Proceedings of the 2nd International Conference on Knowledge Discovery and Data Mining (KDD-96), Portland, Oregon, 2–4 August 1996.
63. Allahyari, M., Pouriyeh, S., Assefi, M., Safaei, S., Trippe, E.D., Gutierrez, J.B., and Kochut, K. (2017). A Brief Survey of Text Mining: Classification, Clustering and Extraction Techniques. arXiv.