## 2 Materials and Methods
### Syntactic Analysis in Chatbots  
A representative sample of various industries was chosen for syntactic analysis in chatbots to cover a spectrum of applications and broad-use contexts. For example, customer service assistants in retail were analyzed; these chatbots are programmed to handle product queries, inventory availability, and claims processing. Their ability to interpret questions with syntactic variations and provide appropriate answers in a dynamic e-commerce environment was analyzed. Financial advisors in banks are designed to offer advice on banking products, investments, and financial services; these chatbots are evaluated on their ability to understand complex queries related to personal finances and provide accurate recommendations. Similarly, hospital health assistants were considered; these chatbots handle questions about medical appointments, treatment information, and general health advice. Their competency in processing specific medical terminology and responding coherently to complex health scenarios was assessed. In each case, key variables such as the frequency of interactions, the range of questions processed, and the tasks' complexity were considered. This diversity in applications and contexts provides a solid basis for evaluating the impact of syntax on the communicative effectiveness of chatbots. First, questions of varying syntactic complexity were designed to evaluate the chatbots' responses, from simple queries to statements with intricate grammatical structures. These questions were presented to the chatbots, and their responses were recorded for analysis. For BERT, we focus on how the model processes and understands the context and intent behind the questions, evaluating its ability to correctly interpret syntax and implied meaning. With GPT, attention was directed to generating responses and observing the coherence, fluency, and relevance of the text produced in response to the questions posed. Each chatbot response was analyzed using a scoring framework that considered accuracy, relevance, and consistency, allowing for a quantitative and qualitative comparison between the different chatbots and the NLP tools used. Table 12 presents ten questions of different syntactic complexity, classified as simple, moderate, and complex. Simple questions, such as asking the time or weather, received high ratings, indicating that the chatbots responded accurately and effectively. Moderate questions, such as requesting banking information or setting alarms, had a medium rating. Complex questions, which include conditional scenarios or requests for specific processes, showed a low rating, reflecting challenges in the chatbot's understanding and appropriate response. Table 13 of response accuracy according to the NLP tool shows evaluation results for BERT and GPT in three categories of question complexity: simple, moderate, and complex. Each category groups questions of similar difficulty. For example, the two simple questions in the table above are grouped under 'Simple,' and the same goes for the 'Moderate' and 'Complex' categories. This explains why there are six results instead of ten. Accuracy percentages reflect each tool's effectiveness in answering questions in each category, with \begin{table}
\begin{tabular}{c c} \hline \hline
**Characteristic** & **Importance** \\ \hline Syntactic structure & 0.42 \\ Behavior history & 0.35 \\ Demographics & 0.23 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Table of relative importance of characteristics. BERT showing an advantage in complex queries and GPT excelling on simple and moderate questions. These results were obtained through a quantitative and qualitative analysis of the chatbots' responses to the questions. The results obtained reveal exciting patterns in the effectiveness of BERT and GPT. BERT showed higher accuracy on complex questions, likely due to its ability to better understand context and two-way sentence relationships.