Tuesday, July 04, 2023
One of the most challenging tasks within Technical Writing is making complex concepts accessible to a wide range of readers. And this is because our readers come from various backgrounds and familiarity that is only sometimes easily predictable (unless you're publishing in a publication!). The "Tree of Thoughts" (ToT) framework offers a promising solution to this challenge. And it is an advanced technique in language model inference. This article delves into how the ToT framework can be used to enhance the accessibility of technical writing.
ToT enables exploration over coherent units of text, referred to as "thoughts," that serve as intermediate steps toward problem-solving. It is built upon the popular Chain of Thought Approach.
ToT is a framework that enables exploration over coherent blocks of text, referred to as "thoughts," serving as intermediate steps toward problem-solving. It builds upon the popular Chain of Thought Approach. In this context, a "thought" is not a mental process as we usually understand it but rather a coherent sequence of text generated by the language model. For instance, if we ask the model to explain a complex concept like "machine learning," each different explanation (e.g., coherant block of text) it generates can be considered a "thought." These "thoughts" are then evaluated to guide the model's problem-solving process.
In technical writing, this reasoning process explores different ways of explaining a complex concept. For instance, the language model could generate several "thoughts" or explanations at varying levels of complexity. Each explanation is evaluated based on its clarity, accuracy, and accessibility. This evaluation and generation process is a part of what we call prompt engineering. Based on this evaluation, the most suitable explanation for the intended audience can be selected.
Consider explaining the concept of "machine learning" to a non-technical audience. To explore different ways of explaining this, we ask the language model to generate a range of explanations, from a simple analogy comparing machine learning to teaching a child new skills to a more detailed explanation discussing algorithms, data sets, and training processes. Each explanation generated is a "thought" in the ToT framework.
Here's an example using chatGPT 3.5 (July, 2023) to explain this to two different levels of understanding:
Note: I have left the chatGPT explanation unaltered
The above explanations demonstrate different levels of complexity in conveying the concept of machine learning to a non-technical audience. The first explanation uses a relatable analogy to simplify the idea. In contrast, the second explanation provides more in-depth information about algorithms, datasets, and the training process involved in machine learning which requires more familiarity with machine learning.
The language model will then evaluate these "thoughts" based on their clarity, accuracy, and accessibility (remember, these are the criteria we chose for technical writing).
Based on this evaluation, the language model will select the most suitable explanation for the intended audience. Suppose the audience is non-technical, given our criteria. In that case, it will likely be the simple analogy for a non-technical audience comparing machine learning to teaching a child new skills. This is because the explanation is clear, accurate, and accessible, making it an effective way to make the complex concept of machine learning accessible to a wide range of readers.
It's important to note that while the ToT framework enhances the problem-solving abilities of language models, it doesn't guarantee perfect results. The language model's ability to generate and evaluate thoughts is still based on the patterns it has learned from its training data, and it doesn't possess a conscious understanding or belief. Therefore, human intervention and oversight remain crucial in ensuring the accuracy and appropriateness of the language model's outputs. Some limitations include the potential for the model to generate irrelevant or inaccurate thoughts or select a less-than-optimal "thought" due to biases in the training data.
In conclusion, the Tree of Thoughts framework represents a significant advancement in using language models for problem-solving. By enabling exploration over coherent units of text and combining this with systematic search algorithms, it allows for more deliberate and effective decision-making. However, as with any tool, its use should be guided by a clear understanding of its capabilities and limitations. As an advanced technique, it offers a more sophisticated approach to problem-solving but also requires a deeper understanding of language models and their workings.