Tree of Thoughts, Enhancing Accessibility in Technical Writing with Advanced Language Models

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[1] 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.

What is Tree of Thoughts?

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.

The Tree of Thoughts Framework

ToT is a framework that enables exploration over coherent blocks of text, referred to as "thoughts," serving as intermediate steps toward problem-solving.[2] 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.[3]

Applying ToT in Technical Writing

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

  1. Simple analogy: "Machine learning is like teaching a child new skills. Just like how a child learns from examples and experiences, machine learning algorithms learn from data to make predictions or perform tasks without being explicitly programmed."
  2. Detailed explanation: "Machine learning is a field of artificial intelligence where computers are trained to learn from data and make predictions or decisions without being explicitly programmed. It involves using algorithms, which are step-by-step procedures, to process large amounts of data called datasets. These datasets contain examples and patterns that the machine learning model analyzes and learns from. The model then uses this learned information to make predictions or perform specific tasks accurately."

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.

Evaluating Thoughts

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).

  • Clarity: The clarity of an explanation could be assessed based on how easily it can be understood by a non-technical reader.
  • Accuracy: The accuracy of an explanation could be evaluated based on how well it captures the essence of machine learning.
  • Accessibility: The accessibility of an explanation could be assessed based on how relatable it is to the reader's existing knowledge and experiences.

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.

Limitations of the ToT Framework

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[4], and it doesn't possess a conscious understanding or belief[5]. 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.

Conclusion

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.

Here are the footnotes:

  1. The "Tree of Thoughts" (ToT) framework is a method in language model inference that allows for exploration over coherent units of text, referred to as "thoughts," that serve as intermediate steps toward problem-solving. It builds upon the popular Chain of Thought approach and enhances the problem-solving abilities of language models.
  2. A tree in this context refers to a data structure used in computer science, which represents hierarchical relationships between objects or sets of information. Each "thought" in this tree is a coherent language sequence that serves as an intermediate step toward problem-solving.
  3. A deliberate reasoning process refers to a systematic and intentional approach to problem-solving, where each step is justified based on the information and analysis that precedes it.
  4. Training data refers to the dataset that a machine learning model learns from. The patterns a language model learns from its training data influence its ability to generate and evaluate thoughts.
  5. While language models can generate human-like text, they do not possess a conscious understanding or belief. They generate text based on patterns they learned from their training data without understanding the content or context.