LLMs for ITSM Data Analytics
LLMs for ITSM Data Analytics
September 2024
The authors declare that they are the sole authors of this thesis and that they have not used any
sources other than those listed in the bibliography and identified as references. They further declare
that they have not submitted this thesis at any other institution to obtain a degree.
Contact Information:
Author(s):
Ganesh Mahadev Udata
E-mail: gaud22@[Link]
K N Venkata Sai
E-mail: nekp22@[Link]
University advisor:
Dr. Huseyin Kusetogullari
Department of Computer Science
We would also like to extend our heartfelt thanks to Mikael Nilsson, our manager
at Ericsson, for his professional mentorship and for providing me with the opportunity
and resources to pursue this research. His support and belief in our abilities have been a
constant source of inspiration.
Special thanks to Dr. Huseyin Kusetogullari, our academic supervisor at the uni-
versity, whose expert advice and constructive feedback have significantly contributed to
the academic rigour of this thesis. His patience and knowledge have been greatly appre-
ciated throughout this journey.
Finally, We want to express our deepest appreciation to our friends and family for their
unwavering support, understanding, and encouragement during this challenging period.
Their belief in us has been a source of strength, and we are forever grateful for their love
and care.
iii
Contents
Abstract i
Acknowledgments iii
1 Introduction 1
1.1 Research Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Aim and Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Ethical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Background 5
2.1 ITSM and Incident Management . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 Definition and Importance . . . . . . . . . . . . . . . . . . . . . . 5
2.1.2 Role of Incident Management Data in ITSM . . . . . . . . . . . . 6
2.2 Overview of Data Analytics . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Data Analytics and its significance in extracting insights from data 7
2.2.2 Common Techniques and Methodologies . . . . . . . . . . . . . . 8
2.2.3 Relevance of Data Analytics in context of ITSM . . . . . . . . . . 8
2.3 Overview of LLMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.1 Introduction to LLMs . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Architecture and Functioning of LLMs . . . . . . . . . . . . . . . 10
2.4 Code Generation Capabilities of LLMs . . . . . . . . . . . . . . . . . . . 11
2.4.1 Significance of Code Generation in general . . . . . . . . . . . . . 11
2.4.2 Application of Code Generation with LLMs . . . . . . . . . . . . 12
2.4.3 Significance of Code Generation in Data Analysis Tasks . . . . . . 13
2.5 Prompting Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5.1 Various aspects of restricting an LLMs response using prompts . . 13
2.5.2 Chat and Text completion models . . . . . . . . . . . . . . . . . . 14
2.6 Evaluation of LLMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Related Work 17
3.1 LLMs in Data Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 LLMs in ITSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Research Gap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3.2 Problem Definition and Formulation . . . . . . . . . . . . . . . . 20
v
3.3.3 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4 Method 21
4.1 Research Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.1 Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2.2 Search Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2.3 Inclusion and Exclusion Criteria . . . . . . . . . . . . . . . . . . . 22
4.2.4 Quality Assessment Criteria . . . . . . . . . . . . . . . . . . . . . 23
4.2.5 Data Extraction Strategy . . . . . . . . . . . . . . . . . . . . . . 23
4.2.6 Data Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3 Experimentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3.1 Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3.2 Research Question . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3.3 Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3.4 Dependent and Independent Variables . . . . . . . . . . . . . . . 24
4.3.5 Dataset Description . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.6 LLMs Selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.7 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.8 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.9 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.10 Confounding Factors . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4 Threats to Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.1 Internal Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.2 External Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.3 Construct Validity . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.4 Conclusion Validity . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.5 Validity and reliability of approach . . . . . . . . . . . . . . . . . . . . . 32
6 Discussion 63
6.1 Discussion for RQ1 and RQ2 . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.1.1 Zero-Shot Prompting . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.1.2 Priming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.1.3 Chain-of-Thought Prompting . . . . . . . . . . . . . . . . . . . . 64
6.2 Discussion for RQ3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2.1 Descriptive Questions . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2.2 Statistical Questions . . . . . . . . . . . . . . . . . . . . . . . . . 66
6.2.3 Graph Plot Questions . . . . . . . . . . . . . . . . . . . . . . . . 67
6.2.4 Data Cleaning Questions . . . . . . . . . . . . . . . . . . . . . . . 67
6.3 Potential Drawbacks of LLMs in ITSM . . . . . . . . . . . . . . . . . . . 68
vi
7 Conclusions and Future Work 71
7.1 Summary of the findings . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
7.1.1 Prompting Strategies for Code Generation . . . . . . . . . . . . . 71
7.1.2 LLM Performance in Code Generation . . . . . . . . . . . . . . . 71
7.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
References 75
vii
List of Figures
ix
List of Tables
xi
Chapter 1
Introduction
However, despite the structure provided by ITSM frameworks like ITIL, current ITSM
processes still face significant inefficiencies, especially when it comes to incident manage-
ment and data analysis. Manual data handling is labor-intensive, and slow incident reso-
lution often occurs due to the difficulty of identifying root causes from large and unstruc-
tured incident data. Identifying trends and recurring issues is particularly challenging,
leading to reactive problem-solving instead of proactive incident prevention. Moreover,
the sheer volume of incident logs and their complexity makes it difficult for IT teams to
extract meaningful insights in a timely manner.
These challenges are exacerbated by the limitations of traditional data analytics meth-
ods, which require a substantial amount of human intervention to preprocess data, identify
patterns, and produce actionable insights. As organizations continue to handle increas-
ingly complex and voluminous ITSM data, there is a growing need for more sophisticated
tools that can streamline and automate the analysis process.
This is where Large Language Models (LLMs) come into play. LLMs have the po-
tential to revolutionize ITSM data analysis by automating tasks such as data extraction,
pattern recognition, and root cause analysis. By leveraging LLMs, organizations can
move beyond manual data processing and reactive incident handling to a more proac-
tive and automated approach . For example, LLMs can quickly analyze incident reports
to identify underlying patterns that may go unnoticed by human analysts, offering in-
sights that can help reduce downtime and improve service quality . Additionally, LLMs
can generate code for custom data analytics tasks, reducing the need for specialized data
analysts and empowering IT teams to make more informed decisions with fewer resources.
1
2 Chapter 1. Introduction
LLM’s have many applications and Data analytics also comes under one of application
where LLM generated code to analyze and explore data to give useful information.
In this research, we propose utilizing LLMs to streamline the data analytics process
in ITSM, with a specific focus on incident management data. By applying advanced
language models, we aim to address the inefficiencies currently present in ITSM processes
and enhance the decision-making capabilities of IT teams.
This research will assess the ability of various language models to generate code for
data analytics, specifically using ITSM Incident Managment data. It will also explore
different prompting techniques to evaluate their effectiveness in producing accurate and
structured outputs while facilitating meaningful interactions for data analysis. By sys-
tematically comparing the performance of different models and considering ITSM-specific
constraints, this study seeks to identify the most effective approaches and models for en-
hancing data analytics workflows in the ITSM domain.
1.2.1 Aim
The aim of this thesis is to evaluate the code generation capabilities of modern LLMs
for data analytics, specifically using IT Service Management (ITSM) data. The study
seeks to build a system that not only generates accurate and structured code but also
engages users in meaningful conversations, providing actionable insights based on the
outputs of code execution. By exploring different prompting techniques and comparing
the performance of various language models while considering ITSM-specific constraints,
this research aims to identify the most effective approaches and models for enhancing
data analytics workflows in the ITSM domain.
1.3. Research Objectives 3
RQ3: Which Large Language Model (LLM) demonstrates superior performance in multi-
turn interactions for code generation in data analytics and builds the conversation to
analyze data based on user feedback?
Research Methodology: Experiment
Justification: We believe an experimental methodology is appropriate for assessing the
performance of various LLMs in multi-turn interactions for code generation, where it-
erative refinement based on user feedback is critical. By systematically testing different
models, the study can directly measure and compare their ability to generate, refine, and
improve code within ITSM-specific contexts.
• Bias and Fairness: LLMs can inherit biases from the data they are trained on,
leading to biased decision-making in ITSM, such as unfair prioritization of inci-
dents. Bias detection and mitigation strategies should be applied to ensure fair and
equitable outcomes across all tasks.
• Data Privacy Risks: LLMs in ITSM process large amounts of sensitive data,
raising privacy concerns. There is a risk of data exposure despite anonymization,
especially when models are connected to external systems. To mitigate this, strict
security measures like encryption, access control, and compliance with privacy laws
are crucial.
• Societal Aspects: While LLMs can improve ITSM efficiency, they may also lead to
job displacement by automating routine tasks. Ensuring that LLMs augment rather
than replace human expertise will help maintain a balance between automation and
human involvement in decision-making.
1.5 Outline
• Chapter 2 - Provides an in-depth review of ITSM and data analytics, including the
relevance of incident management data. This chapter also explores the foundational
concepts of LLMs, giving readers an understanding of their role in code generation
for data analytics tasks.
• Chapter 3 - Reviews the existing literature on LLMs in data analytics and ITSM.
This chapter highlights gaps in the current research and positions the contribution
of the thesis within this context.
• Chapter 5 - Presents the findings from the experiments, including results on the
effectiveness of different prompting techniques and the comparative performance of
LLMs in generating code for ITSM data analytics.
• Chapter 6 - Interprets the results in the context of the research questions. This
chapter discusses the implications of the findings, offering an in-depth analysis of
their significance for the ITSM and LLM communities.
• Chapter 7 - Summarizes the key conclusions drawn from the research and provides
suggestions for future studies. This chapter reflects on the contributions made by
the thesis and how it paves the way for future advancements in LLM-based data
analytics.
Chapter 2
Background
The importance of ITSM lies from its ability to match IT services with business objec-
tives, hence boosting overall efficiency and effectiveness. It improves customer satisfaction
by guaranteeing structured and consistent IT services, assists with risk management by
identifying and reducing IT-related issues, and maintains company continuity by min-
imising downtime.
5
6 Chapter 2. Background
Data analytics is defined as the application of computer systems to the analysis of large
datasets to support decision-making. It is an interdisciplinary field that incorporates el-
ements from various scientific disciplines, including statistics, machine learning, pattern
recognition, system theory, operations research, and artificial intelligence [1]. The knowl-
edge discovery in databases (KDD) process involves six phases: selection, preprocessing,
transformation, data mining, interpretation, and evaluation [12]. Similarly, the Cross
Industry Standard Process for Data Mining (CRISP-DM) includes six phases: business
understanding, data understanding, data preparation, modelling, evaluation, and deploy-
ment [13]. For simplicity, these phases can be condensed into four main stages: prepara-
tion, preprocessing, analysis, and postprocessing, shown in 2.1.
The data analytics process starts with Preparation, which includes planning, data
gathering, feature creation, and data selection. Preprocessing is the process of cleaning,
filtering, completing, correcting, standardising, and transforming data to ensure quality
and consistency. During the Analysis phase, techniques including visualisation, corre-
lation, regression, forecasting, classification, and clustering are used to identify patterns.
Finally, Postprocessing entails analysing results, recording methodology and conclu-
sions, and assessing the correctness and effectiveness of the analysis. This organised
approach converts raw data into actionable insights, allowing for better decision-making
and increased operational efficiency.
Data analysis is critical for obtaining insights from data since it allows businesses to
convert raw data into usable knowledge. Data analysis, which employs techniques such as
statistical analysis, machine learning, and data visualisation, aids in the identification of
previously unknown patterns, trends, and connections. This method promotes evidence-
based decision-making, increases operational efficiency, and identifies areas for innovation
and improvement. Businesses that methodically analyse data can foresee future trends,
optimise processes, and acquire a competitive advantage in their respective industries.
Also, data analytics enhances customer satisfaction and strategic planning in ITSM.
By analysing feedback and service performance data, IT teams may better tailor ser-
vices to user needs, resulting in faster response times and higher customer satisfaction.
Data analytics insights enable businesses to stay ahead of industry trends and respond
to changing demands, making strategic planning more effective. This competitive advan-
2.3. Overview of LLMs 9
tage allows ITSM organisations to innovate and supply more services, leading to better
operational efficiency and business success.
LLMs such as GPT-3 and GPT-4 define the current era, focussing on expanding
model and dataset sizes to achieve unprecedented capabilities. These models are trained
on large datasets and given a lot of parameters to help them do real-world tasks using
prompt-based completions and emergent skills [2]. The move from task-specific helpers
to general-purpose task solvers demonstrates LLMs’ dramatically increased functional
capability, which allows them to execute complicated reasoning, write coherent language,
and even participate in meaningful dialogues with humans.
10 Chapter 2. Background
5. Positional Encoding
Since there is no recurrence or convolution in the model, positional encodings are
required to inject information about the relative or absolute position of the tokens
in succession. This is accomplished by utilising the use of sine and cosine functions
at various frequencies.
but also simplifies programming by allowing non-experts to describe their needs in plain
terms [20]. Advances in machine learning approaches, such as few-shot learning, have
improved the models’ ability to interpret and write code, allowing them to perform more
accurately and efficiently on a variety of coding jobs.
3. Automatic Program Repair: LLMs can automatically identify bugs and suggest
fixes, transforming the debugging and maintenance phases of software development.
Understanding both the code’s goal and its actual functionality allows these models
to recommend realistic and immediately relevant improvements, minimising the
time and effort spent on debugging and maintenance.
Several modern day prompting techniques are used to simplify and manage responses
from LLMs. These techniques focus on key aspects that help make the responses more
controllable and also in a format a prompt engineer expects answers so that he can
connect chains with other prompts together.
overly simplistic explanations. This principle extends to other domains like finance,
enterprise, schools, and hospitals, where the tone should be adjusted based on the
target audience using the application.
• Format: Format is crucial for prompt engineers. To build applications with com-
plex prompt chains, it’s essential to restrict LLM responses to a specific format,
such as YAML, JSON, bullet points, or code generation. This ensures consistency
and makes it easier to integrate responses into broader workflows.
• There are scenarios where a prompt engineer can apply different types of restrictions
to an LLMs response, such as instructing the LLM to simply say "no" when it lacks
sufficient information or limiting its responses to just "yes" or "no" etc.
highlighting the importance of model architecture and parameter size on code gen-
eration effectiveness.
The significance of using LLMs in data analysis lies from their transformational ca-
pacity to automate and enhance complex operations that formerly needed significant
manual effort. LLMs, such as GPT-3.5 and GPT-4, have proved their ability to handle
large volumes of textual data, allowing for the extraction of useful insights necessary for
informed decision-making. LLMs improve the efficiency and depth of data analysis by
dealing with unstructured data such as customer feedback, software documentation, and
other text-based material, allowing for the discovery of trends, patterns, and linkages that
traditional methods may miss. This not only accelerates the data analysis process but
also offers a new level of scalability and precision, which is vital in managing enormous
datasets in domains such as software engineering and qualitative research [33].
An advanced system using LLMs such as GPT-3.5 and GPT-4 was introduced to auto-
mate keypoint extraction and relevance evaluation in qualitative data analysis (QDA). In
this context, keypoints relate to critical aspects or concepts within data that are required
for understanding the primary ideas or themes, and are traditionally found through a
time-consuming manual coding process. The system consists of two main components:
the Keypoints Extractor, which uses ChatGPT to generate and refine keypoints from
17
18 Chapter 3. Related Work
textual inputs while managing token limits of the models, and the Keypoints Relevance
Evaluator, which assesses how relevant these keypoints are to the input text and provides
scores to gauge their applicability [35]. This approach demonstrates LLMs’ ability to
automate the extraction and evaluation of significant thematic aspects from qualitative
data, hence streamlining difficult QDA processes.
The integration of LLMs like GPT-3.5 and GPT-4 into scientific research, particu-
larly for automating tasks such as code generation, data analysis, and visualization, has
shown potential to significantly enhance productivity and efficiency. This study rigor-
ously evaluates these models across various coding scenarios, highlighting a considerable
variability in output integrity [33]. The findings indicate that, while LLMs can greatly
reduce manual coding labour, ensuring the quality and reliability of their outputs re-
mains a significant difficulty. This involves the installation of comprehensive evaluation
processes to ensure that outputs satisfy the strict criteria necessary in scientific research,
emphasising the necessity of precision and dependability in the efficient use of LLMs
within scientific workflows.
However, integrating LLMs with existing ITSM frameworks such as ITIL offers several
hurdles that must be overcome in order to fully realise their potential. These frameworks
are complex, necessitating a thorough understanding of both the technical and organisa-
tional aspects of ITSM. To be effective, LLMs must be thoroughly trained and aligned
with these frameworks to guarantee that their outputs are in line with recognised ITSM
practices. Concerns about data privacy and security are also paramount, considering the
vast volumes of sensitive information processed by LLMs. Despite these issues, LLMs in
3.3. Research Gap 19
ITSM offer numerous benefits, including real-time incident resolution, predictive analytics
for proactive service management, and more personalised customer assistance. Effective
management of these difficulties can considerably improve an organization’s IT service
delivery capabilities [38].
The "Chat2Data" system integrates LLMs with RAG and vector databases [40], im-
proving data analysis by tackling frequent difficulties such as hallucination, high opera-
tional expenses, and low accuracy for complex tasks. The system embeds domain-specific
knowledge via RAG to prevent hallucinations, leverages vector databases to limit LLM
interactions, lowering costs and improving performance, and employs a pipeline agent
to break difficult jobs into smaller subtasks for increased accuracy. "Chat2Data" has
been tested in real-world scenarios and can handle both structured and unstructured
data quickly. For structured data, it transforms natural language queries into SQL, using
vector databases to extract relevant domain knowledge and caching frequent queries to
speed up results.
outputs.
3.3.3 Contribution
Our research aims to bridge this gap by systematically evaluating various LLMs in data
analytics tasks in a conversation exchange. We focus on identifying models that excel in
scenarios where continuous user input is necessary to refine the AI’s responses, ultimately
reducing hallucinations and enhancing the contextual relevance and accuracy of the gen-
erated outputs. Additionally, we seek to discover effective prompting techniques that can
further guide LLMs in producing desired outputs. The insights gained from this study
will contribute to a deeper understanding of LLMs’ potential and limitations in data
analytics, offering practical applications and strategies for improving their performance
in this critical field.
Chapter 4
Method
In addition to the literature research, we will conduct empirical testing and validation
of the prompting methodologies. We intend to implement the most promising method-
ologies from the literature and evaluate their impact on language models’ performance in
real-world data analytics applications. By evaluating various strategies in controlled en-
vironments, we hope to provide specific, evidence-based recommendations for improving
LLMs in code generation.
For Research Question 3 (RQ3), we will rely only on experiments to establish the ideal
LLM for multi-turn interactions when developing data analytics code. These studies will
simulate scenarios in which the model iteratively refines its code in response to user feed-
back, simulating real-world applications in ITSM. By carrying out these experiments for
RQ2 and RQ3, we ensure that the theoretical insights gained from the literature study
are carefully evaluated and validated in real-world scenarios.
When handling user feedback loops, we aim to guide the LLM when it generates
hallucinated code or output. If the code contains errors, we provide specific error mes-
sages along with any possible correction suggestions. If the LLM generates irrelevant or
incorrect information, we steer its responses in the right direction by offering targeted
feedback. These feedback loops are designed to test the model’s ability to self-correct
and improve the accuracy of its responses to user queries.
21
22 Chapter 4. Method
the Review. The planning phase focuses on specifying the research questions, developing
review protocol and validating the review protocol. The conduct phase includes identi-
fying relevant research. Selecting primary studies, extracting and synthesising the data.
Finally, the documentation phase is to write and validate the report [42]. The following
steps are included in our research for performing literature review.
1. The data sources that we considered for finding the relevant literature are IEEE
Xplore, Google Scholar, Scienedirect, Semantic Scholar, Research Gate, and ACM
Digital Library.
2. The search terms that we have considered are Prompt Engineering, LLMs, Code
generation, Data Analytics and Machine Learning
3. The search strings that we have considered to find the appropriate literature are as
follows:
• Research that did not provide empirical data or was purely theoretical without
validation.
• Articles published more than five years ago unless they were seminal works directly
influencing current research.
1. The robustness of the methodologies used in the studies, including the design of
experiments and the statistical analysis of results.
2. The applicability of the findings to the research question, particularly in the context
of data analytics and code generation.
4.3 Experimentation
Experimental methodology, a research approach involves manipulating one variable to
determine if it can cause an effect on another variable, within a controlled environment.
The main objective of the experiment is to evaluate the hypothesis, through using various
24 Chapter 4. Method
4.3.1 Goal
The goal of the experiment is to evaluate the effectiveness of various prompting strategies
and LLMs to generate accurate and relevant code for data analytics based on ITSM
Incident data. The experiment attempts to determine the most effective strategies for
improving LLM performance, particularly in multi-turn interactions where user feedback
is used to iteratively enhance LLM answers.
4.3.3 Hypothesis
Hypothesis for RQ2
• H1: The prompting strategies identified does not significantly improve the perfor-
mance of LLMs in generating accurate and relevant code for data analytics.
• Relevance: The degree to which the refined code meets the specific ITSM task
requirements.
• Clarity: The degree to which the code generated is clear i.e., well strutted amd
easy to understand.
Each row in the dataset corresponds to a single IT incident. The columns capture
various attributes of each incident, which are essential for understanding the status,
severity, and management of these incidents within an IT service environment. These
attributes include:
• State: The current state of the incident (e.g., Open, Closed, In Progress).
• Priority, Impact, and Urgency: Fields that classify incidents based on their
severity and business impact, helping prioritize them for resolution.
• Timestamp Columns: These capture important lifecycle data, such as the time
the incident was opened, assigned, resolved, and closed.
• Category and Subcategory: These fields classify incidents into broader cat-
egories (e.g., Network, Software, Hardware) and subcategories for more granular
analysis.
• SLA Indicators: Fields indicating whether incidents were resolved within the
agreed Service Level Agreement (SLA), reflecting the efficiency of incident manage-
ment.
text, assisting with coding, and comprehending complex user enquiries. Its training data
contains large-scale multilingual datasets, providing it an advantage in managing a wide
range of linguistic inputs and outputs.
[Link] GEMMA2 9B
2
GEMMA 2 is based on the science behind Google’s Gemini models. It has 2 billion
and 7 billion parameters, making it lighter than other LLMs, but well optimised for
tasks like instruction following, factual correctness, and coding [45]. The model was
fine-tuned using supervised fine-tuning (SFT) and reinforcement learning from human
feedback (RLHF), which improved its ability to generate accurate code and solve technical
challenges. GEMMA 2 has been evaluated in benchmarks such as HumanEval, where it
performed well in code creation.
[Link] PHI3:14B
3
PHI-3 is a very capable transformer-based model with 14 billion parameters. It has
been optimised for jobs such as multilingual code generation and advanced reasoning.
Phi-3 models are lightweight but powerful, with considerable gains in code generation
performance across a variety of programming environments. This model is suitable for
several use cases, including text creation and programming operations [46]. PHI3’s per-
formance has been examined using benchmarks such as HumanEval and PIQA, and it
has proved its capacity to generate code and solve complicated problems.
Component Specification
CPU 11th Gen Intel(R) Core(TM) i9-11950H @
2.60GHz
(8 Cores, 16 Threads)
RAM 64 GB
GPU NVIDIA RTX A3000 6 GB Graphics
(3840 CUDA Cores)
Storage 1TB SSD
Component Specification
Operating System Windows 10
Programming Language Python 3.12.3 4
Important Libraries Langchain5
OpenAI6
Streamlit7
OLLAMA8
Pandas9
Transformers10
Docker11
Tornado12
Development Environment VS Code IDE 1.91.1
Other Tools OLLAMA
Docker
4
Python Documentation
5
Langchain Guide
6
OpenAI
7
Streamlit Documentation
8
OLLAMA Documentation
9
Pandas Documentation
10
Hugging Face Transformers
11
Docker Documentation
12
Tornado Documentation
28 Chapter 4. Method
4.3.8 Implementation
For this experimentation there are 3 main important [Link] UI component
is used to connect chain of prompts together and also interact with code execution
component as well as LLM component. You can refer to Figure 4.2 for high level
overview of how all of there components work together.
• LLM Component: The LLM Component serves as the backbone of our appli-
cation, enabling powerful language processing and data analysis capabilities. Cur-
rently, we’ve used OLLAMA for infering LLMs. The architecture is flexible, allowing
easy integration with other API-based LLMs such as ChatGPT, Gemini, Claude,
or any other leading LLMs (For the current experiment we are using only open
source models.) . This adaptability ensures that application can leverage the latest
advancements in language model technology to deliver optimal performance.
• UI Component: The user interface (UI) is where users engage with the appli-
cation. It offers an environment for uploading data files and interacting with the
LLM. Users can ask questions related to their datasets, and the UI facilitates easy
communication between the user and the LLM, making data analysis accessible
even to those without technical expertise. The main purpose of this UI interface is
to to create abstraction of underlyign prompts. We have designed this experiment
in such a way that no only we connect components interact but also connect chain
of prompts in such a way that we can control inputs and outputs.
4.3.9 Evaluation
We have curated a dataset of questions that will be presented to each LLM sequen-
tially. If an LLM generates irrelevant or incorrect answers, we provide guiding feedback
to assist in correcting its output. These questions are designed to mimic real-world sce-
narios, comparing how a human might approach a task versus how an LLM would solve
the same problem. We have established specific guidelines to evaluate the LLMs’ outputs.
RQ2: To determine the most effective prompting technique, we can evaluate them
using a set of curated questions which were mentioned before. The assessment focuses
on a single LLM and begins by importing the dataset on which we plan to perform data
[Link] we pose a question to an LLM, the first crucial step is importing the
necessary data into the environment. If this step fails, the entire data analytics task
cannot proceed, making it a key criterion for evaluating the effectiveness of prompting
techniques. Successful data import is essential, as it allows the LLM to perform further
4.3. Experimentation 29
analysis and answer questions based on the data. We assess the prompting technique
based on this criteria.
RQ3 : Given that we are assessing the LLMs’ data analytics capabilities in multi-
turn conversations with a feedback loop, traditional automated assessment tools are in-
adequate. Therefore, this evaluation is conducted manually, as no existing frameworks
can handle this task. The LLMs’ outputs are assessed based on the following criteria:
• Correctness: The correctness score is assigned to the overall output of a conver-
sation according to these rules:
– 5 - Completely Correct: The response is entirely accurate, aligns perfectly
with known facts or data, and has no errors.
– 4 - Mostly Correct: The response is largely accurate, with minor errors or
omissions that do not significantly impact the overall correctness.
– 3 - Partially Correct: The response contains a mix of accurate and inac-
curate information, with the correct information being more prominent, but
some important details are missing or incorrect.
– 2 - Mostly Incorrect: The response is largely inaccurate, with only a few
correct details that do not substantially affect the overall wrongness.
– 1 - Completely Incorrect: The response is entirely wrong, with no correct
information or a complete misinterpretation of the question.
• Relevance: The relevance score is assigned to the overall output of a conversation
according to these rules:
– 5 - Highly Relevant: The response is fully aligned with the question’s intent,
directly addressing the main point without any deviation.
– 4 - Mostly Relevant: The response is generally aligned with the question’s
intent but includes some minor irrelevant details or misses some nuances.
30 Chapter 4. Method
The combined score of clarity, relevance, and correctness indicates which model per-
forms best.
variability. All LLMs will receive the same prompt structures, ensuring that the
performance differences are due to the models themselves rather than variations in
prompting.
The results and analysis discussed in this section are intended to address the research
issues that underlie this study. The first two research questions (RQ1 and RQ2) seeks
to determine which prompting tactics optimise LLM performance when producing code
for data analytics. It also examines how these ideas are used in real-world data analytics
systems. The research question (RQ3) looks at which LLM does better in multi-turn
interactions for code generation, especially when user feedback is continuously added to
create conversations and guide the model towards making more accurate and relevant
results.
Figure 5.1 shows the trend of published articles from 2019 to 2024. Starting with
one article in 2019, publications will gradually rise over the next few years, with two
articles in 2020 and three in 2021. Between 2021 and 2022, the number of papers grows
dramatically, reaching seven, indicating greater research interest. This trend continues
into 2023, with 13 papers produced, indicating a significant increase. By 2024, the number
33
34 Chapter 5. Results and Analysis
of publications had reached a peak of 16, suggesting a continuous and sustained upward
trend in research output over the period.
From Figure 5.2. With 16 published articles, Google Scholar is the leading source of
research on this topic. Semantic Scholar and Research Gate are close behind, with nine
and ten articles, respectively. ACM Publication and Hugging Face have a small presence,
with six and one articles, respectively.
Figure 5.3 depicts the distribution of prompting strategies based on the number of ar-
ticles studied in the literature. It shows that zero-shot prompting is the most researched
strategy, with 15 papers, highlighting its importance for tasks that require models to
generalise without examples. 13 studies have closely followed Chain of Thought (CoT)
prompting, highlighting its effectiveness in improving logical reasoning and complex prob-
lem solving. Priming/Seed prompting, which is explored in nine studies, demonstrates
5.1. Literature Review Findings 35
a great interest in guiding models with specific inputs to provide contextually relevant
results.
Table 5.1 summarises the most successful prompting strategies for enhancing LLM
performance in data analysis code generation. Based on a literature review , the table
lists different strategies, such as zero-shot and self-consistency prompting, that have been
shown to make generated code more correct, logical, and useful. The papers included in
this review were chosen based on how they used these strategies in LLM applications.
Prompting Strat-
Articles Definition
egy
This technique asks the model to do
a task without providing any examples
Zero shot [47–55] , [56–59] or prior context. The model is meant
to understand the task just from the
prompt and produce an answer.
In this strategy, the model is given
a few instances (usually two or five)
within the prompt to help it respond.
Few Shot [26, 60–64] , [58] The examples help the model under-
stand the necessary format and con-
text, which improves its ability to com-
plete the task.
This technique involves prompting the
model to generate intermediate reason-
ing steps before arriving at the final an-
Chain of Thought [55,65] , [66–72] , [58,
swer. By breaking down the thought
(CoT) 59, 73]
process, the model performs better on
tasks that require logical reasoning or
complex problem-solving.
In this strategy, the model is given a
seed or "priming" input that contains
Priming or Seed information that directs it to a specific
[74–82]
Prompting task or output. The prompt serves as a
cue for the model to provide more rele-
vant responses.
This prompting strategy is designed to
improve the reasoning performance of
Self Consistency
[83–87] LLMs while performing complex tasks
Prompting
that demand logical thinking or various
reasoning paths.
Based on the literature review, we selected the Zero-shot, Chain of Thought (CoT),
and Priming/Seed prompting strategies for their distinct advantages in increasing the
performance of LLMs for code generation in data analysis. Zero-shot prompting allows
the model to generalise completely from the prompt, eliminating the need for previous
examples and making it suitable for tasks with no training data available. Chain of
Thought prompting improves the model’s capacity to handle complex problem-solving
36 Chapter 5. Results and Analysis
and logical thinking by breaking down tasks into intermediate steps, which is essential
for producing coherent and accurate code in multi-step data analysis operations. Prim-
ing/Seed prodding provides the model with an initial input or context, ensuring that
the output is appropriate and aligned with the specified task or domain, hence improv-
ing code generation precision. Together, these techniques offer a balanced approach for
assessing generalisation, increasing reasoning, and maintaining contextual accuracy.
To address RQ2, we conducted a series of experiments using the LLAMA 3.1 model,
where, as illustrated in Figure 5.4, we provided the model with a task using three distinct
strategies—zero-shot prompting, priming, and chain-of-thought prompting—based on the
user prompt, "I want to see monthly trends of incidents," tasking the assistant with
generating the necessary Python code to import the dataset, process the time information,
and create a plot of monthly trends. We experimented with different questions from the
curated questions dataset and the following are our observations from the generated
responses from LLM.
• Zero-Shot Prompting: In this instance, the task was presented to the LLM
without any prior or guidance. The model was intended to interpret the task and
generate the appropriate Python code using just its own knowledge and compre-
hension of the request. This strategy relies solely on the LLM’s prior knowledge to
do the work.
• Priming: In contrast to zero-shot prompting, the priming strategy involved pro-
viding additional context to guide the model. Before the model was prompted, a
5.2. Experiment Findings 37
user-forged prelude was included, such as: "Let’s import the data before we start the
analysis and generate a plot to check the monthly trend." This crafted context was
designed to influence the LLM’s subsequent responses, ensuring that the generated
Python code aligned with the conversation’s tone and direction.
Across these three scenarios, the nature of the output generated by the LLM varies
significantly. In zero-shot prompting, the LLM relies entirely on its learnt information,
frequently generating wide or generalised responses. Priming, on the other hand, directs
the model towards a more contextually appropriate and cohesive continuation of the con-
versation. Meanwhile, chain-of-thought prompting encourages the model to break down
the problem and address each step independently, resulting in a more logical and reasoned
output. These variations highlight the impact of different prompting strategies on the
quality and nature of the LLM’s completions.
Figure 5.5 shows that the outcomes from different strategies. differ dramatically. Dur-
ing zero-shot prompting, the model failed to load the dataset and repeatedly provided
38 Chapter 5. Results and Analysis
messages such as "Dataset not found." While the generated code was generally relevant
and syntactically acceptable, the lack of dataset handling prevented task completion. This
approach also resulted in broad, generalised results that lacked the specificity needed to
solve the problem completely.
In priming, the results were more consistent and relevant. The inclusion of a user-
crafted prelude helped guide the model towards generating contextually appropriate
Python code. While some dataset import issues persisted, the responses were notably
more aligned with the task. The model was able to produce correct and coherent outputs
for data processing and visualisation when given this initial direction.
In chain-of-thought prompting, the model was encouraged to reason through each step
methodically. Despite following a logical structure in the generated code, the dataset im-
port issue still posed a challenge. However, this strategy often led to more structured
and step wise outputs, as the LLM attempted to solve the problem one component at a
time.
Considering all of this information, we can say that priming technique works better
in this scenario as this drives LLM to generate context relevant text and it also helps it
in initiating the conversation.
The results for LLAMA-3.1 can be found in Tables 5.3, 5.4, 5.5, and 5.6. For the
results of PHI3 14B, refer to Tables 5.7, 5.8, 5.9, and 5.10. The results for GEMMA2 are
presented in Tables 5.11, 5.12, 5.13, and 5.14.
During the evaluation, it was found that both the LLAMA3 and GEMMA2 models
performed well, despite using 4k quantization, with no issues in text generation or irreg-
ularities. In contrast, the PHI3 model displayed significant irregularities, including the
5.2. Experiment Findings 39
addition of gibberish text and random letters in the generated output, which were not
expected. This hindered PHI3’s performance, even though the PHI3-14B model is larger
compared to the LLAMA3.1-8B and GEMMA2-9B models. Despite its potential, PHI3’s
output was comparable to LLAMA and GEMMA, and could have yielded better results
under different conditions. Due to constraints, only 4k quantized models were used for
experiment.
Based on the scores presented in Table 5.2, it is evident that PHI3-14b outperforms
both the GEMMA2-9B and LLAMA3.1-8B models. PHI3-14b has the highest overall
average score (3.15) across all question types. This is followed closely by LLAMA3.1-8b
(2.96) and GEMMA2-9b (2.93), with GEMMA2-9b performing slightly lower overall.
However, it’s important to note that none of these models performed particularly well
on Statistical Test questions. All models struggled with these questions, with scores not
exceeding 3. In addition, they also encountered challenges when it came to generating
plots and handling data cleaning tasks, achieving only moderate success in these areas.
When analysing relevance, GEMMA2-9b leads the way across most question types,
especially excelling in Descriptive and Data Cleaning questions. PHI3-14b performs par-
ticularly well in Graph Plot and Statistical questions, while LLAMA3.1-8b remains com-
petitive, though not as dominant in any specific category.
40
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The assistant analysed the trend of IT inci-
Whether the number of dents by converting the ’opened_at’ column
incidents has increased, to datetime format and grouping the inci-
What is the trend in the
decreased, or remained dents by month. It provided a line plot show-
number of IT incidents 2 3 5
the same over the past ing a general downward trend in the number
over the past 6 months?
6 months, with the pos- of incidents over the past 6 months. After
sibility of visualisation. correcting the date time conversion error, the
final output suggested a decline in incidents.
Identification of specific
times (hours, days, or The assistant successfully identified and plot-
What are the peak months) when the most ted the distribution of incidents over time, fo-
5 5 4
times for IT incidents? incidents occur, likely cusing on peak periods like days and hours,
requiring a graphical by grouping data appropriately.
analysis.
Determine the typi-
cal time it takes to The assistant attempted to calculate the av-
resolve an IT inci- erage resolution time but encountered multi-
What is the average res-
41
Table 5.4: Results of Statistical questions with LLAMA 3.1:latest
42
Expected Out- Correctness
Question LLM Generated Summary Relevance Clarity
come
The assistant attempted to test
the hypothesis by calculating the
"Mean Time to Resolution
MTTR for each team. Ini-
(MTTR) Comparison:
tially, there was an error in
Question: Is there a significant differ-
parsing the datetime columns,
ence in the MTTR between incidents
A valid statistical but it was resolved by apply-
handled by different teams (e.g., Team
test either prov- ing the errors=’coerce’ parame-
A vs. Team B)?
ing or contradict- ter. The assistant also faced an 1 3 2
Hypothesis:
ing the null hy- issue with missing or incorrect
Null Hypothesis (H0): The mean
pothesis. column names (team). After a
MTTR is the same for all teams.
correction, it provided a struc-
Alternative Hypothesis (H1): The
ture for performing an ANOVA
mean MTTR is different between the
analysis, although it did not ul-
all teams."
timately execute the test due to
further column-related issues.
"Incident Resolution Time:
Weekdays vs. Weekends:"
43
Table 5.5: Results of Graph plot questions with LLAMA 3.1:latest
44
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The assistant grouped in-
What are different categories cidents by categories (e.g.,
in the dataset and how does Identifying different categories incident_state) and pro-
the distribution of incident in the dataset and plot the dis- duced a bar plot of incident
5 5 5
count in each categories look tribution of each category by counts. It also added more
in the dataset? Give your an- incident count details by analyzing active,
swes as plot. reassignment_count, and
reopen_count.
A plot is likely to show that
some categories have a longer
The assistant attempted to
median resolution time with a
What is the average time to calculate and plot the aver-
wider interquartile range, in-
resolution for incidents across age resolution time but en-
dicating more variability. On 1 3 1
different categories? Give countered errors due to non-
the other hand, less com-
your answer as a plot numeric and incorrectly for-
plex issues should have shorter
matted date time values.
and more consistent resolution
times.
45
Table 5.6: Results of Data Cleaning Questions with LLAMA 3.1:latest
46
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The assistant successfully
The LLM should identify
identified different formats
all variations in the inci-
Are there any inconsistencies in the priority column and
dent priority labels and rec-
or variations in how incident standardised the labels (re-
ommend standardising them
priorities are labelled (e.g., moving prefixes and ensuring
(e.g., converting all to a com-
"High" vs. "Hgh"), and consistent labels like ’Criti- 3 4 3
mon format such as "High,"
how can these be standardized cal’, ’High’, ’Moderate’, and
"Medium," "Low"). This en-
to ensure uniformity in data ’Low’). However, the output
sures that priority levels are
analysis? had minor issues in execution,
consistent across the dataset
impacting correctness and
for accurate analysis.
clarity.
The LLM should detect un- The assistant attempted to
resolved incidents that have check the opened_at and
Are there any unresolved in- been open for an unusually closed_at columns for unre-
cidents in the dataset that long time, indicating potential solved incidents exceeding a 7-
have abnormally long dura- errors in data entry or sys- day threshold. Due to errors 1 3 3
tions, and how can these be tem tracking. It should sug- in datetime conversion and fil-
47
Table 5.7: Results of Descriptive questions with PHI3 14b
48
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The assistant correctly ana-
Whether the number of in- lyzed the trend of incidents,
What is the trend in the num- cidents has increased, de- noting an increase in March
ber of IT incidents over the creased, or remained the same followed by a gradual de- 4 5 5
past 6 months? over the past 6 months, with crease. The analysis was
the possibility of visualization. mostly accurate and clearly
presented.
The assistant provided the
Identification of specific times correct peak times, particu-
(hours, days, or months) larly for hours, but missed
What are the peak times for
when the most incidents oc- some depth in the analysis of 3 4 3
IT incidents?
cur, likely requiring a graph- peak days and months. The
ical analysis. output lacked some clarity in
explaining the results.
Determine the typical time it The assistant attempted to
takes to resolve an IT in- calculate the average resolu-
What is the average resolution cident, which might involve tion time but failed due to for-
1 3 4
49
50
Expected Out- Correctness
Question LLM Generated Summary Relevance Clarity
come
"Incident Resolution Time:
Weekdays vs. Weekends:"
Question: Is the average resolution
time for incidents reported on week-
The assistant proposed using a t-
days significantly different from those A valid statistical
test but encountered datetime is-
reported on weekends? test either proving
sues that prevented the necessary 1 2 2
Hypothesis: Null Hypothesis or contradicting the
calculation. The statistical anal-
(H0): The average resolution time is null hypothesis.
ysis was incomplete
the same on weekdays and weekends.
Alternative Hypothesis (H1): The
average resolution time is different
between weekdays and weekends."
"Impact of Incident Volume on
Resolution Time:"
Question: Does a higher volume of in-
cidents significantly increase the aver-
The assistant suggested using
age resolution time? A valid statistical
correlation analysis but failed to
Hypothesis: test either proving
handle the necessary datetime 1 2 2
Null Hypothesis (H0): There is no or contradicting the
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
What are different cate-
The assistant successfully gen-
gories in the dataset and
Identifying different categories erated a bar plot showing
how does the distribu-
in the dataset and plot the dis- the distribution of incidents
tion of incident count in 5 5 5
tribution of each category by across categories such as inci-
each categories look in
incident count dent state. The output was
the dataset? Give your
correct, relevant, and clear.
answes as plot.
51
52
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
A plot is likely to show that
some categories have a longer The assistant encountered er-
What is the average median resolution time with a rors with datetime formats
time to resolution for in- wider interquartile range, in- and failed to generate the cor-
cidents across different dicating more variability. On rect plot. Despite multiple at- 1 2 2
categories? Give your the other hand, less com- tempts, the analysis remained
answer as a plot plex issues should have shorter incomplete, and the explana-
and more consistent resolution tion was unclear.
times.
Time series line graph should
The assistant proposed group-
reveal trends such as an in-
How does the volume of ing incidents by month to
crease in incident volume dur-
incidents vary over time create a time-series plot but
ing certain periods (e.g., end
(e.g., by month or quar- failed to handle datetime for- 1 1 2
of fiscal quarters or during
ter)? Give your answer mats correctly. The final plot
major software updates) and
as a plot. was not generated, and the ex-
a possible decrease during oth-
planation lacked clarity.
ers (e.g., holiday seasons).
After resolving initial errors,
Is there a correlation Scatter plot might show a pos- the assistant successfully cre-
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The LLM should identify
Are there any inconsis- all variations in the inci-
tencies or variations in dent priority labels and rec- The assistant attempted to
how incident priorities ommend standardizing them standardize labels but encoun-
are labeled (e.g., "High" (e.g., converting all to a com- tered execution errors due to
1 2 2
vs. "Hgh"), and how mon format such as "High," incorrect column names. The
can these be standard- "Medium," "Low"). This en- explanation lacked clarity, and
ized to ensure unifor- sures that priority levels are the output was incomplete.
mity in data analysis? consistent across the dataset
for accurate analysis.
53
54
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The LLM should detect un-
Are there any unre- resolved incidents that have
The assistant successfully
solved incidents in been open for an unusually
identified unresolved inci-
the dataset that have long time, indicating potential
dents with durations over
abnormally long du- errors in data entry or sys- 5 5 5
7 days. The output was
rations, and how can tem tracking. It should sug-
accurate, relevant, and clearly
these be identified and gest setting these to a default
explained.
corrected? value or flagging them for re-
view.
Are there any dupli- The LLM should identify du-
cate incident records plicates with varying resolu- The assistant correctly iden-
where the incident de- tion times and provide strate- tified duplicate incidents but
tails match but the res- gies for resolving these dis- did not explain clearly how to 3 4 3
olution times differ, and crepancies, such as averaging handle the differences in reso-
how should these be the resolution times or select- lution times.
handled? ing the most frequent value.
The LLM should detect in-
Are there any inconsis- consistencies in date and time
tencies in the date and formats that could affect the
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
Whether the number of in- The assistant generated a line
What is the trend in the num- cidents has increased, de- plot showing the trend over
ber of IT incidents over the creased, or remained the same the past six months, revealing 5 5 4
past 6 months? over the past 6 months, with the pattern of incident volume
the possibility of visualization. over time.
Identification of specific times The assistant successfully
(hours, days, or months) identified peak times for
What are the peak times for
when the most incidents oc- incidents using time-related 5 5 5
IT incidents?
cur, likely requiring a graph- features and provided the
ical analysis. analysis clearly and concisely.
Determine the typical time it The assistant eventually cal-
takes to resolve an IT in- culated the average resolution
What is the average resolution cident, which might involve time but faced several issues
3 5 3
time for IT incidents? computing the difference be- with date formatting and er-
tween the opened_at and re- ror correction, which affected
solved_at columns. the clarity of the explanation.
55
56
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
The assistant correctly calcu-
Determine the frequency of in-
lated the distribution of inci-
cidents across different sever-
What is the distribution of in- dents by severity levels using
ity levels, potentially requir- 4 5 5
cident severity levels? the impact column and pro-
ing a bar chart or countplot
vided a clear explanation and
for visualization.
visual representation.
The assistant correctly calcu-
This outcome will indicate lated the percentage of in-
What percentage of incidents
the proportion of incidents cidents resolved within SLA
are resolved within SLA time 5 5 5
that meet SLA (Service Level time frames, providing an ac-
frames?
Agreement) requirements. curate, relevant, and clearly
presented result.
57
58
Expected Out- Correctness
Question LLM Generated Summary Relevance Clarity
come
"Correlation Between Incident
Severity and Resolution Time:"
Question: Is there a significant corre-
lation between the severity of incidents
The assistant attempted the
and the time taken to resolve them? A valid statistical
analysis but encountered errors
Hypothesis: test either proving
with date parsing and could not 1 1 1
Null Hypothesis (H0): There is or contradicting the
calculate the correlation between
no correlation between incident sever- null hypothesis.
severity and resolution time.
ity and resolution time. Alternative
Hypothesis (H1): There is a signifi-
cant correlation between incident sever-
ity and resolution time."
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
What are different cate-
59
60
Correctness
Question Expected Outcome LLM Generated Summary Relevance Clarity
Stacked bar chart should dis-
play that certain departments,
like IT or Security, deal with
How does the severity
more severe incidents (e.g., The assistant failed to gener-
of incidents vary across
"High" or "Critical" severity), ate a plot due to a KeyError,
different departments? 1 1 1
while others, like Human Re- caused by an incorrect column
Give your answer as a
sources, might predominantly reference.
plot.
handle less severe incidents
(e.g., "Low" or "Medium"
severity).
61
62
LLM Generated Correctness
Question Expected Outcome Relevance Clarity
Summary
Identifies incidents where
the reassignment_count or The assistant success-
Are there any incidents
reopen_count is far above the fully identified incidents
with unusually high
normal range. Suggest setting with unusually high
reassignment_count or 4 5 5
a reasonable threshold for counts and provided a
reopen_count, and how
review and flagging incidents clear explanation and
should these be addressed?
with values exceeding this recommendations.
threshold.
In our process of determining which prompting strategies most effectively enhance the
performance of LLMs in generating code for data analysis, we drew insights from both
a thorough literature review and experimental validation. Through our experiments, we
observed significant differences in output quality and relevance when employing zero-shot
prompting, priming, and chain-of-thought prompting with the LLAMA 3.1 model.
Our literature review (Figure 5.3) revealed that zero-shot prompting is one of the most
explored tactics, with 15 studies on the topic. While zero-shot prompting is effective for
tasks that require LLMs to generalise without examples, both the literature and our
experiments demonstrated that it is ineffective for tasks involving multi-step processes,
such as data analysis, because it does not provide the necessary guidance for LLMs to
generate precise or contextually relevant outputs.
6.1.2 Priming
In contrast, we discovered that priming was the most successful method for this task.
Our literature study and experimental results both show that priming is successful at
leading the model to generate contextually relevant and coherent outputs. We were able
63
64 Chapter 6. Discussion
to direct the model towards creating accurate and task-relevant Python code by pro-
viding an initial user-crafted context—for example, instructions to import the dataset
before proceeding with the analysis. Priming produced more consistent outcomes than
zero-shot prompting, as illustrated in Figure 5.5. The model handled dataset imports
more efficiently and created consistent code for time conversion and data visualisation.
Our literature review revealed that priming or seed prompting is less explored than
zero-shot or chain-of-thought prompting (covered in 9 papers as shown in Figure 5.3), but
we found that priming gives considerable advantages when precision and task alignment
are crucial. In data analysis tasks where context is important, the prelude provided in
priming plays a pivotal role in enhancing the relevance and specificity of the model’s
output. This strategy is especially effective in ensuring that the generated code adheres
to the specific domain requirements, addressing the limitations encountered in zero-shot
prompting.
The experiment results support H0, which says that prompting strategies make LLMs
much better at generating correct and useful code for data analysis. Both priming and
chain-of-thought prompting showed clear improvements in leading the model to outputs
that were relevant to the data analytic task. Specifically, priming led to the most suc-
cessful outputs in generating code for dataset imports and visualisations, aligning the
model’s responses closely with the task’s specific requirements.
Zero-shot prompting, while effective for general tasks, consistently failed in the context
of data analytics, as the model was unable to handle the more complicated, multi-step
processes required for data analysis. Chain-of-thought prompting increased structured
thinking, but it fell short of meeting external data requirements. These findings support
H0 by indicating that prompting strategies, particularly priming, are effective in refining
and improving the model’s outputs for data analysis tasks.
6.2. Discussion for RQ3 65
On the contrary, the findings disprove H1 (the hypothesis that prompting strategies
do not significantly improve performance). The distinct differences between zero-shot
prompting and more structured prompting strategies like as priming and chain-of-thought
demonstrate the importance of these techniques in improving the model’s ability to gen-
erate accurate and contextually relevant code.
In general, these results strongly support priming as the best prompting approach
in this scenario. Priming not only supplies the necessary contextual information, but
it also assists the model in initiating conversation and aligning its outputs with the
task’s domain-specific requirements. While chain-of-thought prompting helps with logical
thinking, it appears that combining it with priming may increase performance in multi-
step data processing tasks.
In this section, we break down the results based on the question types, following the
provided format. The discussion analyzes the performance of the models LLAMA3.1-8B,
GEMMA2-9B, and PHI3-14B across four categories of questions: Descriptive, Statistical,
Graph Plot, and Data Cleaning. We also include visual representations from the graphs
for each question type to support the analysis.
GEMMA2-9B scores the highest in correctness (4.4), excelling in tasks such as trend
analysis and peak time identification. For instance, in response to the question "What
is the trend in the number of IT incidents over the past 6 months?", GEMMA2-9B pro-
vides a detailed analysis of an upward trend in March followed by a gradual decline. The
model’s ability to parse and interpret time-series data is a key factor in its success here.
PHI3-14B slightly outperforms the others with a correctness score of 1.5 as shown in
Figure 6.2, but it still struggles to handle complex statistical functions. In the question
"Is there a significant difference in Mean Time to Resolution (MTTR) between teams?",
PHI3-14B attempts to perform an ANOVA test but fails due to data formatting errors.
We find that statistical questions requiring multi-step calculations are beyond the
current capabilities of these models. Issues such as improper parsing of numeric val-
ues and errors in applying statistical functions suggest that the models need significant
improvements in handling structured mathematical operations.
For the question "What are the different categories in the dataset, and how does their
distribution look?", LLAMA3.1-8B and PHI3-14B successfully generates a bar plot that
accurately represents the distribution of incidents across categories. This demonstrates
the models ability to handle categorical data and produce simple visualisations effectively.
Overall, PHI3-14B’s strength lies in its ability to interpret categorical data and gener-
ate basic visualisations. However, all models show limitations when it comes to handling
more complex plots that involve multiple variables or statistical overlays, such as those
involving correlations between factors like priority and resolution times.
LLAMA3.1-8B and PHI3-14B also perform well, but they face challenges in handling
complex data cleaning tasks like managing duplicate records or converting inconsistent
date formats. LLAMA3.1-8B scores higher in clarity compared to PHI3-14B, suggesting
better communication of results, even when technical execution is not as accurate.
Overall, GEMMA2-9B excels in dataset cleaning and ensuring data uniformity, while
the other models show room for improvement in handling these tasks.
68 Chapter 6. Discussion
Based on the analysis across all question types, the results support the hypothesis that
there is a significant difference in the performance of LLMs in multi-turn interactions for
code generation. GEMMA2-9B consistently outperforms the other models, particularly in
Descriptive and Data Cleaning tasks, while LLAMA3.1-8B excels in Graph Plotting tasks.
For Descriptive and Data Cleaning Questions, GEMMA2-9B proves to be the most
effective. It provides accurate, relevant, and clear outputs in response to multi-turn inter-
actions. Its ability to refine its output based on user feedback and handle complex data
operations such as trend analysis and data cleaning confirms its superiority in these areas.
For Statistical Questions, none of the models performed well, indicating a significant
gap in their ability to handle statistical analysis tasks, such as hypothesis testing or
ANOVA. This highlights an area where all models need further development.
trained on biased datasets, they could unintentionally favor certain types of inci-
dents, resolutions, or even categories of tickets, which might affect decision-making
in unpredictable ways.
• Data Security and Privacy Concerns: ITSM systems handle vast amounts of
sensitive data, and employing LLMs raises concerns about data security. The use
of LLMs could lead to potential data leakage, where sensitive information may be
exposed through model outputs, particularly if the models are trained or deployed
in environments where data privacy protocols are insufficient.
• Overfitting and Generalization: LLMs, when fine-tuned for specific tasks like
ITSM data analysis, may risk overfitting to certain patterns within the incident
data, making them less effective at handling novel or unique incidents that do not
follow these patterns. This limitation could lead to inaccurate predictions or faulty
analysis in situations involving unusual or highly dynamic ITSM environments.
Chapter 7
Conclusions and Future Work
71
72 Chapter 7. Conclusions and Future Work
evaluated their performance across four question types: Descriptive, Statistical, Graph
Plot, and Data Cleaning.
• Descriptive and Data Cleaning Tasks: GEMMA2-9B consistently outper-
formed the other models in terms of correctness, relevance, and clarity. It was
particularly effective in handling trend analysis, peak time identification, and re-
solving data inconsistencies. The model’s ability to refine its outputs based on user
feedback made it the most suitable for multi-turn interactions.
• Graph Plot Tasks: PHI3-14B excelled in tasks related to graphical output gen-
eration and interpreting simpler datasets. It demonstrated strong performance in
generating visualizations and handling basic data plotting tasks. However, it strug-
gled with more complex plotting tasks, such as correlating multiple variables.
• Statistical Tasks: None of the models performed well in handling statistical anal-
ysis, such as hypothesis testing, ANOVA, or correlation calculations. This indicates
a significant gap in their ability to manage advanced statistical reasoning. Our re-
sults suggest that LLMs need further development to handle statistical tasks more
effectively.
In general, according to Figure 7.1, PHI3-14B emerged as the best performer across
most tasks, especially in data statistical analysis and graph plotting. GEMMA2-9b
showed strong results in descriptive analysis and data cleaning while LLAMA3.1-8B of-
fered a more balanced, though slightly lower, performance across all question types. From
Table 5.2 overall score for PHI3-14B is higher compared to other 2 models.
Further research could also investigate the benefits of combining Priming with Chain-
of-Thought prompting. This combination may improve both the logical structuring of
tasks and the alignment of model outputs with specific requirements.
We suggest future experiments explore LLM performance in more complex data an-
alytics scenarios, such as machine learning model building, data preprocessing pipelines,
or advanced data transformations. These tasks would provide a more comprehensive
evaluation of the models’ overall capabilities.
We have chosen to work with open-source models due to the sensitive nature of the
data involved in our experiments. Many organizations and enterprises are reluctant to
share internal operational data with external entities, as this information is often critical
to their business. By using open-source models, we ensure that the data remains secure
and is not stored in the cloud or other environments where it could be compromised.
While our current approach utilizes models with fewer parameters, future work could
explore state-of-the-art models like ChatGPT or Gemini, which have the potential to
deliver improved results.
We have focused on ITSM incident data for evaluating the LLMs, but there is potential
for improvement by incorporating a wider variety of datasets. Our current evaluation is
limited to a few scenarios that we found helpful; however, this approach can be extended
to include numerous other scenarios and datasets. Broadening the evaluation with more
questions and diverse datasets could enhance the credibility of our approach and provide
deeper insights into the weaknesses of the models’ training data.
75
76 References
[14] Donia Y Badawood. Data visualization and visual data analytics in itsm. Interna-
tional Journal of Computer Science & Network Security, 23(6):68–76, 2023.
[15] Ronald Rosenfeld. Two decades of statistical language modeling: Where do we go
from here? Proceedings of the IEEE, 88(8):1270–1278, 2000.
[16] Ronan Collobert, Jason Weston, Léon Bottou, Michael Karlen, Koray Kavukcuoglu,
and Pavel Kuksa. Natural language processing (almost) from scratch. Journal of
machine learning research, 12:2493–2537, 2011.
[17] T Mikolov. Distributed representations of words and phrases and their composition-
ality. arXiv preprint arXiv:1310.4546, 2013.
[18] Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-
training of deep bidirectional transformers for language understanding. In Proceed-
ings of naacL-HLT, volume 1, page 2, 2019.
[19] M Lewis. Bart: Denoising sequence-to-sequence pre-training for natural language
generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019.
[20] Sarah Fakhoury, Aaditya Naik, Georgios Sakkas, Saikat Chakraborty, and Shu-
vendu K Lahiri. Llm-based test-driven interactive code generation: User study and
empirical evaluation. arXiv preprint arXiv:2404.10100, 2024.
[21] Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim, and Sunghun Kim. A survey on
large language models for code generation. arXiv preprint arXiv:2406.00515, 2024.
[22] James Finnie-Ansley, Paul Denny, Brett A Becker, Andrew Luxton-Reilly, and James
Prather. The robots are coming: Exploring the implications of openai codex on intro-
ductory programming. In Proceedings of the 24th Australasian Computing Education
Conference, pages 10–19, 2022.
[23] Mohamed Nejjar, Luca Zacharias, Fabian Stiehle, and Ingo Weber. Llms for science:
Usage for code generation and data analysis. arXiv preprint arXiv:2311.16733, 2023.
[24] Kaiyan Chang, Songcheng Xu, Chenglong Wang, Yingfeng Luo, Tong Xiao, and
Jingbo Zhu. Efficient prompting methods for large language models: A survey.
arXiv preprint arXiv:2404.01077, 2024.
[25] Sabit Ekin. Prompt engineering for chatgpt: a quick guide to techniques, tips, and
best practices. Authorea Preprints, 2023.
[26] Tom B Brown. Language models are few-shot learners. arXiv preprint
arXiv:2005.14165, 2020.
[27] Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao,
Jianfeng Gao, Jingjing Liu, and Bill Dolan. Dialogpt: Large-scale generative pre-
training for conversational response generation. arXiv preprint arXiv:1911.00536,
2019.
[28] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira
Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brock-
man, et al. Evaluating large language models trained on code. arXiv preprint
arXiv:2107.03374, 2021.
[29] Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code
generated by chatgpt really correct? rigorous evaluation of large language models
for code generation. Advances in Neural Information Processing Systems, 36, 2024.
References 77
[30] Frank F Xu, Uri Alon, Graham Neubig, and Vincent Josua Hellendoorn. A system-
atic evaluation of large language models of code. In Proceedings of the 6th ACM
SIGPLAN International Symposium on Machine Programming, pages 1–10, 2022.
[31] Chandra Thapa, Seung Ick Jang, Muhammad Ejaz Ahmed, Seyit Camtepe, Josef
Pieprzyk, and Surya Nepal. Transformer-based language models for software vulner-
ability detection. In Proceedings of the 38th Annual Computer Security Applications
Conference, pages 481–496, 2022.
[32] Jorge Valverde-Rebaza, Aram González, Octavio Navarro-Hinojosa, and Julieta
Noguez. Advanced large language models and visualization tools for data analytics
learning. In Frontiers in Education, volume 9, page 1418006. Frontiers Media SA,
2024.
[33] Mohamed Nejjar, Luca Zacharias, Fabian Stiehle, and Ingo Weber. Llms for science:
Usage for code generation and data analysis. arXiv preprint arXiv:2311.16733, 2023.
[34] Zeeshan Rasheed, Muhammad Waseem, Aakash Ahmad, Kai-Kristian Kemell, Wang
Xiaofeng, Anh Nguyen Duc, and Pekka Abrahamsson. Can large language models
serve as data analysts? a multi-agent assisted approach for qualitative data analysis.
arXiv preprint arXiv:2402.01386, 2024.
[35] Fengxiang Zhao, Fan Yu, Timothy Trull, and Yi Shang. A new method using llms
for keypoints generation in qualitative data analysis. In 2023 IEEE Conference on
Artificial Intelligence (CAI), pages 333–334. IEEE, 2023.
[36] Jochen Wulf and Juerg Meierhofer. Exploring the potential of large language models
for automation in technical customer service. arXiv preprint arXiv:2405.09161, 2024.
[37] Stephany Bellomo, Shen Zhang, James Ivers, Julie B. Cohen, and Ipek Ozkaya.
Assessing opportunities for llms in software engineering and acquisition, Nov 2023.
[38] Marko Jäntti and Virpi Hotti. Defining the relationships between it service manage-
ment and it service governance. Information Technology and Management, 17:141–
150, 2016.
[39] O. Resch. Prompt engineering in it management education. In INTED2024 Proceed-
ings, 18th International Technology, Education and Development Conference, pages
2590–2597. IATED, 4-6 March, 2024 2024.
[40] Xinyang Zhao, Xuanhe Zhou, and Guoliang Li. Chat2data: An interactive data
analysis system with rag, vector databases and llms. Proc. VLDB Endow, 2024.
[41] Andrew S Denney and Richard Tewksbury. How to write a literature review. Journal
of criminal justice education, 24(2):218–234, 2013.
[42] Staffs Keele et al. Guidelines for performing systematic literature reviews in software
engineering. Technical report, Technical report, ver. 2.3 ebse technical report. ebse,
2007.
[43] Claes Wohlin, Per Runeson, Martin Höst, Magnus C Ohlsson, Björn Regnell, Anders
Wesslén, et al. Experimentation in software engineering, volume 236. Springer, 2012.
[44] Abhimanyu Dubey, Abhinav Jauhri, and Abhinav Pandey [Link]. The llama 3 herd
of models, 2024.
78 References
[45] Gemma Team, Thomas Mesnard, and Cassidy Hardin [Link]. Gemma: Open models
based on gemini research and technology, 2024.
[46] Marah Abdin, Jyoti Aneja, Hany Awadalla, and Ahmed Awadallah [Link]. Phi-3
technical report: A highly capable language model locally on your phone, 2024.
[47] Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwa-
sawa. Large language models are zero-shot reasoners. Advances in neural information
processing systems, 35:22199–22213, 2022.
[48] Victor Sanh, Albert Webson, Colin Raffel, Stephen H Bach, Lintang Sutawika,
Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, et al.
Multitask prompted training enables zero-shot task generalization. arXiv preprint
arXiv:2110.08207, 2021.
[49] Shuoqi Sun, Shengyao Zhuang, Shuai Wang, and Guido Zuccon. An investigation of
prompt variations for zero-shot llm-based rankers. arXiv preprint arXiv:2406.14117,
2024.
[50] Lukas Vöge, Vincent Gurgul, and Stefan Lessmann. Leveraging zero-shot prompting
for efficient language model distillation. arXiv preprint arXiv:2403.15886, 2024.
[51] Kaustubh D Dhole and Eugene Agichtein. Genqrensemble: Zero-shot llm ensemble
prompting for generative query reformulation. In European Conference on Informa-
tion Retrieval, pages 326–335. Springer, 2024.
[52] Ahmed Elshabrawy, Yongix Huang, Iryna Gurevych, and Alham Fikri Aji. Enabling
natural zero-shot prompting on encoder models via statement-tuning. arXiv preprint
arXiv:2404.12897, 2024.
[53] Feihu Jin, Yifan Liu, and Ying Tan. Zero-shot chain-of-thought reasoning guided by
evolutionary algorithms in large language models. arXiv preprint arXiv:2402.05376,
2024.
[54] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever,
et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9,
2019.
[55] Zekun Li, Baolin Peng, Pengcheng He, Michel Galley, Jianfeng Gao, and Xifeng
Yan. Guiding large language models via directional stimulus prompting. Advances
in Neural Information Processing Systems, 36, 2024.
[56] Grégoire Mialon, Roberto Dessì, Maria Lomeli, Christoforos Nalmpantis, Ram
Pasunuru, Roberta Raileanu, Baptiste Rozière, Timo Schick, Jane Dwivedi-Yu,
Asli Celikyilmaz, et al. Augmented language models: a survey. arXiv preprint
arXiv:2302.07842, 2023.
[57] Imran Chamieh, Torsten Zesch, and Klaus Giebermann. Llms in short answer scor-
ing: Limitations and promise of zero-shot and few-shot approaches. In Proceedings of
the 19th Workshop on Innovative Use of NLP for Building Educational Applications
(BEA 2024), pages 309–315, 2024.
[58] Catherine Tony, Nicolás E Díaz Ferreyra, Markus Mutas, Salem Dhiff, and Ric-
cardo Scandariato. Prompting techniques for secure code generation: A systematic
investigation. arXiv preprint arXiv:2407.07064, 2024.
References 79
[59] Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal,
and Aman Chadha. A systematic survey of prompt engineering in large language
models: Techniques and applications. arXiv preprint arXiv:2402.07927, 2024.
[60] Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models
better few-shot learners. arXiv preprint arXiv:2012.15723, 2020.
[61] Timo Schick and Hinrich Schütze. Few-shot text generation with natural language
instructions. In Proceedings of the 2021 Conference on Empirical Methods in Natural
Language Processing, pages 390–402, 2021.
[62] Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp.
Fantastically ordered prompts and where to find them: Overcoming few-shot prompt
order sensitivity. arXiv preprint arXiv:2104.08786, 2021.
[63] Timo Schick and Hinrich Schütze. Exploiting cloze questions for few shot text clas-
sification and natural language inference. arXiv preprint arXiv:2001.07676, 2020.
[64] Samuel Cahyawijaya, Holy Lovenia, and Pascale Fung. Llms are few-shot in-context
low-resource language learners. arXiv preprint arXiv:2403.16512, 2024.
[65] Xufeng Zhao, Mengdi Li, Wenhao Lu, Cornelius Weber, Jae Hee Lee, Kun Chu, and
Stefan Wermter. Enhancing zero-shot chain-of-thought reasoning in large language
models through logic. arXiv preprint arXiv:2309.13339, 2023.
[66] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi,
Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in
large language models. Advances in neural information processing systems, 35:24824–
24837, 2022.
[67] Jia Li, Ge Li, Yongmin Li, and Zhi Jin. Structured chain-of-thought prompting
for code generation. ACM Transactions on Software Engineering and Methodology,
2023.
[68] Jia Li, Ge Li, Yongmin Li, and Zhi Jin. Structured chain-of-thought prompting
for code generation. ACM Transactions on Software Engineering and Methodology,
2023.
[69] Zhuosheng Zhang, Aston Zhang, Mu Li, and Alex Smola. Automatic chain of thought
prompting in large language models. arXiv preprint arXiv:2210.03493, 2022.
[70] Zihan Yu, Liang He, Zhen Wu, Xinyu Dai, and Jiajun Chen. Towards better chain-
of-thought prompting strategies: A survey. arXiv preprint arXiv:2310.04959, 2023.
[71] Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang,
Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc Le, et al. Least-to-most
prompting enables complex reasoning in large language models. arXiv preprint
arXiv:2205.10625, 2022.
[72] Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang,
Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought
reasoning in language models. arXiv preprint arXiv:2203.11171, 2022.
[73] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi,
Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in
large language models. Advances in neural information processing systems, 35:24824–
24837, 2022.
80 References
[74] Michael D Murray. Prompt engineering and priming in law. Available at SSRN,
2024.
[75] Suet-Ying Lam, Qingcheng Zeng, Kexun Zhang, Chenyu You, and Rob Voigt. Large
language models are partially primed in pronoun interpretation. arXiv preprint
arXiv:2305.16917, 2023.
[76] Bushi Xiao, Chao Gao, and Demi Zhang. Modeling bilingual sentence processing:
Evaluating rnn and transformer architectures for cross-language structural priming.
arXiv preprint arXiv:2405.09508, 2024.
[77] Jaap Jumelet, Willem Zuidema, and Arabella Sinclair. Do language models exhibit
human-like structural priming effects? arXiv preprint arXiv:2406.04847, 2024.
[78] James A Michaelov, Catherine Arnett, Tyler A Chang, and Benjamin K Bergen.
Structural priming demonstrates abstract grammatical representations in multilin-
gual language models. arXiv preprint arXiv:2311.09194, 2023.
[79] Sawan Kumar and Partha Talukdar. Reordering examples helps during priming-
based few-shot learning. arXiv preprint arXiv:2106.01751, 2021.
[80] Arabella Sinclair, Jaap Jumelet, Willem Zuidema, and Raquel Fernández. Structural
persistence in language models: Priming as a window into abstract language repre-
sentations. Transactions of the Association for Computational Linguistics, 10:1031–
1050, 2022.
[81] Jo Inge Arnes and Alexander Horsch. Schema-based priming of large language model
for data object validation compliance. Available at SSRN 4453361, 2023.
[82] Eli Fennell. Action identification characteristics and priming effects in chatgpt. 2023.
[83] Alexandre Piché, Aristides Milios, Dzmitry Bahdanau, and Christopher Pal. Self-
evaluation and self-prompting to improve the reliability of llms. In ICLR 2024
Workshop on Secure and Trustworthy Large Language Models.
[84] Li Wang, Xi Chen, XiangWen Deng, Hao Wen, MingKe You, WeiZhi Liu, Qi Li, and
Jian Li. Prompt engineering in consistency and reliability with the evidence-based
guideline for llms. npj Digital Medicine, 7(1):1–9, Feb 2024.
[85] Tianyang Xu, Shujin Wu, Shizhe Diao, Xiaoze Liu, Xingyao Wang, Yangyi Chen, and
Jing Gao. Sayself: Teaching llms to express confidence with self-reflective rationales,
2024.
[86] Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang,
Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought
reasoning in language models, 2023.
[87] Yuxuan Yao, Han Wu, Zhijiang Guo, Biyan Zhou, Jiahui Gao, Sichun Luo, Hanxu
Hou, Xiaojin Fu, and Linqi Song. Learning from correctness without prompting
makes llm efficient reasoner, 2024.
[88] Shih-yang Liu, Zechun Liu, Xijie Huang, Pingcheng Dong, and Kwang-Ting
Cheng. Llm-fp4: 4-bit floating-point quantized transformers. arXiv preprint
arXiv:2310.16836, 2023.
Faculty of Engineering, Blekinge Institute of Technology, 371 79 Karlskrona, Sweden
Key ethical considerations include strong data governance to prevent data leaks, addressing potential biases in models trained on biased datasets, and ensuring data privacy against unnecessary exposure . These issues can be addressed through strict adherence to regulations like GDPR, regular audits, implementing bias mitigation strategies, and employing robust anonymization protocols .
Responsible deployment of LLMs in ITSM involves implementing strong data governance policies, ensuring data anonymization, and adhering to data protection regulations like GDPR . Deploying regular audits and compliance checks can further safeguard against data privacy risks and ensure the models are not retaining or exposing sensitive data unnecessarily .
In multi-turn interactions, LLMs exhibit varying performance levels, with GEMMA2-9B performing well in descriptive and data cleaning tasks and LLAMA3.1-8B excelling in graphical analysis . User feedback is critical in this context as it allows for iterative refinement of model outputs. LLMs learn from user input to correct errors or hallucinations, enhancing their ability to generate accurate code over multiple interactions .
While LLMs can generate accurate visual representations of ITSM data, such as bar plots and scatter plots, models often face challenges like handling datetime formats and complex plotting tasks . Despite these challenges, when errors are resolved, LLMs produce correct and relevant outputs, but their effectiveness is hampered by potential data formatting issues .
LLMs transform ITSM data analysis by automating tasks such as data extraction, pattern recognition, and root cause analysis. They enable proactive and automated approaches, quickly analyzing incident reports for patterns that human analysts might miss and generating code for custom data analytics tasks . However, LLMs face limitations such as scalability issues with complex tasks, model biases, data security concerns, and risks of overfitting when fine-tuned for specific tasks .
ITSM benefits from LLMs' automated analysis capabilities by reducing manual data processing and enhancing proactive incident handling, thus reducing downtime and improving service quality . However, limitations include difficulties in handling large codebases and statistical tasks, potential biases leading to unfair incident prioritization, and issues related to data privacy .
LLMs can enhance decision-making in ITSM by automating data analysis, quickly recognizing patterns, and generating insights from incident reports . However, they require further development in handling complex statistical analyses, scalability issues, and mitigating biases present in trained data to avoid unfair prioritization of incidents .
To identify effective prompting strategies for generating code in ITSM data analytics, a literature review is proposed to catalog existing strategies, followed by experimental validation to test these strategies in controlled conditions . Experiments allow for measuring the impact on code quality, accuracy, and relevance to ITSM-specific requirements, ensuring the strategies are effective .
LLMs like PHI3-14B, GEMMA2-9B, and LLAMA3.1-8B struggle with statistical tasks such as hypothesis testing or ANOVA, indicating a significant gap compared to their textual analysis capabilities . GEMMA2-9B excels in descriptive and data cleaning tasks but all models underperform in handling complex statistical analysis due to their primary optimization for text rather than precise numeric computation .
Zero-Shot prompting typically yields generalized and broad outcomes as the model struggles with complex tasks due to a lack of context . In contrast, Priming provides initial context that significantly improves the relevance and accuracy of generated code, making it more effective for ITSM tasks as it guides the model in delivering task-relevant outputs .