Prompt engineering for generating high-quality conversations and its evaluation
PDF·September 4, 2025·33 min read Saved
NOLTA, IEICE
Paper
Hiiro Yamazaki A
, Tetsuya Asai A
, and Kota Ando A
Graduate School of Information Science and Technology, Hokkaido University Kita 14, Nishi 9, Kita-ku, Sapporo, Hokkaido 060-0814, Japan
Faculty of Information Science and Technology, Hokkaido University, Kita 14, Nishi 9, Kita-ku, Sapporo, Hokkaido 060-0814, Japan
Received April 20, 2025; Revised June 23, 2025; Published October 1, 2025
Abstract: Prompt engineering is the technique of designing and adjusting prompts for Large Language Models (LLMs) and generative AI, such as ChatGPT, to achieve the desired output. By leveraging this method, it is possible to maximize the AI's knowledge and capabilities, enabling the efficient generation of high-precision text. The importance of prompt engineering lies in the natural language processing characteristics of AI. LLMs learn statistical patterns from vast amounts of text data and generate outputs based on the given inputs. However, since the results are highly dependent on how prompts are formulated, effective prompt design, along with its evaluation and re nement, is essential for achieving the desired outcomes. In this study, we utilize prompt engineering to automate the generation of conversational data for Natural Language Processing (NLP) tasks. Speci cally, we focus on generating dummy data for training and evaluating machine learning models, as well as for developing dialogue systems. Furthermore, we vectorize the generated conversational texts and apply dimensionality reduction techniques for visualization, allowing us to analyze the diversity of the conversations and identify clustering tendencies. This approach helps us examine how different prompt designs in uence the outputs and reveal the distribution characteristics of the generated data. Through this analysis, we can assess the suitability of the generated data as dummy data for NLP applications.
Key Words: prompt engineering, generative AI
This work is licensed under a Creative Commons Attribution Non Commercial, No Derivatives 4.0 License. Nonlinear Theory and Its Applications, IEICE, vol. 16, no. 4, pp. 909–924 c⃝IEICE 2025 DOI: 10.1587/nolta.16.909
1. Introduction
Recently, the application of Large Language Models (LLMs) has rapidly advanced in the eld of Natural Language Processing (NLP). Generative AI is increasingly being implemented for various tasks, including text generation, summarization, translation, and question answering. To effectively utilize these models, designing appropriate input prompts is crucial, leading to growing interest in the technique known as \prompt engineering." Since prompt design has a signi cant impact on the quality and consistency of model outputs, optimizing and ne-tuning prompts is essential for maximizing AI performance [1, 2].
In this study, we leverage prompt engineering to automate the generation of conversational data for machine learning model training, evaluation, and dialogue system development. Speci cally, we focus on methods for generating dummy data using LLMs and evaluate the impact of different prompts on the output diversity and quality of the generated outputs.
Furthermore, we vectorize the generated conversational data and apply dimensionality reduction techniques for visualization, enabling us to analyze the distribution characteristics and clustering tendencies of the data. This approach allows us to examine the impact of prompt design on model outputs and assess the suitability of the generated data as dummy data.
This paper makes the following contributions:
• We leveraged prompt engineering to automatically generate conversational data for training and evaluating machine learning models.
• We developed a methodology to analyze the distribution characteristics and clustering tendencies of the generated conversational data by vectorizing it and applying dimensionality reduction techniques for visualization.
• Through our analysis, we demonstrated the effectiveness of prompt engineering in generating high-quality conversational data.
The rest of the paper is organized as follows: Section 2 introduces prompt engineering. Section 3 discusses how we utilize prompt engineering to automatically generate conversational data for training and evaluating machine learning models, as well as for developing dialogue systems. In Section 4, we vectorize the generated conversational data and analyze its distribution characteristics and clustering tendencies using dimensionality reduction techniques for visualization. Through this analysis, we demonstrate the effectiveness of prompt engineering in conversational data generation. Finally, in Section 5, we conclude the paper.
This work extends our previous conference paper [3] by providing a more comprehensive evaluation of conversation generation methodologies and a quantitative analysis of the visualization techniques.
2. Related work
2.1 Prompt engineering Recently, LLMs have advanced rapidly, leading to their widespread application across various domains [4, 5]. However, alongside these advancements, the issue of hallucination| where AI models generate factually incorrect information with high con dence| has become an increasingly signi cant concern [6]. This issue poses signi cant challenges, particularly in elds that require high reliability, such as healthcare, education, and law.
![Fig. 1. COT (left) and TOT (right) [9, 10].](https://cdn.sanity.io/images/xiedtuly/production/a66fb5c616bb1d4417860ad4388bdd5131be415b-605x442.webp)
AI model hallucinations are triggered by multiple factors, with the quality and bias of training data being among the primary causes [7]. LLMs generate text by learning from vast amounts of internet data, which often contain misinformation and biased content. Furthermore, the characteristics of AI's generative algorithms also contribute to hallucinations. LLMs construct text by probabilistically predicting the next word in a sequence, prioritizing grammatical coherence over logical accuracy or factual consistency [8]. Moreover, hallucinations are more likely to occur when the context provided in the prompt is insufficient. AI generates responses based on user prompts, but when the prompt is ambiguous or lacks necessary information, the model may produce speculative content without adequate grounding in factual data. Given these contributing factors, mitigating hallucinations requires
improvements in AI model design, the quality of training data, and careful structuring of user inputs. This approach, known as prompt engineering, plays a crucial role in optimizing AI performance while minimizing the generation of misinformation.
2.2 COT (Chain-of-Thought) COT (Chain-of-Thought) prompting is a technique that has proven effective for complex reasoning tasks using LLMs [9, 11]. Unlike conventional prompting, which requests the model to provide a direct answer, COT explicitly describes the reasoning process leading to the solution, as illustrated in Fig. 1, with the aim of enhancing the model's reasoning ability and adaptability. This method has been particularly effective for tasks involving multi-step reasoning, such as arithmetic operations, inference tasks that require integrating multiple pieces of knowledge, and multi-hop question-answering tasks.
The introduction of COT is expected to offer several advantages. First, it enhances complex reasoning capabilities. By explicitly presenting a sequence of thought processes to the model, COT enables it to handle tasks that require multiple logical reasoning steps, rather than relying solely on pattern matching. In terms of interpretability, the visibility of the reasoning process enables users to track the model's thought process, making it easier to verify the accuracy and validity of its answers. This transparency also contributes to more efficient error detection and debugging, as identifying the step where an error occurs allows targeted modi cations in preprocessing or model architecture.
2.3 TOT (Tree-of-Thought) TOT (Tree-of-Thoughts) has recently been proposed as an advanced extension of COT, designed to maximize the potential of LLMs in problem-solving and complex reasoning tasks [10, 12]. While COT makes the reasoning process explicit and controllable by sequentially outlining a chain of inference, it follows a single trajectory (chain). Therefore, if an error occurs during intermediate reasoning or hypothesis formulation, the model may struggle to reach the correct solution. In contrast, as illustrated in Fig. 1, TOT conceptualizes the reasoning process as a \tree structure," enabling the simultaneous generation, evaluation, and re nement of multiple hypotheses. By exploring a broader problem space, TOT aims to identify solutions that are closer to optimal.
Through these steps, reasoning proceeds in a way where multiple candidates compete and are compared against each other, rather than following a single trajectory as in conventional COT. This approach mitigates the risk of being misled by an initially incorrect hypothesis. By exploring multiple reasoning paths in parallel, diverse perspectives are more likely to be incorporated, increasing the probability of reaching an optimal solution. Additionally, the mutual evaluation of ideas enhances the model's intrinsic error detection and correction capabilities.

3. Generating high-quality conversations
With recent advancements in NLP technologies, numerous applications have been developed to analyze and utilize information derived from raw conversations, such as user-to-user chats, social media comments, and transcriptions of voice calls. However, handling such raw conversational data presents signi cant challenges from both privacy and security perspectives, particularly for research purpose [13]. In real-world conversations, variations in speech styles (e.g., formal versus informal language), frequent use of abbreviations and slang, unintentional typographical errors, and the presence of personally identi able information all contribute to the complexity of data processing. Even when explicit identi ers like names, addresses, or contact details are absent, contextual clues within conversations can still reveal sensitive information, such as one's workplace, family structure, or personal preferences. Consequently, using conversational data directly as test data for applications poses a signi cant risk of privacy violations, potentially leading to legal and ethical repercussions for companies and research institutions. However, without conducting tests that account for the natural ow and context of real conversations, accurately evaluating the practical usability of NLP applications becomes challenging. In other words, test environments that do not utilize real-world data may fail to replicate the diverse conversational expressions and intents expected in production settings, increasing the risk of unforeseen issues once the service is deployed [14].
To address these challenges, it is essential to generate test data that closely mirrors real conversations while incorporating privacy-preserving techniques, such as anonymization and masking. Speci - cally, we propose leveraging the advanced text generation capabilities of generative AI, combined with prompt engineering techniques that have recently gained signi cant attention. This approach enables the creation of diverse, realistic dummy conversation datasets without compromising user privacy. The signi cance of this study lies in its approach to automatically generating multi-turn human-to-human dialogues using LLMs. While many existing methods, such as Self-Instruct [15], primarily focus on generating instruction data for single-turn question answering, they fall short in addressing the generation of coherent and contextually consistent multi-turn dialogues. Furthermore, conventional data augmentation techniques, such as Easy Data Augmentation (EDA) [16], are limited to sentence-level augmentation without contextual dependencies, making them less suitable for structured and sequential data like dialogue. This study aims to develop a method for efficiently generating high-quality synthetic conversational data that closely mimics real human interactions, enabling realistic system evaluations while mitigating privacy risks. Here, we de ne high-quality conversation not by formal coherence (i.e., grammatical or structural consistency), but rather by the presence of informational Table I. Japan Standard Industrial Classi cation.
Job types A Agriculture and Forestry B Fishing C Mining, Quarrying and Gravel extraction D Construction E Manufacturing F Electricity, Gas, Heat supply, and Water supply G Telecommunications H Transportation and Postal services
diversity. Prior research has pointed out that natural human dialogues often lack strict formal coherence, yet still convey essential information through fragmented and spontaneous exchanges [17, 18]. Building on these insights, this study does not consider adherence to all formal criteria a prerequisite for quality. Instead, we emphasize the inclusion of varied and realistic content as the de ning criterion of quality, and evaluate conversational quality from the perspective of informational diversity.
3.1 Problems with conversations generated by generative AI In this study, we propose a method for automatically generating multi-party conversations using generative AI, aimed at training and evaluating AI models. Speci cally, our goal is to efficiently generate large volumes of conversational data that closely mimics human-to-human interactions efficiently at scale. However, simply providing a basic prompt like \generate a conversation" often fails to produce the expected level of natural interaction, as illustrated in the Fig. 2. A major factor contributing to this issue is the lack of sufficient contextual details, including the situation and purpose of the conversation. When modeling human conversations, it is crucial to consider not only the participants' pro les but also contextual elements such as when, where, and why the dialogue is occuring. For instance, even when generating conversations between friends, the vocabulary, tone, and ow will differ signi cantly depending on whether the interaction occurs during casual chatting at home, a catch-up session at a cafe, or a business meeting in an office. However, when given a simple one-line prompt, generative AI often lacks the necessary background information, resulting in overly generic and abstract exchanges.
In the preliminary experiments conducted during the early stages of this study, conversations generated using simple prompts often resulted in fragmented exchanges. These interactions typically consisted of generic small talk, such as vague progress checks between a manager and a subordinate or casual inquiries about each other's well-being, without clearly establishing the relationship between participants or the purpose of the conversation.
Considering these challenges, it becomes evident that generating natural, human-like conversational data using generative AI requires explicitly specifying the situational context| namely, where, when, and for what purpose the conversation occurs|and ensuring the model can effectively recognize this information. By de ning participant attributes and incorporating key elements such as the conversation's setting, the purpose behind the dialogue, and the range of expected topics, the model can more accurately infer the circumstances in which utterances occur. To address these issues, this study proposes a contextually detailed prompt design for conversation generation. Speci cally, while maintaining participants' identities (e.g., names and roles), we introduce a structured approach that explicitly de nes the conversation's setting, purpose, and environmental factors in a way that generative AI models can effectively interpret. By reinforcing previously ambiguous background information, this method aims to enable the automated generation of more coherent and contextually rich dialogues.

3.2 Prompt engineering for generating high-quality conversations In the preceding sections, we discussed the importance of generating high-quality conversations and argued that achieving this goal requires carefully setting the detailed conditions of the conversational
environment. The quality of a conversation is not solely dependent on the performance of the generative AI but is also signi cantly in uenced by the context provided to the AI; including the purpose of the dialogue and additional factors such as the relationship between interlocutors and cultural elements within the workplace. By carefully considering these factors, the likelihood of generating more natural and practical dialogues can be substantially increased. In this study, we focus on dialogue generation within workplace environments as a key aspect of high-quality conversational generation. Optimizing business communication is a critical factor directly linked to enhancing corporate competitiveness. In this context, our research aims to create natural dialogue datasets speci cally tailored to workplace interactions. The objective of this study is to enhance the accuracy of NLP systems in workplace environments by constructing a practical, task-oriented conversational dataset. Speci - cally, we aim to develop a dataset that re ects the nature of business operations and industry-speci c characteristics, enabling NLP applications for business-oriented dialogue analysis to be evaluated in a manner applicable to real-world tasks.
To address this issue, this study proposes a method for systematically organizing job types based on the Japanese Standard Industrial Classi cation(JSIC), as shown in Table I, and automatically generating workplace conversations tailored to each job type. The JSIC is a standard classi cation used in Japan to categorize companies and business activities by job type, systematically organizing occupations based on the characteristics of economic activities. In this study, we aim to construct a high-precision workplace conversation dataset that re ects the characteristics of each job type by designing prompts tailored to speci c job types based on this classi cation.
In conversation data generation, an ad-hoc approach to prompt design has inherent limitations. Manually crafting individual conversation contexts is inefficient and makes it challenging to create a dataset that comprehensively covers a wide range of scenarios. Furthermore, generating a large volume of conversation data requires a mechanism that enables for the efficient creation of multiple dialogues simultaneously. Without a structured approach, ensuring both scalability and diversity in the generated dataset becomes impractical. In this study, we address this challenge by leveraging TOT to iteratively evaluate and re ne the generation of high-quality synthetic conversation data. TOT is a tree-structured search method that enables the exploration of multiple alternative solutions before identifying the optimal outcome. Furthermore, when specifying conversation conditions, the tree structure allows the generative AI to evaluate and differentiate at each branching point, facilitating the natural incorporation of the given constraints. This ensures that the AI considers the relationships between branches, maintaining logical consistency across different conversational conditions. Therefore, the generated dialogues exhibit greater coherence and contextual appropriateness, enhancing the applicability of the dataset to real-world business environments.
In this study, we aim to establish a method that leverages the characteristics of TOT, enabling conversational AI to generate diverse datasets while appropriately considering speci ed conditions. This approach addresses the challenge of efficient data generation faced by conventional methods and contributes to the development of higher-precision conversational models. By systematically exploring and re ning generated dialogues, we enhance both the scalability and contextual accuracy of AI-generated conversation data, ultimately improving the applicability of NLP systems in real-world business environments.
TOT is employed as a prompt engineering method for generating conversations. This approach follows a step-by-step prompt design, structured as outlined below. An overview of the process is shown in Fig. 3. This method systematically organizes the entire process, from selecting job types based on the JSIC to generating and evaluating conversation data related to speci c tasks. The process follows these steps:
• The JSIC framework is explicitly presented to the AI, ensuring that it can appropriately select the target job type for the conversations. This standardization allows the AI to consistently categorize job types and prevents the incorrect selection of sectors. (step1)
• Next, a speci c sector is selected from the Japan Standard Industrial Classi cation. By allowing the AI to determine the appropriate sector, task extraction and conversation data generation can be adjusted to align with the characteristics of the selected job type. (step2)
• Tasks typically performed within the selected sector are extracted. In this step, TOT is utilized to enable the AI to explore multiple options simultaneously, rather than generating a single task. This approach ensures a more comprehensive task list. The actual prompt given is: \Please provide as many tasks as possible in the sector A." (step3)
• Next, the extracted tasks are evaluated for their relevance, based on whether they involves frequent meetings. By applying this criterion, only tasks that re ect real workplace conditions are selected, facilitating the generation of practical conversation data. The actual prompt given is: \Instruction: Please evaluate the tasks you have just output according to the following evaluation criterion. Evaluation criterion: Whether the task involves frequent conversation." (step4)
• Situations in which the evaluated tasks occur are identi ed. By envisioning how these tasks are performed in practice, multiple typical conversation situations that arise during task execution are extracted. The actual prompt given is: \Please narrow down to the tasks that meet the evaluation criterion, and provide as many situations as possible in which conversations are likely to occur within those tasks." (step5)
• Subsequently, the extracted situations are evaluated to determine their suitability for generating conversation data. The evaluation criterion is whether the situations are likely to prompt meaningful conversations. This ensures that the selected situations re ect real work environments. The actual prompt given is: \Instruction: Please evaluate the situations you have just output according to the following evaluation criterion. Evaluation criterion: Whether the situation occurs frequently." (step6)

• Based on the situations that passed the evaluation, the AI generates multiple conversations. At this stage, a condition is set that the total number of utterances between participants must be at least 10. This ensures a balanced exchange and generates conversation data with adequate content. The actual prompt given is: \Instruction: For the livestock rearing methods situation within the livestock farming task, generate a conversation in the form of a dialogue between
a supervisor and a subordinate. Also, please satisfy the following condition: The conversation must include at least 10 utterances in total, with at least 5 utterances from the supervisor and at least 5 utterances from the subordinate." (step7)
• Finally, the generated conversations are evaluated to verify whether they meet the predetermined conditions. Speci cally, conversations are assessed to ensure the total number of utterances is at least 10. This helps eliminate conversations with insufficient progression and ensures that only highly practical conversation data is retained. The actual prompt given is: \Instruction: Please evaluate the conversation you have just output according to the following evaluation criterion. Evaluation criterion: Whether the conversation consists of at least 10 utterances in total, including at least 5 from the supervisor and at least 5 from the subordinate." (step8)
Through this process, conversation data tailored to speci c job types is effectively generated, enabling the modeling of dialogues that accurately re ect real work environments.
By applying this process to all sectors listed in Table I, diverse and high-quality conversation data can be effectively generated. Particularly, by providing prior knowledge of the JSIC in Step 1, the AI can appropriately select job types based on this classi cation, despite the existence of various job classi cation methods. Omitting this step could lead to ambiguity, as different classi cation categories within the Japan Standard Industrial Classi cation might be mixed, resulting in outputs that do not meet expectations. Furthermore, by utilizing TOT from Step 2 to Step 8, the AI can process multiple thought paths in parallel, enabling a broader exploration compared to conventional linear generation methods. Speci cally, in Step 4 and Step 6, the evaluation criterion |whether a task or situation involves frequent meetings| helps focus the generation on scenarios where conversations are more likely to occur. By employing this method, conversation data can be efficiently generated to align with various tasks and situations based on industrial classi cation. Moreover, the integration of a stepwise evaluation and re nement process through TOT enables the creation of a highly precise dataset, enhancing both the relevance and accuracy of the generated conversations.
Figure 4 illustrates the initial portion of a conversation generated using the proposed prompt. The conversation shown represents the output for the industry in sector A. By comparing it with the conversation generated using the conventional prompt, as shown in Fig. 2, we can observe a noticeable improvement in quality due to the applied environmental settings. However, evaluating the quality of conversations solely by comparing dialogue texts remains a qualitative analysis. Therefore, in the next section, we introduce a quantitative evaluation method to assess how well the generated conversations align with the speci ed conditions, allowing analysis based on numerical metrics.
4. Quantitative evaluation of generated conversations
In this section, we propose a method for quantitatively evaluating how well the environmental settings are re ected in dialogue generation and apply this method in an actual evaluation. One of the challenges in assessing dialogue quality is that qualitative evaluations are always subjective and lack consistency.
To address this issue, we rst propose a method for quickly evaluating large-scale dialogue data at a glance. When assessing the quality of generated dialogues, we rst evaluate whether the dialogues for each profession appropriately re ect the environmental settings speci ed in the prompt. Following that, we conduct a across-profession evaluation for a more detailed analysis. This section provides a step-by-step explanation of these evaluation processes and veri es the effectiveness of the proposed method.
4.1 Proposal of a quantitative evaluation method This study discusses a quantitative evaluation method for large-scale conversational data. The proposed approach consists of two main steps: rst, vectorizing the conversations, and second, reducing the dimensionality of the high-dimensional vectors for visual analysis. By transforming conversational data into numerical representations, we enable a mathematical assessment of similarity and diversity, allowing a systematic analysis of conversational trends.
In this study, we adopt a distributed representation approach for conversation vectorization to more accurately evaluate conversational similarity. Speci cally, we employ SBERT [19] to compute semantic similarity at the sentence level, enabling a more robust and context-aware representation of conversations. We utilize SBERT for conversation vectorization; however, instead of analyzing entire conversations, we focus only on the rst exchange of dialogue (i.e., the initial utterance-response pair). This decision is driven by the fundamental challenge of quantitatively evaluating lengthy conversations. When assessing entire conversations, the consistency of meaning often degrades as the dialogue progresses, due to increasing topic shifts and contextual changes, making precise quantitative evaluation challenging. Moreover, from a computational cost perspective, processing high-dimensional vectors at scale imposes signi cant computational burdens, making it particularly impractical for large datasets. Additionally, as a conversation progresses, the in uence of the initial setup diminishes, while the impact of the AI's response capabilities increases. To ensure a more reliable evaluation of conversation quality, we conclude that analyzing the initial portion | where the conversational environment is most clearly re ected | is the most reasonable approach.

Since vectorized conversation data exists in a 768-dimensional high-dimensional space, understanding their relationships intuitively can be challenging. To address this, we apply dimensionality reduction techniques to compress the data into a lower-dimensional space (2D or 3D) for visualization. This approach enables us to analyze conversation classi cation and trends, facilitating a more interpretable and systematic understanding of conversational structures. One widely used technique for high-dimensional data reduction is t-SNE (t-Distributed Stochastic Neighbor Embedding) [20]. In this study, we introduce trustworthiness and continuity as quantitative metrics to evaluate the performance of dimensionality reduction techniques, such as t-SNE [21]. These metrics assess how well
the data structure in the original high-dimensional space is preserved after projection into a lowerdimensional space. Trustworthiness measures the extent to which points that appear as neighbors in the low-dimensional space were also neighbors in the high-dimensional space, indicating whether inappropriate neighborhood relationships have been newly introduced. In contrast, continuity evaluates how well the neighborhood relationships in the high-dimensional space are preserved in the low-dimensional representation, indicating whether the original local structure has been lost. By using these metrics, we can assess whether the clusters formed in the low-dimensional space appropriately re ect semantic differences|namely, differences in content|between sentences as represented in the original high-dimensional space.
Our proposed method enables a systematic evaluation of AI-generated conversations, making the quantitative assessment of conversation quality more accessible. In the following section, we apply this method to conduct an evaluation.
4.2 Evaluation 1: Evaluation in a specific job type In this section, we visualize the vectorized conversation data using t-SNE. Speci cally, we use conversation data from sector A (Agriculture and Forestry) as an example and plot 60 data points. Each point in Fig. 5 represents a single conversation, projected into a two-dimensional space using t-SNE. t-SNE is a dimensionality reduction technique that maps high-dimensional data into a lower-dimensional space while preserving the local structure. Its primary objective is to place similar data points closer together, while positioning dissimilar data points further apart. The horizontal axis (Component 1) and vertical axis (Component 2) represent the two-dimensional coordinates from the original high-dimensional data; however, these axes themselves do not have speci c meanings. Therefore, when interpreting the plotted data, it is crucial to focus on the relative distribution of the points rather than the numerical values of the axes. To evaluate the validity of the dimensionality reduction results shown in Fig. 5, we conducted a quantitative assessment using the trustworthiness and continuity metrics. With the neighborhood size parameter set to k = 5, the trustworthiness and continuity scores were found to be 0.983 and 0.974, respectively, indicating a high level of preservation. These results suggest that the local structure in the high-dimensional space is well preserved in the reduced-dimensional representation. Therefore, the cluster structures observed in the lowdimensional space likely re ect meaningful semantic differences among the original high-dimensional sentence representations.

In this study, we set the t-SNE parameters as follows: a batch size of 60, a perplexity of 20, and 1000 iterations. The batch size was set to balance computational cost and visualization quality. A batch size that is too large, increases the computational burden, while a batch size that is too small may fail to adequately capture the local structure. Therefore, this value was chosen based on the scale of the
dataset to ensure optimal performance. Perplexity is a parameter that determines the neighborhood relationships among data points, and values in the range of 5 to 50 are generally recommended. In this study, we used a dataset consisting of 60 data points, and conducted comparative experiments with multiple perplexity values (e.g., 10 and 30) to balance the preservation of local structure with the global data distribution. As a result, we selected a perplexity value of 20, which yielded the most favorable balance between local and global structures. A smaller perplexity tends to overly emphasize local relationships, while a larger one prioritizes global structure, making the choice of 20 a reasonable compromise considering the dataset size and structure. Furthermore, we set the number of optimization iterations for t-SNE to 1000. If the number of iterations is too low, the resulting distribution may not fully converge, while an excessively high number of iterations increases computational time. To ensure adequate convergence while minimizing unnecessary computational overhead, we selected 1000 iterations. Generally, t-SNE requires between 1000 and 5000 iterations to converge, And in this study, we selected 1000 iterations as a balanced compromise between computational efficiency and effective visualization. By using this method, the similarities between conversation data can be intuitively understood, enabling visual analysis of clustering tendencies and the identi cation of conversations with distinct characteristics. The data distribution visualized through t-SNE, provides a clearer insight into which conversations share similarities and which exhibit unique features.
As we advanced with our analysis, we applied color coding to differentiate tasks within sector A, as shown in Fig. 6. The data generation process in this study follows a three-stage framework: rst, identifying the job type; second, classifying the speci c tasks performed within that job type; and third, exploring typical conversational situations that arise in each task. The current color coding corresponds to the second stage and is used to verify task clustering. The dataset consists of 60 data points, evenly distributed across three tasks, with 20 points assigned to each task. To facilitate task classi cation, we used three distinct colors. This color coding enables a clearer visual representation of the characteristics and differences among the tasks. The gure clearly shows three distinct colors, each representing a different task: \livestock farming," \forestry," and \paddy eld management." These tasks are labeled A1 to A3, respectively. This result indicates that the conversations generated by the AI appropriately re ect the characteristics of tasks within sector A. Although all 60 conversation data points belong to the same job type (sector A), they form distinct clusters corresponding to each task, con rming that the prede ned task characteristics have been accurately captured.

Next, we further examined the tasks within sector A and applied color coding to differentiate the situations, as shown in Fig. 7. In contrast to Fig. 6, which re ects the job type, this gure shows the distribution of the different situations. The dataset consists of 60 data points, evenly distributed
across three tasks, with 20 points assigned to each task. Additionally, ve distinct situations were de ned for each task, resulting in 15 different colors used for classi cation. This color coding enhances the visual representation of the characteristics and differences among the situations. The gure clearly shows that the 15 colors are distinctly separated. In \livestock farming," the situations include discussions on \livestock rearing methods," \epidemic prevention measures," \feed selection and nutritional management", and \market trends and sales strategies," corresponding to the labels A1 1 to A1 5, respectively. In \forestry," the situations cover \forest management planning," \logging plans and timber utilization," \afforestation activities and ecosystem conservation," \disaster prevention and risk management," and \collaboration with local communities," corresponding to the labels A2 1 to A2 5, respectively. In \paddy eld" management, the situations involve discussions on \water resource management," \ timing of rice planting and harvesting," \pest and disease control planning," \ selection of rice varieties," and \ sustainability of paddy eld environments", which correspond to the labels A3 1 to A3 5, respectively. This result indicates that the AI-generated conversations accurately re ect the situational diversity within each task. The distinct clustering of situations further supports the effectiveness of the classi cation framework. The primary factor contributing to these results is the prompt design utilizing TOT. Speci cally, during the process of setting conditions, we repeatedly evaluated the appropriateness of each condition. This iterative evaluation allowed us to select conditions that effectively facilitated the generation of relevant conversations. Furthermore, by employing TOT, the generative AI was able to understand the differences among various condition settings. This allowed the AI to accurately recognize the positioning of each condition, ensuring that it generated conversations that correctly re ected the given conditions without deviation.

4.3 Evaluation 2: Evaluation across various job types In the previous section, we analyzed the clustering characteristics of job types within sector A (Agriculture and Forestry) as a case study. In this section, we aim to evaluate a large volume of conversational data across different sectors simultaneously. Speci cally, in addition to the conversational data from sector A (Agriculture and Forestry), we incorporated 60 additional data points from sector B (Fishing), resulting in data points. These are visualized in Fig. 8. As with the previous section, the t-SNE parameters were set as follows: batch size of 60, perplexity of 20, and number of iterations set to 1000. Each data point represents a single conversation, and the visualization displays the projection of highdimensional data into a two-dimensional space using t-SNE. The horizontal axis (Component 1) and vertical axis (Component 2) indicate the transformed coordinates from the original high-dimensional data; but these axes themselves do not carry speci c meanings. Therefore, when interpreting the plot, it is crucial to focus on the relative distribution of the points rather than the numerical values of the
axes. To evaluate the validity of the dimensionality reduction results shown in Fig. 8, we conducted a quantitative assessment using the trustworthiness and continuity metrics. With the neighborhood size parameter set to k = 5, the trustworthiness and continuity scores were found to be 0.963 and 0.952, respectively, indicating a high level of preservation. These results suggest that the local structure in the high-dimensional space is well preserved in the reduced-dimensional representation. Therefore, the cluster structures observed in the low-dimensional space likely re ect meaningful semantic differences among the original high-dimensional sentence representations. In the gure, data points are color-coded according to job type to highlight clustering patterns. In this study, we rst identi ed the different job types and then classi ed the speci c tasks performed within each one. Furthermore, we examined typical conversational situations that occur within each task, establishing a three-stage framework for detailed contextual analysis. The color-coding in this visualization corresponds to the initial stage of clustering veri cation.
The gure clearly shows two distinct colors, indicating a clear separation between the clusters. The labels in the gure correspond to their respective sectors. This result suggests that the AI-generated conversations appropriately re ect the characteristics of each job type. Although both Agriculture and Forestry and Fishing fall under the primary industry sector, seperate clusters are formed for each job type, highlighting the differences in the tasks associated with them. Additionally, as indicated by the red-bordered areas in the gure, some data points deviate from the main clusters. This does not imply that the generative AI ignored instructions, but rather suggests the presence of common topics across job types. Speci cally, while Agriculture and Forestry and Fishing are classi ed into different sectors, conversations about the impact of typhoons occurred in both. This is an intriguing nding, indicating that similar conversational patterns can emerge even across different job types.

Next, in addition to the conversational data from sector A (Agriculture and Forestry) and sector B (Fishing), we incorporated data from sector C (Mining, Quarrying, and Gravel Extraction) and sector D (Construction), adding 60 data points from each sector. Therefore, 240 data points were visualized, as shown in Fig. 9. As with the previous section, the t-SNE parameters were set as follows: batch size of 60, perplexity of 20, and number of iterations set to 1000. In the JSIC, sectors are classi ed up to sector P. However, this paper focuses on evaluating sectors A to D as representative examples. The horizontal axis (Component 1) and vertical axis (Component 2) represent the twodimensional coordinates derived from the original high-dimensional data. To evaluate the validity of the dimensionality reduction results shown in Fig. 9, we conducted a quantitative assessment using the trustworthiness and continuity metrics. With the neighborhood size parameter set to k = 5, the trustworthiness and continuity scores were found to be 0.973 and 0.951, respectively, indicating a high level of preservation. These results suggest that the local structure in the high-dimensional
space is well preserved in the reduced-dimensional representation. Therefore, the cluster structures observed in the low-dimensional space likely re ect meaningful semantic differences among the original high-dimensional sentence representations.
The gure shows four distinct clusters, each corresponding to a speci c job type. The labels in the gure indicate their respective sectors. This result suggests that the conversations generated by the AI accurately re ect the characteristics of each job type. Additionally, as observed earlier, some data points deviate from their respective clusters. This does not indicate a misinterpretation of instructions by the AI but rather suggests the presence of common topics across different job types. In particular, data points corresponding to sector D tend to be widely scattered across the embedding space. Upon examining the category structure of the construction industry, it becomes evident that the content extends beyond a mere enumeration of tasks and encompasses a highly multifaceted and complex set of elements. For example, topics such as \process management" and \quality control" unfold along a temporal axis, while institutional aspects such as \building codes" and \regulatory compliance" are also frequently mentioned. In addition, interpersonal dimensions like \stakeholder coordination" and \negotiations with landowners" are observed, along with references to peripheral areas such as \supply chains" and \environmental considerations." This thematic diversity suggests that conversations related to the construction sector tend to span a wide range of topics, which is likely re ected in the dispersed layout of sector D in the t-SNE visualization.
If sectors classi ed under the tertiary industry were to be included in this study, we would expect to observe even more distinct and well-separated clusters. This is due to the fundamental differences these sectors exhibit in terms of business processes, technologies used, and organizational structures compared to those in the primary and secondary industries. In fact, this study has already con rmed the formation of sufficiently clear clusters among closely related sectors A through D. This indicates that even among industrially similar sectors, each possesses unique conversational characteristics that can lead to the construction of independent clusters. Notably, the study deliberately included cases in which inter-sector differences are subtle and difficult to discern, yet clear cluster formation was still observed. This demonstrates the high discriminative capability of the proposed method and suggests that the application of this approach to more heterogeneous industrial domains may result in even clearer cluster differentiation.
In this study, a key factor contributing to the observed clustering is the use of TOT in prompt design. By leveraging TOT, the generative AI was able to accurately understand the contextual conditions of each job type and generate conversations that align with the characteristics of the respective tasks. This approach enabled the AI to produce conversation data that faithfully re ects the distinct features of each job type, without deviating from the speci ed conditions.
5. Conclusion
In this study, we aim to leverage generative AI to produce high-quality conversational texts that can serve as dummy data for natural language processing tasks. One challenge in conventional prompt design is the insufficient speci cation of conversational contexts, which often leads to a decline in the quality of generated dialogues. To address this issue, we propose a prompt design method that effectively sets the context in which conversations occur. Furthermore, to evaluate the diversity of the generated dialogues, we employed a method that vectorizes the conversations and plots them on a two-dimensional plane. The results demonstrated that the dialogues generated using the proposed method accurately re ected the speci ed contextual settings in the prompts and exhibited higher quality compared to conventional methods. This indicates that our approach helps mitigate the issue of degraded dialogue quality caused by inadequate contextual settings. This study con rms that our approach can generate high-quality dummy data suitable for system development and various natural language processing tasks. The proposed method not only facilitates the generation of practical conversational data but is also expected to contribute to the advancement of dialogue systems in the future.
Funding This research was conducted by Pasona Inc., with contributions from Mr. Shuhei Oe, Mr. Hiroki Takubo, Mr. Koichi Suzuki, Mr. Nobuyuki Tatebe, Mr. Yosuke Abe, Mr. Tenma Tanaka, and Ms. Yukiko Ishizuka. We would like to take this opportunity to sincerely express our gratitude to everyone for their cooperation.
Conflicts of interest The authors declare no competing interests to declare.
Author contribution All authors made equal contribution to this work.
References [1] X. Hou, Y. Zhao, Y. Liu, Z. Yang, K. Wang, L. Li, X. Luo, D. Lo, J. Grundy, and H. Wang, \Large language models for software engineering: A systematic literature review," ACM Trans. Software Engineering and Methodology, vol. 33, no. 8, pp. 1{79, 2024. [2] J. Shin, C. Tang, T. Mohati, M. Nayebi, S. Wang, and H. Hemmati, \Prompt engineering or ne tuning: An empirical assessment of large language models in automated software engineering tasks," arXiv preprint arXiv:2310.10508, 2023. [3] H. Yamazaki, T. Asai, and K. Ando, \Methodology for generating and evaluating diverse conversations using prompt engineering techniques," NCSP‘25, February 27-March 2, 2025. [4] J. Kaddour, J. Harris, M. Mozes, H. Bradley, R. Raileanu, and R. McHardy, \Challenges and applications of large language models," arXiv preprint arXiv:2307.10169, 2023. [5] H. Naveed, A.U. Khan, S. Qiu, M. Saqib, S. Anwar, M. Usman, N. Akhtar, N. Barnes, and A.
Mian, \A comprehensive overview of large language models," arXiv preprint arXiv:2307.06435, 2023. [6] L. Huang, W. Yu, W. Ma, W. Zhong, Z. Feng, H. Wang, Q. Chen, W. Peng, X. Feng, B. Qin, et al., \A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions," arXiv preprint arXiv:2311.05232, 2023. [7] Y. Zhang, Y. Li, L. Cui, D. Cai, L. Liu, T. Fu, X. Huang, E. Zhao, Y. Zhang, Y. Chen, et al., \Siren's song in the ai ocean: a survey on hallucination in large language models," arXiv preprint
[8] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, et al., \Language models are unsupervised multitask learners," OpenAI blog, vol. 1, no. 8, p. 9, 2019.
[9] J. Wei, X. Wang, D. Schuurmans, M. Bosma, F. Xia, E. Chi, Q.V. Le, D. Zhou, et al., \Chain-ofthought prompting elicits reasoning in large language models," Advances in Neural Information Processing Systems, vol. 35, pp. 24824{24837, 2022. [10] S. Yao, D. Yu, J. Zhao, I. Shafran, T. Griffiths, Y. Cao, and K. Narasimhan, \Tree of thoughts:
Deliberate problem solving with large language models," Advances in Neural Information Processing Systems, vol. 36, 2024. [11] B. Wang, S. Min, X. Deng, J. Shen, Y. Wu, L. Zettlemoyer, and H. Sun, \Towards understanding chain-of-thought prompting: An empirical study of what matters," arXiv preprint
[12] N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao, \Re exion: Language agents with verbal reinforcement learning," Advances in Neural Information Processing Systems, vol. 36, 2024. [13] H. Li, Y. Song, and L. Fan, \You don't know my favorite color: Preventing dialogue representations from revealing speakers' private personas," arXiv preprint arXiv:2205.10228, 2022. [14] A. Podolskiy, D. Lipin, A. Bout, E. Artemova, and I. Piontkovskaya, \Revisiting mahalanobis distance for transformer-based out-of-domain detection," Proc. AAAI Conference on Artificial Intelligence, vol. 35, pp. 13675{13682, 2021. [15] Y. Wang, Y. Kordi, S. Mishra, A. Liu, N.A. Smith, D. Khashabi, and H. Hajishirzi, \Self-instruct: Aligning language models with self-generated instructions," arXiv preprint
[16] J. Wei and K. Zou, \Eda: Easy data augmentation techniques for boosting performance on text classi cation tasks," arXiv preprint arXiv:1901.11196, 2019. [17] G. Kasper and J. Wagner, \Conversation analysis in applied linguistics," Annual Review of Applied Linguistics, vol. 34, pp. 171{212, 2014. [18] H. Sacks, E.A. Schegloff, and G. Jefferson, \A simplest systematics for the organization of turn-taking for conversation," Language, vol. 50, no. 4, pp. 696{735, 1974. [19] N. Reimers, \Sentence-bert: Sentence embeddings using siamese bert-networks," arXiv preprint
[20] L. Van der Maaten and G. Hinton, \Visualizing data using t-sne.," Journal of Machine Learning Research, vol. 9, no. 11, 2008. [21] J. Lee and M. Verleysen, \Quality assessment of nonlinear dimensionality reduction based on k-ary neighborhoods," New Challenges for Feature Selection in Data Mining and Knowledge Discovery, pp. 21{35, 2008.