Article

October 27, 2026

AI co-piloting development in Python and Scala for vehicle arrival time estimation

Lucas Remor Costa; Diego Marques De Carvalho

DOI: 10.22167/2675-6528-202601109

Article prepared by the ResumeAI tool, an artificial intelligence solution developed by the Pecege Institute focused on synthesis and writing.

Summary

The study investigated the use of Artificial Intelligence (AI) as copilots in the development of solutions in Python and Scala for estimating arrival time (ETA) on transport routes. Initially, the relevance of ETA in logistics and the advancement of generative AI applied to assisted programming were contextualized. The objective was to evaluate how the ChatGPT-5 and Claude Sonnet 4.6 models assisted in creating codes capable of reading an Excel database and returning the ETA. The methodology comprised four comparative experiments, combining the two AI models with the Python and Scala languages, in an iterative cycle of “prompting”, execution, error identification, and refinement. Quantitative data were collected, such as the number of interactions, correct execution rate, suggestions for improvement by static analysis, and code quality, in addition to a qualitative analysis of the structure and usability of the generated solutions. The results demonstrated that all combinations achieved the proposed objective. Claude Sonnet’s responses were more complete, with structured projects and documentation, while ChatGPT presented more objective solutions dependent on manual assembly. The Claude/Scala scenario delivered the final report richest in information and graphics. Quantitatively, the Claude/Scala scenario required only five messages for a functional solution, compared to twenty for ChatGPT/Scala. The correct execution rate was higher in Python, and code quality scores ranged between 8.05 and 8.82. It was concluded that AI copilots increased productivity and accelerated software development, although they still depend on human validation and present trade-offs between ease of use and sophistication of the final project.

Keywords: Software engineering; Generative artificial intelligence; Logistics; Language models; Code quality.

1. Introduction

Artificial intelligence (AI) has been driving a revolution in the development of computational systems and in redefining technical skills across various sectors, notably in logistics and transportation. Tools based on generative language models, acting as programming copilots, such as GitHub Copilot, emerge as strategic allies for developers, experienced and beginners alike, by suggesting code snippets, reducing entry barriers, and accelerating the learning process (ANICHE et al., 2025). This productivity optimization encourages the integration of such technologies into daily operations. In the logistics context, this evolution is crucial for improving the estimated time of arrival (ETA) prediction for vehicles. ETA is a fundamental indicator of transport service quality, directly influencing customer-perceived reliability and the operational efficiency of companies (VAN DER SPOEL et al., 2016). Accurate ETA prediction not only minimizes internal costs by enabling proactive delay management but also enhances communication with recipients. Recent studies in last-mile operations demonstrate that ETA accuracy can result in up to ten percent fewer redelivery attempts and a reduction of over thirty percent in customer service calls (GIBELLINI et al., 2024). These empirical data underscore the critical importance of robust ETA solutions in today’s competitive landscape.

The accuracy in estimating the ETA constitutes a competitive differential, capable of reducing costs, strengthening trust in the supply chain, and increasing customer satisfaction. For this precision, statistical models, such as linear regression, are widely used due to their simplicity, interpretability, and efficiency in corporate contexts that require rapid responses (MONTGOMERY et al., 2012). However, the implementation of these predictive models demands specific technical knowledge in programming, statistics, and software engineering, which can be an obstacle for business professionals or logistics managers with limited experience. It is at this point that artificial intelligence, acting as a copilot, plays a transformative role. It serves as a bridge between domain knowledge and the complexities of programming languages, enabling users with less technical proficiency to structure experiments, validate hypotheses, and obtain consistent results (NAGPAL, 2024). In addition to democratizing software development, these copilots demonstrably reduce the cognitive load and frustration associated with programming tasks (FRANK and GODWIN, 2024).

The choice of programming language is strategic in building solutions for ETA, influencing the support of AI tools. Python stands out for its accessible syntax, vast ecosystem, and strong presence of libraries dedicated to data science, such as Pandas and Scikit-learn, which facilitate the manipulation and analysis of large volumes of information (MÜLLER, 2016). On the other hand, Scala offers notable advantages in terms of performance and scalability, being suitable for distributed environments and integration with platforms like Apache Spark (ODERSKY et al., 2016). The comparison of the performance of AI copilots in solving a logistical problem using both languages proves to be crucial. This analysis allows us to identify how these tools adapt to distinct library ecosystems and different technical characteristics, as well as to evaluate the potential of AI to democratize software development for logistics professionals, minimizing entry barriers. Additionally, from a software engineering perspective, it is imperative to examine the quality, organization, and readability of the code generated with the aid of these tools, ensuring that the solutions are functional, maintainable, and scalable.

Given the demand for efficient logistics solutions and the evolution of generative AI, this study is justified by investigating the practical impact of AI copilots in software development for ETA estimation, aiming to optimize coding, reduce technical dependency, and ensure the quality of solutions. Thus, the present study evaluated how the ChatGPT-5 and Claude Sonnet 4.6 models act as copilots in developing Python and Scala solutions for estimating the estimated time of arrival (ETA) in transport routes, analyzing the effectiveness, the quality of the generated code, and the user interaction experience.

2. Material and Methods

The research was designed with an applied character, adopting a comparative experimental approach and bibliographic foundation. The central objective was to evaluate the effectiveness of artificial intelligence tools, acting as programming copilots, in supporting users with limited programming experience for the development of linear regression applications. These applications aimed to estimate the estimated time of arrival (ETA) of trucks on transport routes. The methodology followed the typologies described by Wazlawick (2009), which guide clarity in problem definition, robustness of theoretical foundation, and controlled execution of experiments.

The study focused on the practical application of generative artificial intelligence in software development for the logistics and transportation sector, specifically in ETA prediction. There was no specific physical location for conducting the experiments, which were carried out in a controlled development environment. The research execution period was not explicitly delimited, but it occurred during the work’s development cycle. The unit of analysis comprised the four combinations resulting from the interaction between two generative AI models and two distinct programming languages, allowing for a comparative evaluation of their capabilities and performance.

The database used for the experiments was artificially generated through ChatGPT-5, based on a “Prompt 1” (Appendix A) that requested historical travel time data for three distance ranges: short, medium, and long. Each record included variables such as origin, destination, travel time, distance traveled, equipment type, and transportation mode. This database, named “historical_truck_trips”, was made available in Appendix B. The selection of AI models, ChatGPT-5 and Claude Sonnet 4.6, was justified by their advanced technical capabilities in code generation and debugging, as well as their accessibility for research purposes (OPENAI, 2025; ANTHROPIC, 2025).

For data collection, simple linear regression models were developed in Python and Scala, applying them to the generated database. The implementation was conducted with the direct assistance of generative artificial intelligence tools, ChatGPT-5 and Claude Sonnet 4.6, which acted as programming copilots. This process resulted in four distinct experimental combinations: ChatGPT-5 with Python, ChatGPT-5 with Scala, Claude Sonnet 4.6 with Python, and Claude Sonnet 4.6 with Scala. Each combination represented a software development scenario, allowing for the controlled observation of AI performance in different programming ecosystems.

The research execution followed an iterative “prompting” flow, which consisted of formulating detailed instructions for the AIs, followed by code generation and execution. The starting point for each experiment was “Prompt 2” (Appendix C), carefully structured based on prompt engineering techniques. This structuring included the explicit definition of a persona (“experienced programmer” and “transport and logistics specialist”) and the incorporation of detailed context, such as the requirements document and the data schema. This approach aimed to reduce ambiguities and increase the assertiveness of the responses generated by the language models (WHITE et al., 2023).

After the initial code generation by AI tools, the experimental process continued with an iterative cycle of execution and correction. The user executed the code in a local environment and, in case of compilation or execution errors, or if the results did not meet the expected requirements, the error log or problem description was returned to the AI. This, in turn, provided guidance for adjustments and corrections. This cycle of generation, execution, failure identification, correction, and re-execution was systematically repeated until the produced code fully met the defined requirements, as illustrated in the flowchart of Figure 1 (OPENAI, 2024).

To systematically evaluate the performance of the four experimental combinations, specific comparison criteria were defined. The results obtained for each criterion were recorded in a comparative matrix, allowing for objective analysis. The evaluation criteria were not limited to the technical performance of the generated models, but also encompassed the user’s experience with artificial intelligence and the quality of the code produced. The main objective was to measure the support provided by AI to the user during the development cycle, collecting indicators that reflected the efficiency of the co-programming process, rather than relying solely on subjective perceptions.

One of the quantitative criteria evaluated was the “Number of messages sent to reach the solution”, which measured the amount of interactions needed between the researcher and the AI tool until a functional solution was obtained. This indicator allowed us to gauge the speed at which each model converged to a satisfactory result, reflecting the efficiency of the interaction in the assisted development process. Another criterion was the “Correct execution rate”, which assessed the proportion of successful executions of the generated code, without errors and with the expected results. To simplify the analysis, a binary classification was adopted: “correct” or “incorrect”, unlike more complex classifications (AZBARKA et al., 2025).

The “Number of identified improvement suggestions” was another relevant criterion, quantifying the adjustment recommendations pointed out by static analysis tools. For Python codes, Pylint was used, and for Scala codes, Scalastyle. These suggestions included improvements related to organization, naming standardization, function structure, and adherence to good programming practices. Additionally, the “Code Quality Score (CQS)” was calculated by a standardized quantitative metric, derived from the Pylint formula, which converted the results of static analysis tools to a common numerical scale. Problems were grouped into “errors” and “non-critical” (PYLINT, 2024).

The fifth evaluation criterion was the “Number of lines of code”, which measured the total size of the code generated in the final solution. This metric is widely recognized in software engineering as an indirect indicator of complexity, development effort, and maintainability, as highlighted by Sommerville (2011). To guide development and evaluation, a detailed “Requirements document” was used as part of the initial prompt. This document established a structured description of the system’s functionalities and constraints, serving as the basis for the design, implementation, and validation of the solutions generated by the AIs.

The requirements document specified “Data input”, requiring the system to allow the import of a standard database of historical route records, containing variables such as route number, origin, destination, distance traveled, departure date and time, day of the week, departure time, and total travel time. Subsequently, “Data handling and preprocessing” demanded the incorporation of routines for cleaning and normalization of input variables, following good computational statistics practices. “Model processing and evaluation” required the system to process the test data to calculate ETA estimates, ensuring the core functionality of the application.

The “Results Display” was detailed, requesting that, in addition to textual reports, graphs comparing the observed ETA and tables summarizing the performance metrics for each analyzed segment be generated. The output interface should be clear, showing travel time per route, expected variation, and a scatter plot of this variation, facilitating decision-making by logistics managers. The “Non-functional and usability requirements” emphasized that the system should be easy to use by professionals without programming experience, providing clear instructions, automating steps, and ensuring traceability and reproducibility of experiments.

As methodological limitations of the study identified that the consumption of “tokens” throughout the interactions with AIs was not considered, which could impact the evaluation of operational efficiency and costs in real applications. Additionally, new accounts were used in the free versions of ChatGPT-5 and Claude Sonnet 4.6, which may have imposed usage and performance restrictions compared to paid versions or those with interaction history. Finally, the travel history database was generated by artificial intelligence, which may introduce biases compared to real logistics operation data. Formal ethical procedures, such as approval by an ethics committee, were not mentioned, as the research did not involve direct human participants.

3. Results and Discussion

The results presented in this chapter derive from a comparative co-development experiment between user and language models, in which code generation and its validation occurred iteratively, through successive executions and continuous refinements until a functional solution was obtained. The starting point of the interaction was “Prompt 2” (Appendix C), structured based on prompt engineering techniques that aim to reduce ambiguities and increase the assertiveness of responses, especially through the explicit definition of a persona (“experienced programmer” and “transport and logistics specialist”) and the inclusion of detailed context, such as the requirements document and the data schema. This approach aligns with the concept of “role prompting” or “persona prompting”, widely discussed in the literature as an effective strategy to direct the behavior of language models and improve the quality of responses in specific tasks (WHITE et al., 2023). Clarity in the formulation of the initial prompt is crucial, as it establishes the basis for the AI’s understanding of the task, directly influencing the quality and relevance of the generated code (OPENAI, 2024).

After the initial code generation, the experimental process followed an iterative flow of execution and correction, in which the user executed the code in a local environment and, in case of error, returned to the AI with the description of the identified problem, requesting guidance for adjustment. This cycle, composed of the steps of generation, execution, failure identification, correction, and re-execution, was repeated until the code fully met the defined requirements, as represented in the Figure 1 flowchart. This approach is consistent with recommended practices in prompt engineering and interaction with generative models, which highlight iterative refinement as an essential mechanism for improving output quality (OPENAI, 2024). The iterative nature of AI-assisted development is a fundamental point, as, although generative models are capable of producing functional code, empirical validation and fine-tuning by the user are indispensable to ensure that the solution meets specific requirements and functions correctly in the target environment (FRANK; GODWIN, 2024). This human-AI collaboration not only accelerates the process but also mitigates the risks of subtle errors or incompatibilities that the AI, by itself, might not identify.

Source: Original research results

Figure 1. User and AI interaction flowchart

As a limitation of the work, it should be noted that the consumption of “tokens” throughout the interactions was not considered, a metric associated with operational efficiency and costs in real applications. This omission may impact the evaluation of economic viability in scenarios of intensive use, where the cost per token can become a limiting factor for the large-scale adoption of AI copilots (NAGPAL, 2024). Additionally, new accounts without history were used in the free versions of ChatGPT-5 and Claude Sonnet 4.6, a condition that may impose restrictions on usage, performance, and resource availability compared to paid versions or those with search histories. Free versions often have request limits or higher latency, which may have influenced the number of interactions required and the perceived efficiency of the models (ANTHROPIC, 2025; OPENAI, 2025). Finally, the travel history database used in the experiment was generated by artificial intelligence, through ChatGPT-5, based on the guidelines defined in Appendix A, which may introduce biases compared to real operational logistics data. The use of synthetic data, although controlled, may not reflect the complexity and anomalies present in real databases, potentially overestimating or underestimating the performance of linear regression models in practical scenarios (MONTGOMERY et al., 2012). Nevertheless, it was possible to obtain relevant results for the five evaluation criteria proposed in the methodology, presented in Table 1. In the sequence of this chapter, the structure of the developed code and the results obtained in the four analyzed combinations are discussed: Python with GPT, Python with Claude Sonnet, Scala with GPT, and Scala with Claude Sonnet, allowing for a systematic comparison between languages and AI tools. The interactions between the researcher and the AI tools, as well as the codes developed through them, are available through the document shared in Appendix B.

Table 1. Results of the codes obtained by the User and AI interaction from the same initial Prompt, Prompt 2, and following the interaction of Figure 1

Criterion

Chat GPT5 Python

Chat GPT5 Scala

Claude Sonnet 4.6 Python

Claude Sonnet 4.6 Scala

Number of messages sent to reach the solution

2

20

16

5

Correct execution rate

50%

5%

20%

33%

Number of improvement suggestions identified

12

11

54

113

Code quality note

8,05

8,82

8,42

8,46

Number of lines of code

82

93

342

849

Source: Original research results

Analysis of ChatGPT-5 interaction – Python

The analysis of the Python code generated by ChatGPT-5 reveals a structure aligned with good software engineering practices, with well-defined functions for each stage of the process, including import, preprocessing, calculation, evaluation, and visualization. This organization is fundamental for code readability, maintenance, and reproducibility, as widely discussed by Sommerville (2011). The modularization of functions facilitates understanding the logical flow and allows future modifications to be implemented with a lower risk of introducing new errors. The generated code included basic data cleaning routines and the creation of derived variables, as well as evaluation metrics such as mean absolute error (MAE) and root mean squared error (RMSE), demonstrating an adequate approach for building a linear regression model, albeit simplified (MONTGOMERY et al., 2012). The model’s simplicity can be an advantage in contexts where interpretability is valued more than extreme predictive complexity.

Regarding interactions, ChatGPT-5 demonstrated remarkable efficiency, requiring only two messages to generate a functional solution, as evidenced in Table 1. This low number of interactions suggests a good understanding of the initial “Prompt 2” by the model, indicating that the prompt engineering used was effective in conveying requirements clearly and concisely (WHITE et al., 2023). The speed of convergence to a functional solution is a direct indicator of the productivity that AI copilots can offer, especially for well-defined tasks. However, the 50% correct execution rate for the initial code indicates that, although the AI generated a solution quickly, it still required human adjustments and validation to achieve full functionality. This behavior reinforces the idea that AI acts as a support for development, reducing initial cognitive effort but not eliminating the need for user intervention and validation (FRANK; GODWIN, 2024). The execution and correction phase, according to the flowchart in Figure 1, was crucial for refining the code, especially in aspects related to preprocessing and variable naming, which are frequent sources of errors in software projects.

Static code analysis with Pylint identified 12 suggestions for improvement, including 1 error and 11 conventions, resulting in a Code Quality Score (CQS) of 8.05. With 82 lines of code, this solution proved to be lean and functional, with an overall quality considered good, but with room for improvements in standardization and robustness. The identified error, although unique, highlights the importance of human review, as critical errors can compromise system functionality. The convention suggestions, in turn, indicate opportunities to improve readability and maintainability, aspects that, while not preventing execution, are crucial for long-term software sustainability (PYLINT, 2024). In summary, the ChatGPT-5 scenario with Python delivered an objective and functional solution to the proposed problem, with a lower level of managerial detail compared to other scenarios, but with a solid software engineering foundation. The practical implication is that, for developers with limited experience, this combination can be an excellent starting point for rapid prototyping and concept validation, provided there is a human review and refinement process.

Analysis of the interaction Claude Sonnet 4.6 – Python

The Python program generated by Claude Sonnet 4.6 stood out for presenting a more product-oriented solution, with a strong focus on robustness and usability. The script structure included dependency validation, rigorous data input handling (column standardization, validation, deduplication, handling of invalid values and *outliers*), which is essential for the quality and reliability of any data analysis application (MÜLLER; GUIDO, 2016). This approach in well-defined steps and functions not only improves code readability and maintainability, aligning with Sommerville’s (2011) software engineering principles, but also ensures that the linear regression model is built on a clean and consistent database. During execution, the system processed 900 records, using 899 after cleaning, demonstrating the effectiveness of the preprocessing routines. As output, in addition to the terminal report, a consolidated Excel file and four graphs (scatter plot, *boxplot*, histogram, and comparative) were generated, comprehensively meeting the analysis and decision support requirements, which is a significant differentiator for logistics managers who need clear visualizations for decision-making (VAN DER SPOEL et al., 2016).

In the interaction process, the main difference compared to the previous scenario was the weight of the environment diagnosis to enable execution. After the first attempt, there was an execution error, initiating the iterative correction cycle, as illustrated in Figure 1. Initially, Claude Sonnet 4.6 suggested direct alternatives, but errors persisted, leading to a change in strategy towards an evidence-guided approach. The AI requested commands and terminal outputs to confirm package installation and “PATH” configuration, as well as operating system details. At one point, the AI suggested steps for the macOS operating system, requiring user intervention to inform that the environment was Ubuntu and redirect the command sequence. This event underscores the critical importance of validating the execution environment, an often underestimated aspect, but one that can be a major obstacle to the reproducibility of experiments and the deployment of software solutions (WAZLAWICK, 2009). From then on, Claude began to work incrementally, asking the user to execute commands, return the outputs, and adjust the diagnosis, including requests for tests in an external terminal and validations related to the VS Code console, until the environment became consistent and the program ran correctly around the 15th interaction. This behavior reinforces the dynamics of the experiment, where the AI accelerates the structuring of the solution, but empirical validation and fine-tuning remain dependent on the user and the execution environment, in a trial, error, and correction cycle compatible with controlled experimentation and with the role of copilots in reducing cognitive effort without eliminating the need for verification, as already mentioned by Frank and Godwin (2024).

Considering the quantitative criteria presented in Table 1, the scenario with Claude Sonnet 4.6 in Python demanded 16 messages to reach the functional solution, a significantly higher number than ChatGPT-5 with Python, but which resulted in a more robust solution. The correct execution rate was 20%, indicating that, although the final solution was complete, the path to achieve it involved more trial and error in intermediate executions. Static analysis revealed 54 suggestions for improvement, and the final code had 342 lines, resulting in a Code Quality Score (CQS) of 8.42. The larger volume of suggestions for improvement and lines of code is consistent with the greater scope and expanded number of functionalities and outputs, such as formatted Excel export and the expanded set of charts. Static analysis tools like Pylint tend to generate more recommendations as the complexity and size of the code increase, especially in aspects of standardization, readability, and maintainability (PYLINT, 2024). Despite the greater effort for environment stabilization and the higher number of interactions, the final project delivered a more complete set of evidence, expanding the practical utility and auditability of the experiment for logistics managers. The implication is that, for projects requiring greater robustness, documentation, and managerial outputs, Claude Sonnet 4.6 in Python, although demanding more initial interaction and effort, can deliver a final product more aligned with corporate needs.

Analysis of the ChatGPT-5 interaction – Scala

In the ChatGPT-5 scenario with Scala, the solution was structured as an SBT (Scala Build Tool) project with declared dependencies. This approach, while ensuring traceability and reproducibility of the development environment, increases coupling to the Scala/Spark ecosystem, introducing a layer of complexity that may be unnecessary for a reduced data volume, such as the 900 records used in this experiment (SOMMERVILLE, 2011). The code implemented a direct processing pipeline: Spark initialization, Excel file reading, basic cleaning application, calculation of mean and standard deviation per route, and generation of a console report, accompanied by a scatter plot. The structure is clear and, in principle, adequate for the scope of the ETA estimation problem. However, the use of a distributed processing *framework* like Apache Spark for such a small database can be considered an *overkill*, adding complexity and computational overhead without a proportional benefit in performance or scalability for this specific case (ODERSKY et al., 2016).

The execution “log” revealed that the main problems faced were not in the code logic itself, but rather in the execution environment and dependencies. There were errors of non-existent columns and dependency failures, requiring several iterations to stabilize execution. Unlike the scenario in Python, the correction cycle was more costly due to the inherent complexity of the Scala/Spark ecosystem, which involves the Java Virtual Machine (JVM) and the management of external libraries via SBT. This complexity significantly increased the execution difficulty and the number of interactions needed for debugging. This finding reinforces the premise that, in addition to the quality of the generated code, the configuration and stabilization of the environment are critical parts for the reproducibility and success of any software experiment, especially in languages with more complex ecosystems (WAZLAWICK, 2009). The need for repeated interactions to resolve environment and dependency issues highlights a limitation of AI copilots: while they can generate code, their ability to diagnose and resolve execution environment configuration problems still requires specialized human intervention.

The quantitative results for this scenario, according to Table 1, show that 20 messages were needed to achieve a functional solution, which is a high number and indicates considerable convergence difficulty. The correct execution rate was only 5%, the lowest among all scenarios, corroborating the difficulty in stabilizing the environment. 11 improvement suggestions were identified by static analysis, and the final code had 93 lines, resulting in a Code Quality Score (CQS) of 8.82. Despite the good structural quality and lean code size, the high number of interactions and the low correct execution rate indicate that the ChatGPT-5 with Scala combination presented significant difficulty in use and stabilization. Compared to Python, the solution demanded more effort to run and delivered a simpler result, limited to basic statistics and a single graph, with less support for managerial analysis. This suggests that, for users with little programming experience, the complexity of the Scala/Spark ecosystem can nullify some of the productivity benefits offered by the AI copilot, requiring a level of technical knowledge for environment setup and debugging that can be prohibitive.

Analysis of the Claude Sonnet 4.6 – Scala interaction

In the scenario concerning Claude Sonnet 4.6 with Scala, a more comprehensive and structured solution was delivered from a software engineering perspective. The system was organized into multiple modules, featuring a clear separation between data input, statistical processing, report generation, and graphical visualizations. This modularity is a characteristic consistent with principles of reusability and maintainability, as described by Sommerville (2011), facilitating system comprehension, testing, and evolution. The project aimed to approximate a usable product in an organizational context, incorporating advanced functionalities such as robust Excel file reading, exception handling, log generation, inclusion of unit tests, and automated production of HTML reports with analytical graphs. This completeness is a significant differentiator, as it transforms a simple linear regression application into a more powerful and auditable management tool.

From the perspective of user and AI interaction, the main differential was the reduction of friction in the project assembly stage. In the very first response, Claude Sonnet 4.6 presented the complete system structure, explained the function of each file, and provided objective execution instructions. This proactive and detailed approach reduced common operational risks, such as file organization errors or initial configuration failures, which were notable challenges in other scenarios. Only five messages were needed to achieve a functional solution, a significantly lower number than observed in the ChatGPT-5 with Scala scenario (20 messages), according to Table 1. This efficiency in the initial interaction demonstrates Claude Sonnet 4.6’s ability to understand and structure complex projects more autonomously, minimizing the user’s cognitive effort in the setup phase (FRANK; GODWIN, 2024). Nevertheless, the iterative cycle of execution and correction remained necessary, especially in compilation and dependency adjustments, evidencing that, even with a more sophisticated AI, human validation and adaptation to the execution environment are indispensable (OPENAI, 2024).

From a software engineering perspective, this was the most complete and sophisticated solution among all analyzed scenarios. In addition to console outputs, the system delivered a well-structured HTML report with cards and tables, standardized graphs by route, and unit tests applied to statistical functions. This richness of outputs and the inclusion of unit tests enhance the solution’s auditability, reliability, and managerial utility, making it more suitable for a corporate environment where decision-making is based on data and evidence (GIBELLINI et al., 2024). In quantitative terms, Table 1 indicates a correct execution rate of 33%, 113 suggestions for improvement, 849 lines of code, and a Code Quality Score (CQS) of 8.46. On the other hand, the gain in technical maturity and project completeness came with a larger structural volume, more dependencies, and more compilation and execution steps. This required greater attention to the environment to ensure experiment reproducibility, a trade-off consistent with software engineering practices that seek robustness and advanced functionality (WAZLAWICK, 2009). The practical implication is that, for organizations seeking more mature and production-ready software solutions, Claude Sonnet 4.6 with Scala, despite requiring a more controlled environment and greater initial setup effort, can deliver a final product with higher added value and greater decision support capacity.

Comparative Discussion and Implications

The analysis of the four experimental scenarios reveals distinct patterns in the performance of AI copilots (ChatGPT-5 and Claude Sonnet 4.6) across different programming languages (Python and Scala) for the development of a linear regression application for ETA estimation. In terms of interaction efficiency, measured by the “Number of messages sent to reach the solution” (Table 1), ChatGPT-5 with Python stood out with only 2 messages, indicating a remarkable ability to generate a functional solution with minimal intervention. This result corroborates studies that point to the efficiency of copilots in well-defined tasks, accelerating the completion of programming tasks (PENG et al., 2023). However, this efficiency may come with a leaner and less detailed solution, as observed in the scenario itself. In contrast, Claude Sonnet 4.6 with Scala, although it required 5 messages, delivered a more complete and structured solution, suggesting a balance between efficiency and response depth. The scenarios with Scala generally demanded more interactions (20 for ChatGPT-5 and 5 for Claude Sonnet 4.6), which can be attributed to the complexity of the Scala/Spark ecosystem and the need to manage dependencies and environment configurations, a challenge that AI cannot yet fully abstract without human intervention (WAZLAWICK, 2009).

The “Correct execution rate” (Table 1) showed a superiority of Python implementations. ChatGPT-5 with Python achieved a 50% correct execution rate, while Claude Sonnet 4.6 with Python obtained 20%. In Scala, the rates were significantly lower (5% for ChatGPT-5 and 33% for Claude Sonnet 4.6). This difference suggests that Python, with its simpler ecosystem and more consolidated libraries for data science (MÜLLER; GUIDO, 2016), offers a more conducive environment for generating functional code by AI copilots, with fewer compatibility and configuration issues. The higher error rate in Scala, especially with ChatGPT-5, reinforces the idea that the complexity of the execution environment is a critical factor that directly impacts the AI’s ability to generate executable code on the first try. This implies that, for users with little experience, Python may be the most accessible language to start using AI copilots, due to the lower entry barrier in terms of environment setup and debugging (FRANK; GODWIN, 2024).

Regarding the “Code Quality Score (CQS)” and the “Number of identified improvement suggestions” (Table 1), a trade-off was observed between code simplicity and completeness. ChatGPT-5 with Scala achieved the highest CQS (8.82) with only 93 lines of code and 11 improvement suggestions, indicating a lean solution with high structural quality, but with lower functionality. On the other hand, Claude Sonnet 4.6 with Scala, which delivered the most robust and complete solution (849 lines of code), presented 113 improvement suggestions and a CQS of 8.46. This correlation between a larger volume of code, more functionalities, and a higher number of improvement suggestions is expected, as static analysis tools tend to identify more areas for improvement in more extensive and complex code (PYLINT, 2024). The CQS, although standardized, should be interpreted in the context of the solution’s functionality and scope. A simpler solution may have a higher CQS due to having fewer points of failure or convention violations, while a more complex solution, even with a slightly lower CQS, may offer significantly greater functional value.

Qualitatively, Claude Sonnet 4.6, in both scenarios (Python and Scala), demonstrated a superior ability to structure projects in a more complete and product-oriented manner. Its responses included documentation, modular organization, and, in the case of Scala, even unit tests and interactive HTML reports. This approach is more aligned with the needs of a corporate environment, where auditability, maintainability, and the ability to generate management reports are crucial (SOMMERVILLE, 2011; GIBELLINI et al., 2024). ChatGPT-5, in turn, tended to provide more objective and direct solutions, requiring more manual assembly and refinement by the user to integrate components and generate more elaborate outputs. This difference suggests that Claude Sonnet 4.6 may be more suitable for users seeking a “copilot” that acts as a software architect, while ChatGPT-5 may be more effective for specific coding tasks or rapid prototyping where simplicity is a priority.

The practical implications of these results are multifaceted. For logistics managers and business professionals with little programming experience, AI copilots, especially in Python, can democratize access to developing data science applications, such as ETA forecasting. The ability to generate functional code with few interactions lowers the barrier to entry and allows these professionals to focus on the business problem logic, rather than excessively worrying about syntax or memorizing libraries (FRANK; GODWIN, 2024; NAGPAL, 2024). However, the need for human validation and the ability to diagnose and resolve environment issues remain crucial. Companies adopting these tools must invest in training so their users can not only interact with AI but also understand and validate the generated code, as well as manage execution environments.

For software engineering, the results indicate that AI copilots are powerful tools for increasing productivity and accelerating development, but they do not replace human expertise. The developer’s role evolves into a validator, refiner, and integrator of AI-generated solutions. The choice of AI tool and programming language should be strategic, considering the trade-off between ease of use and the sophistication of the final project. Projects requiring high robustness, modularity, and complex managerial outputs may benefit from models like Claude Sonnet 4.6, even if this implies greater environmental complexity and more initial interactions. On the other hand, for rapid prototypes or simpler tasks, ChatGPT-5 in Python may be the most efficient option. The research also reinforces the importance of prompt engineering as a fundamental skill for extracting the maximum potential of these tools, directing them to generate more assertive responses aligned with requirements (WHITE et al., 2023).

In summary, all interactions confirmed that AI tools can effectively co-pilot software development, allowing the user to achieve the main requirement of the problem. The interaction with Claude Sonnet 4.6 resulted in the richest project, compatible with a real corporate use scenario, while ChatGPT-5 produced leaner and more direct solutions, obtaining the highest score in the code quality evaluation variable presented in the methodology, but with less managerial detail. These results indicate that, despite the advancement of generative models, the user’s role remains fundamental to empirically validate the proposed solutions (ANICHE et al., 2025; WAZLAWICK, 2009). An AI copilot’s ability to generate functional, high-quality code is only part of the equation; the other, equally important part, lies in the user’s ability to effectively interact with the AI, validate its outputs, and integrate the solutions into a functional development environment.

As a suggestion for future work, two aspects stand out. First, it is recommended to analyze the computational cost in terms of tokens consumed per interaction and its relationship with the complexity of the generated program. In the experiment, Claude Sonnet 4.6 with Scala language produced an extensive HTML report, while the program generated by ChatGPT-5 returned only a final ETA number with graphs, suggesting a potential difference in token usage. Quantifying this consumption would allow for an evaluation of the economic efficiency of the models and justify the trade-off between output richness and the necessary computational resources, providing a more solid basis for decision-making regarding the adoption of these tools on a corporate scale. Second, the preparation and validation of the execution environment are highlighted, a critical aspect evidenced in this study. It was observed that the ChatGPT-5 scenario with Scala language required 20 iterations for functional solution (compared to only 5 for Claude/Scala), largely due to dependency failures and system incompatibilities. Future research can explore the inclusion of pre-verification instructions (e.g., checking library versions or the operating system) in the prompts, anticipating errors and reducing rework. These directions will complement the understanding of the balance between the sophistication of the final output and the computational and operational effort required from the user, providing a more holistic view of the viability and benefits of AI co-programming in different contexts.

4. Conclusion

It is concluded that the objective was achieved, as the study successfully evaluated the performance of the ChatGPT-5 and Claude Sonnet 4.6 models as copilots in the development of Python and Scala solutions for estimating arrival time (ETA) on transport routes. The analysis of effectiveness, quality of generated code, and user interaction experience demonstrated that AI tools can effectively co-pilot software development, allowing the user to achieve the main requirement of the problem. It was observed that interaction with Claude Sonnet 4.6 resulted in richer projects compatible with corporate scenarios, while ChatGPT-5 produced leaner and more direct solutions, with a higher code quality score but less managerial detail. In all interactions, the capacity of AI copilots to accelerate productivity was evident, although human validation and refinement remain crucial to ensure the functionality and adequacy of the solutions.

However, this study presented some important limitations. The consumption of “tokens” throughout the interactions was not considered, which impacts the evaluation of economic viability in intensive use. Additionally, the use of new and free accounts of AI models may have imposed performance restrictions, and the travel history database, generated by artificial intelligence, may introduce biases compared to real data. For future studies, it is recommended to analyze the computational cost in terms of tokens consumed by each interaction, relating it to the complexity of the generated program. Another suggestion is to explore the inclusion of preliminary verification instructions in the prompts, such as checking library or operating system versions, to anticipate errors and reduce rework, especially in more complex development environments like Scala.

Bibliographic References

ANICHE, Maurício et al. How do Copilot Suggestions Impact Developers’ Frustration and Productivity? ArXiv, 2025.

FRANK, Edwin; GODWIN, Olaoye. Democratizing Coding: How GitHub Copilot Makes Programming More Accessible. EasyChair Preprint 15074, 2024.

GIBELLINI, Giacomo et al. Impact of ETA Prediction on Last Mile Delivery Efficiency. Journal of Transport & Supply Chain, 2024.

MONTGOMERY, Douglas C.; PECK, Elizabeth A.; VINING, Geoffrey G. Introduction to Linear Regression Analysis. 5. ed. Hoboken: Wiley, 2012.

MÜLLER, Andreas C.; GUIDO, Sarah. Introduction to Machine Learning with Python: A Guide for Data Scientists. Sebastopol: O’Reilly, 201

NAGPAL, Anuja. Al Copilot for the Modern Developer: Leveraging GenAl in Software Development. International Journal of Scientific Research in Computer Science, Engineering and Information Technology, v. 10, n. 5, p. 702-711, 2024.

VAN DER SPOEL, S. J.; AMRIT, C.; VAN HILLEGERSBERG, J. Predictive Analytics for Truck Arrival Time Estimation: A Field Study at a European Distribution Center. International Journal of Production Research, v. 54, n. 23, p. 7053–7071, 2016.

Article originating from the Final Course Work of the Specialization in Software Engineering of the MBA USP/Esalq

To learn more about the course, click here and access the MBX Academy platform

You may also like

Executive Mba In Leadership And Management

November 23, 2026

Improvements in the efficiency of a secondary biological sludge drying plant

The management of industrial solid waste, especially secondary biological sludge, represented an operational and strategic challenge for a company in the pulp and paper sector. A secondary biological sludge drying plant, installed to meet environmental requirements and reduce costs, operated with low efficiency and high unavailability. The objective of this study was to evaluate and propose a set of actions to increase the operational availability of the plant, ensure the integral processing of the generated sludge, and reduce treatment and transportation costs, in addition to mitigating environmental risks. To this end, an analysis of the root causes of low efficiency was carried out, using tools such as the cause-and-effect diagram (Ishikawa) and the “5 whys” analysis, and hypotheses were tested to identify the most impactful factors. Three main root causes were identified: addition of low-load effluent to the process, absence of a dedicated maintenance team, and lower consistency of dewatered sludge. The proposed countermeasures, which included stopping the addition of effluent, hiring a maintenance team, and testing polymers, had a monthly implementation cost of R$ 35,000.00. An annual reduction in operating expenses of up to R$ 1,800,000.00 and maintenance costs of R$ 600,000.00 was estimated, in addition to a 25% reduction in operational unavailability. It was concluded that the proposed measures are viable, quick to implement, and capable of ensuring the integral processing of secondary biological sludge, strengthening the company’s ESG strategy and ensuring environmental compliance.

Keywords: Operational costs; Operational efficiency; ESG; Biological sludge; Sludge drying.

Data Science And Analytics For Operations

November 19, 2026

Polyp-YOLO: an efficient, low-latency detector for polyps in colonoscopies

The early detection of colorectal polyps is crucial for the prevention of colorectal cancer, and real-time computer-aided detection (CADe) systems have shown gains in endoscopic practice. The objective was to develop and validate a lightweight colorectal polyp detector, based on the YOLO architecture, capable of operating on restricted hardware with high precision and low latency. The methodology used public datasets of endoscopic images, partitioning the Kvasir-SEG dataset for training and internal validation, and CVC-ClinicDB and ETIS-Larib Polyp DB for cross-dataset evaluation. Lightweight variants of the YOLOv8, YOLO11, and YOLO26 families with 640×640 pixel input were evaluated. A grid search tested 70 combinations of optimizers and activation functions, and identified AdaBelief and LeakyReLU as the configuration with the best generalization. The optimization pipeline applied unstructured pruning, knowledge distillation, and fine-tuning. The optimized YOLO11n-seg model outperformed the higher-capacity architecture (YOLO26m-seg) in mAP50 and showed similar performance in F1-Score, operating with approximately seven times fewer parameters. It achieved an mAP50 of 0.7929 and an F1-Score of 0.7514 on the ETIS-Larib dataset, and fast inference was demonstrated in different formats, with real-time latencies. The explainability of predictions was validated by Grad-CAM activation maps. The proposed solution demonstrated itself to be a promising experimental tool for diagnostic support, with technical feasibility for integration into environments with reduced computational power, although it requires future clinical validation.

Keywords: Computer-aided detection; Edge computing; Hyperparameter optimization; Endoscopic image segmentation; Medical computer vision.

Data Science And Analytics For Operations

November 19, 2026

Multi-touch Attribution in E-commerce: A Comparison between Markov Chains and Last-Click

The research investigated Multi-touch Attribution (MTA) Models in e-commerce, seeking to overcome the limitations of the Last-Click model, widely used in the market. The objective was to compare the performance of first-order Markov Chains with Last-Click and Position-Based approaches, identifying the value of assistance channels frequently ignored. To this end, Markov Chain algorithms were applied to a large volume of purchase journey data from the Google Merchandise Store, extracted via BigQuery. The study probabilistically mapped the purchase journey and calculated the Removal Effect to quantify channel relevance. The results demonstrated that data-driven models identified the strategic role of discovery (awareness) and assistance channels, which Last-Click neglected in 65% of complex journeys. Simulated financial analysis indicated an approximate 28% hidden efficiency in Cost Per Acquisition (CPA) for Paid Search, compared to the Last-Click model. It was concluded that Markov Chains allowed for a more accurate mapping of purchase journeys, validating the technical feasibility of the modeling and providing evidence for more efficient budget allocation in digital media, mitigating the risk of early divestment in crucial channels.

Keywords: Assistance channels; Data science; E-commerce; Digital marketing; Media optimization.

Project Management

November 19, 2026

Integrated Software for Operational Communication and Control: Practical Evidence in a Medium-Sized Company

The study analyzed the impacts of the lack of integration between commercial and operational modules of an integrated management software (ERP/CRM) in a medium-sized company in the mechanical engineering sector. The main objective was to evaluate practical evidence of communication and operational control optimization, identify bottlenecks, and formulate improvement proposals. A qualitative-quantitative approach was adopted through a single case study with documentary research, based on the extraction and filtering of historical task records from the Bitrix24 software and statistical correlation analysis between workload and allocated team. Based on the diagnosis, an action plan structured in the 5W2H tool was developed. The results revealed that 54.4% of the registered tasks consisted of duplicate, test, or practically useless records, generated by manual insertion during the scope transition between commercial CRM and engineering. It was also demonstrated that the increase in the commercial team linearly accompanied the growth of inefficient tasks, polluting the database and masking the organization’s real productive capacity. It was concluded that the automation of workflows and native integration between modules are essential to mitigate operational and financial risks, providing replicable guidelines for data governance in small and medium-sized enterprises.

Keywords: System Customization; Enterprise Resource Planning (ERP); Task Management; Management Software.

Project Management

November 19, 2026

Supervised learning in voltammetric quantification with electrochemical sensors

The application of supervised learning in the voltammetric quantification of paraquat in artificial urine was evaluated. The study aimed to quantitatively assess the predictive performance of supervised learning models compared to a univariate “baseline”, preserving the independence between devices in the training and testing sets. The research was conducted as an applied case study, processing data from four physical devices, each evaluated under a blank condition and six paraquat concentration levels, totaling 28 square wave voltammetry (SWV) curves. A computational “pipeline” integrated the automated reading of files, the organization of curves into current-potential matrices, the generation of the potential map, and device-specific blank correction. Five approaches were considered: conventional univariate calibration, predictive univariate “baseline”, partial least squares (PLS) regression, support vector regression (SVR), and random forest (RF). Predictive evaluation was performed by device-grouped cross-validation. PLS showed the best predictive performance for curves from a device not used in training, with an R² of 0.7981. RF exhibited intermediate performance, while SVR and the predictive univariate “baseline” showed inferior and similar performance between themselves. It was concluded that a compact multivariate representation of the voltammetric profile was more favorable for inter-device prediction than increasing model flexibility under the studied conditions. Grouped validation preserved independence, but the limited number of devices restricts the generalization of the results.

Keywords: Supervised learning; Paraquat; PLS; Electrochemical sensors; Square wave voltammetry.

Project Management

November 19, 2026

Improvement of Inventory Management via Lean Six Sigma: Study in the Paper Industry

Organizations seek methodologies to reduce waste, increase efficiency, and become more competitive, promoting sustainable improvements in their processes. In this context, the study aimed to apply the Lean Six Sigma methodology, through the DMAIC cycle, to improve inventory management in a paper industry manufacturing pneumatic hoses, aiming to increase the accuracy between physical and systemic inventories and enhance the visual management of parts storage. The research was developed from the collection and analysis of data extracted from the company’s ERP system. Tools such as SIPOC, Ishikawa Diagram, and 5 Whys were used for the definition and identification of the root cause of the problem. As improvement proposals, a Digital Kanban system and an adaptation of the Two-Bin system, called the Three-Bin System, were implemented, in addition to the development of standardized operating procedures and the establishment of control mechanisms. The results demonstrated a significant improvement in inventory accuracy, raising the lowest identified index from 28% to 80%, and detected discrepancies between systemic and physical records equivalent to R$ 134,335.53. It was concluded that the application of Lean Six Sigma, combined with Project Management, represented an effective approach for conducting operational improvement projects, contributed to increased reliability of inventory information, to the improvement of material control processes, and to the strengthening of the organization’s operational management.

Keywords: Inventory accuracy; DMAIC; Visual management.

Data Science And Analytics For Operations

November 19, 2026

Predictive Analysis Methodology for Performance Optimization in E-commerce: Correlation between Public Data and Paid Media

A predictive analysis methodology was developed for e-commerce, integrating transactional data and public search trends. The objective was to develop and validate a predictive model, based on machine learning algorithms, capable of correlating organic search trends with sales performance and paid media costs in the Beauty and Health category of Brazilian e-commerce. The Brazilian E-Commerce Public Dataset by Olist and data from Google Trends were used, processed in Python with the Random Forest Regressor algorithm. A moderate inverse correlation (r = -0.43) with a seven-day lag was identified between organic search volume and purchase. Initial models, based solely on behavioral variables, presented insufficient metrics (R² = -0.47; MAE of R$ 2,120.54). The incorporation of microeconomic (average ticket and shipping) and macroeconomic (exchange rate and Ibovespa index) variables raised the R² of the final model to 0.29, with an MAE of R$ 1,489.63, representing a 24.7% reduction in error compared to the baseline. Temporal cross-validation showed that, in periods of mature operation (2018), the model achieved an R² of 0.42. It was concluded that isolated search volume explains the moment of consumer interest, but not the financial magnitude of sales, making the fusion with transactional and economic data mandatory for predictive viability.

Keywords: Beauty and Health; Consumer Behavior; Google Trends; Machine Learning; Time Series.