ADS Capstone Chronicles Revised
8
responding in requested formats, a maximum input of 16,385 tokens, and a minimum output of 4,096 (OpenAI, 2024). To prompt the LLM, we combine one-shot prompting—a variant of few-shot prompting—and tree-of-thought (ToT) prompting to enhance the adaptability and reasoning capabilities of language models. Few-shot learning refers to the setting where the model is given a few demonstrations of the task at inference time as conditioning (Brown et al., 2020). One-shot prompting narrows this condition to one demonstration at inference time for a specific task. One-shot learning most closely matches the human learning experience as they are typically only given one demonstration. GPT-3 showed promising results in the one-shot settings and achieved an 84.0 F-1 Score on conversational question-answering system (CoQA) in the one-shot setting compared to its few-shot setting counterpart, which achieved an 85.0 F-1 Score on CoQA. This suggests a substantial capability for rapid adaptation and on-the-fly reasoning with minimal preliminary data (Brown et al., 2020). Furthermore, ToT enables the LLM to evaluate a sequence of interconnected thoughts (or trees) in a single prompt. Each thought in the sequence serves as an intermediate step toward solving a problem. By combining the two methods we leverage the strengths of one-shot’s quick learning and ToT’s complex problem-solving (PromptingGuide.ai, 2024). We derive topic labels for individual news snippets through the use of an LLM. We provide the LLM with three pivotal components: a system prompt, an introduction, and detailed instructions. The system prompt delineates the overarching task assigned to the LLM, specifically, topic modeling. The introduction describes the nature of the task and the expected methodology for the
LLM to perform. Lastly, the instructions component is twofold: first, it presents a single news snippet example and its corresponding label; second, it provides a contingency in the scenario where the LLM is unable to create a label from the given text. The prompts are submitted as input along with each snippet. The labels are assigned iteratively over the sample whole with a 3-second buffer between API calls to ChatGPT. Some snippets may contain multiple subjects or conflicting statements, which makes creating an accurate label difficult for the LLM. Therefore, we add a contingency to assign a label as unknown if the LLM was unable to create a topic in its first attempt. In this scenario, the LLM will wait for 2 additional seconds before re-attempting to label the snippet. If the LLM is unsuccessful on the second attempt, the final output will be unknown . Alternatively, if the LLM is successful, the prompt provides instructions to create a label within a bigram and trigram range. 5 ResultsandFindings Sentiment analysis of polarity and subjectivity revealed an overall positive and objective reporting of climate change issues. The proportion of snippets categorized as objective for BBC News, CNN, FOX News, and MSNBC were .67, .66, .71, and .66, respectively. The proportion of snippets scored as positive for BBC News, CNN, FOX News, and MSNBC were .77, .79, .75, and .79, respectively. Topic modeling revealed several topics including global warming (topic 0), greenhouse gas emissions (and associated health effects) (topic 1), governmental policies regarding climate change (topic 2), presidential 4.5.2.2 Topic Labeling
24
Made with FlippingBook - Online Brochure Maker