ELEKTROTEHNIŠKI VESTNIK 91(1-2): 53-58, 2024 ORIGINAL SCIENTIFIC PAPER Enhancing Retail Operations: Integrating Artificial Intelligence into the Theory of Constraints Thinking Process to Solve Shelf Issue Tomaž Aljaž Fakulteta za industrijski inženiring, Šegova ulica 112, 8000 Novo mesto, Slovenija E-pošta: tomaz.aljaz@fini-unm.si Abstract. The paper addresses the pervasive issue of shelf holes in the retail sector and their negative impact on customer satisfaction. Empirical research reveals key contributors to shelf holes, including the inventory management deficiencies, supply chain coordination issues, and inefficient restocking processes. To address these challenges, an innovative solution is proposed by integrating artificial intelligence (AI), particularly ChatGPT, into the Theory of Constraints (TOC) Thinking Process (TP) framework. Integrating ChatGPT into the TOC TP framework significantly improves the identification of causal relationships, prioritizes outcomes, mitigates bias, and streamlines the development of the Future Reality Trees (FRTs), a core TP tool for providing a solution. ChatGPT proves to be a valuable tool in effectively addressing the root causes of shelf holes. The practical implications of the study are significant for the retail industry. Effective addressing shelf holes through AI integration enhances customer satisfaction, increases sales, reduces inventory costs, and streamlines supply-chain operations. Moreover, the study introduces an innovative approach to resolving shelf holes. The integration of ChatGPT into the TOC TP framework provides a novel application of AI in retail operations, demonstrating its originality and value. The study opens new avenues for leveraging the AI technologies in retail operations and problem-solving processes, thus paving the way to an improved overall organizational performance. Keywords: ChatGPT, Artificial Intelligence, Information Systems, Theory of Constraints Thinking Process, Logical Analysis, Decision Making, Structured Analysis Izboljšanje delovanja v maloprodaji: Vključevanje umetne inteligence v miselni proces Teorije omejitev za potrebe odpravljanja vrzeli na prodajnih policah Študija obravnava vprašanje vrzeli na trgovskih policah v maloprodajnem sektorju in njihov škodljiv vpliv na zadovoljstvo kupcev. Empirična raziskava je razkrila ključne dejavnike, ki prispevajo k vrzelim na policah, vključno s pomanjkljivim upravljanjem zalog, težavami pri usklajevanju dobavne verige in neučinkovitimi postopki dopolnjevanja zalog. Za reševanje teh izzivov je bila predlagana inovativna rešitev z vključitvijo umetne inteligence (AI), zlasti ChatGPT, v okvir miselnega procesa (TP) teorije omejitev (TOC). Z vključitvijo ChatGPT v okvir TOC TP so bile opažene znatne izboljšave pri prepoznavanju ključnih vzrokov in določitvi prioritet reševanja le-teh, zmanjšanju pristranskosti pri odločitvah in racionalizaciji oblikovanja končne rešitev. Praktične to pomeni, da imajo sedaj trgovci na drobno inovativno orodje s pomočjo katerega se lahko učinkovito spopadejo z operativnimi izzivi sedanje časa. Vključitev ChatGPT v okvir TOC TP predstavlja novo uporabo umetne inteligence pri prepoznavanju in obravnavanju rešitev v maloprodajnih procesih. Ključne besede: ChatGPT, umetna inteligenca, informacijski sistemi, Teorija omejitev, logična analiza, odločanje, strukturirana analiza 1 INTRODUCTION The retail industry is highly competitive, and the customer satisfaction is a key factor in determining the success of retailers. Shoppers prefer to complete their shopping efficiently, and the ability to buy all the items on their shopping list in one store is a critical aspect of their efficiency. The presence of empty spaces or "holes" on the retail shelves has become more prevalent, leading to a decline in the customer satisfaction. The fundamental principle of the retail success is to meet the customer expectations and demands. Completing shopping in one store reduces shoppers the need to visit multiple stores. The failure to meet this criterion can frustrate shoppers, potentially leading them to explore other competitive retail stores. To address the issue, the paper presents a structured approach called Theory of Constraints (TOC) Thinking Received 18 December 2023 Accepted 24 January 2024 54 ALJAŽ Process (TP) [2], [3], [4]. TOC TP offers a structured approach to logical analysis, emphasizing the identification and removal of constraints that hinder the system performance. TOC TP employs several interconnected tools [5] of specific roles. It begins by asking the question, "What to change?" The Current Reality Tree (CRT) identifies the system issues (Undesirable Effects - UDEs) and their root causes through their cause-and-effect relationship. It provides a visual snapshot of the system present state to highlight the key constraints. Once major issue is identified, the question of "What to change to?" is answered by the Future Reality Tree (FRT), providing the desired outcomes (Desirable Effects – DEs) and the necessary changes. The question of "How to make the change?" is addressed using the PreRequisite Tree (PRT) that outlines conditions to implement solutions. The Transition Tree (TT) acts as a roadmap for the change implementation. Table 1 summarizes the tools. Tabel 1: TOC TP tools and their purposes. Why Tool Description What to change? Current Reality Tree (CRT) Identifying root cause of problem What to change to? Future Reality Tree (FRT) Envisioning the outcomes of the proposed changes How to implement the change? Prerequisite Tree (PRT) Transition Tree (TT) Establishing the necessary conditions. Roadmap to execute the changes However, the TOC TP adoption is hindered by the time- consuming and biased process of constructing logical trees that is prone to errors and inaccuracies. The time taken to create a TOC TP tool can vary depending on the complexity of the analyzed system, experience of the person creating the TOC TP tool, and availability of resources. In general, to create one TOC TP tool takes from a few hours to several days (one working day is eight hours). Figure 1. Time taken to create of logical TOC TP (without ChatGPT) trees. Figure 1 shows the results of a study that investigates the time taken by students to create logical TOC TP trees (without ChatGPT). The students to some extent familiarity with the TOC principles created them in about six hours. However, the students unfamiliar with the TOC principles completed the task in one to two days (or more). However, completing complex systems typically takes several days or even weeks, especially when through understanding of the underlying processes and data collection are required. The time to be taken is also affected by how precisely the team wants to investigate and validate each causal relationship. It is important that beside devoting enough time to ensure the set accuracy, overanalyzing and overcomplicating the logical TOC TP trees should be avoided, too. Recent advances in natural language processing, particularly ChatGPT [1], offer opportunities to overcome the above limitations. The paper integrates of ChatGPT into TOC TP, using focusing on a FRT. It is organized as follows. Section 2 provides a brief review of the current relatively new research. Section 3 defines the problem and Section 4 provides the research methodology. Section 5 provides the study results. Section 6 summarizes and discusses the findings and implications for further work. Section 7 draws conclusions. 2 LITERATURE REVIEW The chapter presents a comprehensive review of the existing scholar literature concerning the integration of ChatGPT and TOC TP. Recognizing the nascent nature of this emerging field of research the critical research gaps are identified to serve as the basis of the study. For this purpose a systematic and throughout literature review is made. The scope of our research is determined and the inclusion and exclusion criteria are set and specified. Our review covers the literature collection from June 18, 2023, to July 21, 2023. The focus is on prominent academic databases, such as SpringerLink and Scopus, using carefully chosen keywords encompassing various domains, including engineering, computer science, decision science, and business, management, and accounting. For our search to be reliable we use the Boolean operators, specifically the AND operator, to combine keywords such as "ChatGPT," "bias," "Theory of Constraints," "Theory of Constraints Thinking Process," "logical analysis," "decision making," and "structured analysis framework", which altogether provides corpus of over 1.8 million academic papers. To optimize our selection, we apply discriminatory criteria. Our results are filtered by including papers with titles or abstracts containing terms such as "ChatGPT*" or "Theory of Constraints Thinking Process" and our review is limited to papers published in the English language. Thus our screening process enables dataset consisting of 744 papers from SpringerLink and 369 papers from Scopus. ENHANCING RETAIL OPERATIONS: INTEGRATING ARTIFICIAL INTELLIGENCE INTO THE THEORY OF CONSTRAINTS… 55 A comprehensive examination of the abstracts of the selected papers shows that a scholarly discourse on the integration of ChatGPT and TOC TP is currently limited and, in many instances, under-represented. The absence of a comprehensive research in this specific topic forms the foundational rationale and imperative motivation for our own investigation in this uncharted territory. 3 PROBLEM DEFINITION Despite the importance of the "buy everything on the shopping list" criterion, the retail industry is currently facing a significant challenge in maintaining stocked shelves. In 2023, there was a noticeable increase in the proportion of empty spaces or holes on the retail shelves. The trend directly impacts the customer satisfaction and poses a threat to the retailer competitiveness. The occurrence of the shelf holes reflects an underlying problem in the inventory and stocking processes. The occurrence of the shelf holes is an indication of the inefficiency of the retailer processes and communication channels. Due to a suboptimal inventory management, supply chain coordination, and shelf restocking procedures. The factors giving rise to the issue include (UDEs):  Inadequate Inventory Management: the inability to accurately forecast the demand and monitor the inventory levels results in the overstocking of some items and stockouts of others, leading to shelf holes.  Poor Supply-Chain Coordination: breakdowns in communication and coordination among various stages of the supply chain can disrupt the timely delivery of products to stores, causing holes on the shelves.  Inefficient Shelf Restocking: suboptimal shelf restocking process, such as improper scheduling, inadequate staffing, and lack of real-time inventory updates, can exacerbate the problem of shelf holes. The primary focus of our study is:  to determine the root cause/s of the increase in shelf holes in the retail environment?  to evaluate the feasibility and effectiveness of leveraging ChatGPT in addressing the UDEs and integrating them into FRT for a comprehensive problem-solving analysis. 4 METHODOLOGY The target of our retail case study is to show if ChatGPT can improve FRT. It provides relevant example of understanding the decision-making capabilities of ChatGPT and explores its advantages and limitations. FRT is improved following the process as described in [12]. Our methodology uses an interactive approach by engaging in conversations with ChatGPT. The official cutoff date is 2021 [8] of the training data for ChatGPT. The information published after this date is to be considered void and null. Queries (promts) to ChatGPT were submitted between August 3rd and August 30th, 2023. Our work thus represents the state of ChatGPT at that time. Although the next version of ChatGPT (GTP- 4) is expected to exhibit better a performance, it is only accessible through a paid subscription. As there have been some controversies and concerns raised about the new version of ChatGPT, including its eventual ban in Italy [9], we use the more well-established version of ChatGPT. To ensure an effective interaction the prompts prompting ChatGPT to generate responses in a conversational manner are carefully prepared. Following the recommendation [13], the conversation history is throughout our interaction with ChatGPT retained. To ensure a contextual understanding of the ongoing conversation and generate more coherent and relevant responses. The conversational context enables methodology to fully utilize the ChatGPT capability and to improve the overall quality of our interaction with it. The reliability and accuracy of the obtained ChatGPT results are validated. One of our team members accessed https://chat.openai.com/ to input prompts, and at least two people manually evaluated the ChatGPT generated responses and resolved the disagreements by majority voting. Figure 2 shows our workflow: • DEs related to the case study are collected from UDEs and other sources such as personal experience, observations, interviews, reports and measurements. • ChatGPT is introduced to DEs of the case study by submitting the first prompt. For example: "Rank the identified DEs based on common patterns in the retail industry?" The prompt is used for the start and requires ChatGPT to look up the initial cause-and- effect relationship between DEs. • A draft FRT is then constructed to outline initial cause-and-effect relationships. • More specific questions are then prompted to ChatGPT to identify inconsistencies or leaps of logic in FRT to improve the accuracy and credibility of the analysis for example: "Validate/critically review the logical validity of the cause-and-effect relationship in the Draft FRT for potential logical holes." • ChatGPT is then asked to help detect actions to overcome (hidden) assumptions and encourage critical thinking about the underlying beliefs by prompting: "Identify any hidden assumptions about our and how to solve them." Finally, constructing FRT that identifies the main strategic points that needs to be addressed to reach desired future. 56 ALJAŽ Figure 2. Workflow with ChatGPT when creating FRT. 5 RESULTS AND DISCUSSION The results of our study of how to minimize shelf holes in the retail industry with particular concern for implications on the customer satisfaction and the "buy everything on the shopping list" criterion show that FRT is a powerful tool to attain the desired results by identifying and removing the root causes of the current problems (UDEs). FRT defines the cause-and-effect relationship between the solutions and the desired results. ChatGPT, a large language model, is used to detect hidden assumptions and provide valuable insights for solving the problem. Our study uses ChatGPT to improve the FRT construction in several ways. First, it is used to speed up the data acquisition process, communicate with stakeholders, brainstorm alternative cause-and-effect relationships, make data-driven decisions, and obtain quick answers to specific questions. For example, ChatGPT comprehensively understands the future state and ranks potential DEs by retrieving specific data. Figure 3 shows an example of DEs related to our study. Figure 3. DEs related to our case study from retail industry. Leveraging data, ChatGPT ranks DEs related to our case study as shown in Figure 4. Figure 4. DEs related to our case study from retail industry Second, ChatGPT is effectively used to address and mitigate leaps of logic (long arrows) and validates and identifies inconsistencies in the draft FRT. For example, ChatGPT is used to compare the proposed relationship to the existing data and industry standards. The analysis is evidence-based and reduces potential inaccurate assumptions. Figure 5 shows an initial cause-and-effect relationship for constructing FRT. Desired Effect B Intermediate Effect A Desired Effect C Precondition D Solution E Precondition F Solution AND AND B Intermediate Effect A Desired Effect C Precondition F Precondition AND AND G Intermediate Effect H Precondition I Solution B Intermediate Effect A Desired Effect C Precondition F Precondition AND AND G Intermediate Effect H Precondition I Solution I1 Action I2 Action ChatGPT ChatGPT 1 2 3 ChatGPT 4 5 Draft FRT DraftFRT Cont. FRT I1 Action AND AND ENHANCING RETAIL OPERATIONS: INTEGRATING ARTIFICIAL INTELLIGENCE INTO THE THEORY OF CONSTRAINTS… 57 Figure 5. The initial cause-and-effect relationship for constructing FRT. Figure 6 shows an example of improving the cause-and- effect relationship for constructing FRT. Figure 6. Improving the cause-and-effect relationship for constructing FRT. Third, ChatGPT generates text describing the various elements of FRT and the relationships between them. A text is used to identify holes in the analysis and potential areas for an improvement. For example, ChatGPT is used to ask questions and encourage users to think critically about their beliefs. This helps users detect the assumptions underlying their problems. Moreover, ChatGPT is used to generate a text tailored to specific needs of stakeholders. Figure 7 shows an example of our simplified FRT. Figure 7. (Simplified) FRT used in our study. 6 DISCUSSION The findings of our study provide a new insight into the increasing issue of shelf holes in the retail industry. The negative impact of shelf holes on the "buy everything on the shopping list" criterion and customer satisfaction is analyzed. The key factors contributing to the problem are inadequate inventory management, deficient supply chain coordination, and inefficient shelf restocking processes. The study also investigates the integration of ChatGPT with TOC TP to widen the possibilities for logical analysis. By combining the ChatGPT capability with the TOC TP systematic approach the retail industry can gain a deeper understanding of the issue and develop more effective strategies for its solving. The several challenges to be addressed to ensure a successful integration of ChatGPT are. First, the ChatGPT understanding of the specific concepts and terminology used in TOC TP needs to be improved. Training methods should be developed to bridge the gap and improve the ChatGPT understanding of the TOC principles. Second, the accuracy and reliability of the text generated by ChatGPT needs a careful consideration. Although ChatGPT is a powerful tool, it is not infallible and its results should be critically evaluated and validated by human experts. Third, ethical guidelines are essential to ensure responsible use of ChatGPT that should not be used to generate misleading or harmful texts negatively effecting integrity of the analysis process. The findings of this study have important implications for retailers. By identifying and removing the key contributing factors for the shelf holes, retailers can improve customer satisfaction and maintain a competitive edge in the market. 7 CONCLUSION The study significantly contributes to both the academia and the retail industry. It illuminates the intricate interplay between the inventory management, supply- chain coordination, shelf-restocking processes, and their 58 ALJAŽ impact on the "buy everything on the shopping list" criterion. It also represents a significant stride in tackling the pervasive issue of shelf holes within the retail sector. The integration of AI, exemplified by ChatGPT, into the structured TOC TP framework introduces exciting opportunities for logical analysis and problem-solving. Our empirical research confirms the adverse effects of shelf holes on the customer satisfaction, primarily stemming from the inventory management deficiencies, suboptimal supply chain coordination, and inefficient restocking processes. The integration of ChatGPT into TOC TP demonstrates its effectiveness in identifying causal relationships, prioritizing outcomes, mitigating bias, and expediting the FRT development. The presented innovative approach shows a promise in addressing the root causes of shelf holes. However, it is essential to be aware of the limitations of our study that is focused on a specific retail company and the integration of ChatGPT into TOC TP. The generalizability of our findings across diverse retail environments warrants a further investigation. Looking ahead, the future of the ChatGPT integration with TOC TP appears promising. A further research and development efforts are expected to refine its capability enabling organizations to make more elaborated decisions, overcome critical constraints, and thrive in the dynamic and complex landscape of the retail industry. The collaborative synergy between AI and the human expertise holds the potential to revolutionize the problem-solving methodologies resulting in more efficient and effective decision-making paradigms. As such, the study paves the way for exciting avenues of exploration, with the integration of AI poised to shape the future of retail operations and problem-solving processes. LITERATURE [1] Zamfiroiu A, Vasile D, Savu D. ChatGPT–A Systematic Review of Published Research Papers. Informatica Economica. 2023;27(1):5-16. PMID: 36981544 [2] Eidelwein, F., Piran, F.A.S., Lacerda, D.P. et al. Exploratory Analysis of Modularization Strategy Based on the Theory of Constraints Thinking Process. Glob J Flex Syst Manag 19, 111– 122 (2018). https://doi.org/10.1007/s40171-017-0177-1. [3] Gaspar, M., Cristovão, L., Tenera, A. (2019). Theory of Constraints Thinking Processes on Operational Lean Programs Management Improvement: An Energy Producer Company Case. In: Camarinha-Matos, L., Almeida, R., Oliveira, J. (eds) Technological Innovation for Industry and Service Systems. DoCEIS 2019. IFIP Advances in Information and Communication Technology, vol 553. Springer, Cham. https://doi.org/10.1007/978-3-030-17771-3_11. [4] Taylor III, L. J., & Asthana, R. (2018). Applying Theory Of Constraints principles and Goldratt's thinking process to the problems associated with inventory control. Business Journal for Entrepreneurs, 2018(1). [5] Dettmer, H. W. The Logical Thinking Process: A Systems Approach to Complex Problem Solving, Amer Society for Quality; 2 edition, 2007. [6] Aljaž, T., J. Holt, EM 526 Lecture materials, Washington State University, 2020 [7] Alshami, A.; Elsayed, M.; Ali, E.; Eltoukhy, A.E.E.; Zayed, T. Harnessing the Power of ChatGPT for Automating Systematic Review Process: Methodology, Case Study, Limitations, and Future Directions. Systems 2023, 11, 351. https://doi.org/10.3390/systems11070351 [8] What Is ChatGPT? OpenAI. Available online: https://help.openai.com/en/articles/6783457-what-is-chatgpt (accessed on 15th August 2023). [9] Vincent, J. Italian Regulators Order ChatGPT Ban over Alleged Violation of Data Privacy Laws, the Verge. 2023. Available online: https://www.theverge.com/2023/3/31/23664451/italy-bans- chatgpt-over-data-privacy-laws (accessed on 30th August 2023) Tomaž Aljaž is having over 26 years of professional experience in Information & Telecommunication. He is employed with Spar Slovenija where he manages IT projects with a particular focus on improving the performance of the project team, establishing and maintaining an optimal use of resources and reducing the operational risks. He is also a member of the Faculty of Industrial Engineering Novo mesto, Slovenia. His past experiences are related to the R&D environment where he worked as a Resource, Project, Product and Solution manager. He has published several papers on the information technology and telecommunication area, resource management, project management and process improvements using the Theory of the Constraints methodology. He is a holder of a Ph.D. degree in Electrical Engineering received from the Faculty of Electrical Engineering and Computer Science of the University of Maribor and has completed courses in Constraint Management at the Washington State University, USA. For over 13 years he has been teaching at a graduate and postgraduate level the topics related to the performance improvement of organizations, project management, information technology and telecommunication. In 2018 and 2019, he was granted a Certified Scrum Master (CSM) and Certified Scrum Product Owner (CSPO) certificate and in 2014 a Jonah certificate by the Theory Of Constraints International Certification Organization (TOCICO).