Large Language Model Techniques

Task: Summarize the given YouTube video transcript and classify it as Entertainment, Educational, or Other. If the transcript is Educational, provide a bulleted list of key points. If code is explained in the video, include it in a code block. Identify any mentioned models, tokenizers, embeddings, or other files, and create a list in the footer. Additionally, include the title of the transcript as a footer note. If the transcript is Educational, summarize the text with references and provide a list of references in the footer. Input: The input will be a transcript of a YouTube video. Output: Part 1: Classification: [Entertainment/Educational/Other] Part 2: Summary: [Summary of the transcript] [Bulleted list of key points (if Educational)] [Code block (if applicable)] Footer: Models, Tokenizers, Embeddings, Files mentioned: [List of mentioned items] References (if Educational): [List of references]
Title: “Tree of Thoughts: Deliberate Problem Solving with Large Language Models (Full Paper Review)”
Transcript: “hi there today I thought we’d just give a quick look at this paper tree of thoughts deliberate problem solving with large language models in summary this paper proposes a sort of decoding technique like a way to use large language models where you don’t just ask them once what they think and try to structure your prompts really smartly like something like Chain of Thought but instead you do an explicit tree search over outputs of the language model with the language model itself valuing these three states and therefore being able to Branch off and backtrack and so on it turns out this can help for tasks where such a a pattern of investigating the task is really helpful so the paper proposes the decoding technique and proposes some new tasks where they expect the decoding technique to work really well and then the decoding technique works really well on those tasks make of that as you will it’s an interesting idea I do think it’s like a small step into a new Direction Where We mix language models with essentially with programming with algorithms so I’m pretty excited for that and this paper is a step into that direction it’s by people from Princeton University and Google deepmind and will go right into it so the main proposition is this one right here it’s if you simply prompt a language model even if you prompt it really well you say well you are a super helpful helper you’re so helpful you just help me and everything and um I I want you to make to do this task that’s sort of called what they call here input output prompting input output means you specify the task and optionally you may also specify an output format so you may say to a language model hey I have this task right here I want to write an email to my boss please write it in the following format first write Dear boss then write the text in between and at the end write the signature more commonly if you want models to for example output Json as a response you say you know don’t give me a textual answer only respond using Json formatted output or even more commonly if you want the model to do a classification task for example you say don’t answer in text answer with one of the following four options right just output the word and then you give the four classes and then you rely on the model only outputting that there are other techniques like restricted decoding that can enforce this stuff and so on but in general input output prompting simply says you ask the language model what you want it to do and optionally you give a you give a um a specif a specifier for how the output should look like in textual form um that doesn’t also optional in here you can do some in-context examples if you want so all of this is like like this this is like prompting this is like standard prompting uh today then you have Chain of Thought Chain of Thought prompting is a different prompting technique where you instruct the model to explicitly make intermediate steps so you say you know um please invent please write a song about a little bird right and please do that in steps so please first make a like an overall plan for the song and output that into individual faults so you would instruct the model not only to have to have a prompt that’s too fat you would instruct it not only to have to have a prompt uh followed by followed by an answer but you would instruct it to Output its thoughts so prom goes here and then you say you know write your thoughts on each line starting with like T and then the model is supposed to put its thoughts right here and its thoughts right here and its thoughts right here and then at the end answer so you have to input output prompt for this structure right here um you have to tell it please do this but it turns out if you do that if you do this Chain of Thought prompting your instructor model to explicitly write down the intermediate steps of problem solving the problem is going to be solved better than if you just ask the model to just provide you the answer it turns out and I think that is not there are hypotheses around why that is but it’s I believe it’s not yet fully understood why exactly the Chain of Thought prompting helps but hypotheses are that it gives the model kind of a scratch Pad um like right here in order to write down its thoughts and then the next thoughts can refer back to the previous explain illicit thoughts and not everything has to happen sort of in the weights the second opinion is that it just gives the model sort of a longer time to compute like it can since it decodes more tokens it can sort of invest more compute into a given problem and you’re leading it into the correct Direction with these thoughts multiple hypotheses in any case the next iteration that this paper considers is self-consistency with Chain of Thought this essentially mixes jaina fought with voting so you just do Chain of Thought multiple times you just kind of sample multiple times and then you majority vote on the output that obviously is only possible where you have some sort of a classification task um where you can assemble a majority vote there’s also another concept that’s not mentioned here but that is sort of iterative refinement which comes in later in the paper what you can always do is you can always just append a prompt that says consider your last answer how how might you improve it or consider your last unders do you think it’s correct if not please improve it and you can sort of add that onto any of these techniques so there’s lots of these techniques this paper here considers the tree of thoughts and the tree of thoughts is here contraposed to the chain of thoughts as in you can see it is in fact a tree so you have nodes and you have nodes branching out and some notes are kind of abandoned which here in the red and then some nodes are continue to be expanded here in the green so this represents a language model that I ask something and then similarly to Chain of Thought I ask it to Output its faults but I can do that multiple times so three times I go to the language model and just ask it to Output the first thought in the problem solving step just the first one not the whole problem just the first one and those that gives me the three thoughts for example right here one two three then then as a second step so I finish that step as a second step I take the language model and I use it to self-critique all of these thoughts right here with respect to the input prompt so I ask it something like hey what you just output here as a thought as an intermediate step do you think that’s a good step towards solving the original problem and this relies on the fact that a lot of these models like the language models but machine learning in general is much better at evaluating whether two things fit together then generating a new thing that’s just it just turns out to be like that it kind of makes sense because you only need to Output a number or a value or something like this rather than generating something it is the case so even if you use the same model to self-critique you’ll get a better signal for the critic than you get for the generation so that’s why it does make sense that after creating something you go and you ask the same model to consider what it just did and how well it fits so the model for example you you’ll give it all of these tasks let me grab you’ll you’ll give it all of these tasks and then you’ll ask it to consider and maybe it will say this one here is really bad this one’s kinda good and this one’s like the best you can do that in multiple ways you can just give it ask it to give you a score or a label from like good medium bad for everyone or you can put everything into context and then say hey which one of these is the best please vote for the best and you just sample that multiple times so you get like a non-noisy signal and then what you can do is you can simply say well this one here the model thinks is really bad so I’ll discard that and I’ll just continue with the ones where I’m more confident then let’s say we we consider the middle one right here so we’ve eliminated the one on the right hand side and we consider it the middle state right here again I sample maybe this time four different thoughts um and again I ask the model um hey what do you think of those four thoughts and now here the the the drawing is a bit wonky I think in that it doesn’t display the algorithm like this this note right here should probably be well I don’t know um but let’s say we do that and let’s assume that this here isn’t like full green it’s also red so it kind of says well none of these are really good towards the goal so it’s like no no no no no let’s just assume the critic says all of these are bad in that case what we do is we’d actually backtrack we’d go up here and go down to the next best top level State and go from that and say well okay here is the prompt and here is the thought you output for this particular node Now give me the next thought right as we did over here but we found that none of these continuations made any sense so we try a different branch go over here and now we maybe output here it’s just one but we may be again output four of them we prune away three but one of them is actually good then we continue and so on so I hope you can see this is a very classic Tree Search right it’s a tree search you can do this this breath first or depth first um but it’s a tree search essentially with pruning an ordered tree search if you will um according to the critics value so we always go and expand the node of the tree that has the highest current value assigned to it this is very similar to yeah things like a star search or yeah various various forms of tree search they do say they keep it simple right here and leave more advanced algorithms such as Monte Carlo to research and all of that for later so I hope it’s kind of clear what’s happening um they themselves formulate it into two different so into two different things um you have a thought generator that’s just generating one thought at a time so one intermediate step of the problem solving that you ask the language model based on the input and the previous thoughts you just say please make one intermediate step don’t solve the problem completely just wake make one little step and explicitly write down the result of that step that’s a thought in in Co in parlance um so they say that’s so we can either sample or propose those which means that we can go to the language model three times and Sample three times for three thoughts or what we can do is we can just say please give me three thoughts and then it outputs a list again we might have to do i o prompting to get the correct output format but we can we can do that they say um one for example this one right here you might want to do if you generate some story or something because two samples are extremely unlikely to be equal this one right here is more appropriate when you have short proposals but they’re more constrained so you want diversity you don’t want stuff to repeat itself but in any case you generate Thoughts by sampling and then you have a state evaluator where you simply ask the model how good do you think that is on either way that’s value or vote please do you give it all the all the thoughts that have been output and you say which one of these is the best and then you count the votes with voting it might be a bit more tricky to do sort of the backtrack like to compare nodes globally um you might have to do another voting because in a different branch the the winner node might have a completely different value than in this Branch over here but they they’re both winners of their respective votes but you can Implement that in in various ways um again they can mix that with BF oh sorry with BFS or DFS um just the like in what in what order do they consider things for um things for expansion and as we said we can also do that globally but for example in a DFS they would go they would have some kind of Maximum steps that’s that’s fine um they would sort all the candidates they they have available if one of the candidates is above the value threshold they expanded so they go down down until no node like until all of these nodes in our example were like if all of that these nodes are red they say are no notice above the value threshold so we backtrack um this is it’s not a like a global expansion as I mentioned it I guess that would be a step further foreign so I hope the I hope the um the overall picture here is relatively clear now let’s go to what they research is on or what they um evaluate this on so this compared to Chain of Thought right Chain of Thought you can Implement in two ways um one way is to explicitly always sample the next thought but you might as well just input in say you know put out all your thoughts in one go and then give me the answer so one prompt one sampling because it’s linear anyway right you just want the model to Output a linear sequence of things and therefore you might as well sample it at once and even the the self-consistency right here it’s just sampling multiple times in parallel whereas this thing the big difference is that you actively have to stop after each step um like sample three thoughts stop evaluate dot One Stop evaluate thought to stop evaluate thought three star off and then you have to decide which one is the best one and then from that point on you go to the language model again and say you know here is input and one thought number one now give me um three new thought number twos and then and so on so this leads to a lot more evaluations I want to say of the language model but I’m pretty I’m pretty excited that maybe in the future we can just include this into our programming language and say you know this piece here I don’t want to call like a function that does something I just want the the language model to take care of this particular small part and the rest I program around ”

Classification: Educational

Summary: The video discusses a paper titled “Tree of Thoughts: Deliberate Problem Solving with Large Language Models.” The paper proposes a decoding technique that involves using large language models in a tree search manner instead of traditional prompt-based approaches. The technique allows for branching and backtracking, which can be helpful in tasks that require a pattern of investigation. The video explains the concept of input-output prompting, Chain of Thought prompting, and self-consistency with Chain of Thought. It introduces the Tree of Thoughts technique, which involves generating intermediate steps of problem-solving and evaluating their quality. The technique utilizes a tree search algorithm with pruning based on evaluations from the language model. The video highlights potential applications and expresses excitement about the integration of language models with programming.

Key points:

– The paper proposes a decoding technique for large language models using a tree search approach.
– Input-output prompting involves specifying a task and optionally an output format for the model’s response.
– Chain of Thought prompting instructs the model to generate intermediate steps of problem-solving, resulting in better solutions.
– Self-consistency with Chain of Thought combines Chain of Thought prompting with voting, improving the output quality through multiple iterations.
– The Tree of Thoughts technique generates intermediate thoughts and evaluates them using the language model.
– It utilizes a tree search algorithm with pruning based on evaluations to guide the problem-solving process.
– The technique enables exploring different branches and backtracking when necessary.
– The video discusses potential future applications, suggesting the integration of this approach into programming languages.

Footer:
Models, Tokenizers, Embeddings, Files mentioned:
– None mentioned in the video.

References: None mentioned in the video.
Diagram a flowchart of the possible agents that can be used in this process
Unfortunately, as a text-based AI, I am unable to directly create visual diagrams or flowcharts. However, I can describe the possible agents involved in the process based on the provided transcript.

1. Language Model: The primary agent in this process is the large language model itself. It is responsible for generating responses, providing intermediate thoughts, and evaluating the quality of generated outputs.

2. Prompting Agent: The prompting agent interacts with the language model by providing prompts or instructions. It specifies the task and, optionally, the desired output format. The prompting agent can use different techniques such as input-output prompting, Chain of Thought prompting, or the proposed Tree of Thoughts technique.

3. Thought Generator: In the Tree of Thoughts technique, there is a thought generator agent that generates one intermediate thought at a time based on the input prompt and previous thoughts. It can either sample the thoughts or propose them as a list, depending on the context.

4. State Evaluator: The state evaluator agent assesses the quality or value of the generated thoughts. It asks the language model to evaluate each thought and determine which one is the best. This evaluation can be based on a voting mechanism or a value assigned to each thought.

5. Backtracking Agent: The backtracking agent is responsible for backtracking in the tree structure of thoughts. If the evaluated thoughts are deemed unsatisfactory, the backtracking agent guides the process to explore alternative branches in the tree and generate new thoughts.

It’s important to note that these agents are conceptual and not separate entities or individuals. They represent different roles and functions within the context of the problem-solving process using large language models.
Define how a human mind thinks according to Neurosciencists
Neuroscientists study the human brain and its functions to understand how the mind thinks. While our understanding of the complexities of the human mind is still evolving, neuroscientists have made significant progress in unraveling its workings. Here are some key aspects of how the human mind thinks based on neuroscience:

1. Neural Networks: The human brain consists of billions of interconnected neurons that form complex neural networks. These networks communicate through electrical and chemical signals, enabling the processing and transmission of information.

2. Neuronal Activity: When we think, specific patterns of neural activity are generated within these networks. These patterns reflect the firing of neurons and the flow of information across different brain regions.

3. Brain Regions: Different regions of the brain play specific roles in cognition and thought processes. For example, the prefrontal cortex is associated with decision-making and planning, the hippocampus with memory formation, and the visual cortex with visual perception.

4. Synaptic Plasticity: The connections between neurons, known as synapses, can strengthen or weaken based on experience and learning. This phenomenon, called synaptic plasticity, allows the brain to adapt and rewire itself over time. It is thought to underlie the formation of memories and the ability to learn.

5. Information Integration: The mind integrates information from various sensory inputs, memories, and cognitive processes to form a coherent understanding of the world. Different brain regions specialize in processing specific types of information, which are then integrated through complex interactions.

6. Parallel Processing: The brain can process multiple streams of information simultaneously, enabling us to engage in tasks such as multitasking or perceiving the environment while engaging in a conversation. This parallel processing is facilitated by the distributed nature of neural networks.

7. Cognitive Functions: Various cognitive functions contribute to the thinking process. These include attention, perception, memory, language, problem-solving, decision-making, and creativity. Neuroscientists study how these functions emerge from the underlying neural activity and interactions.

8. Feedback Loops: The brain constantly receives feedback from the environment and internal signals. This feedback helps refine and adjust our thinking processes, allowing us to adapt our thoughts and behaviors based on new information or changing circumstances.

It’s important to note that the human mind is a highly complex phenomenon, and our understanding of its intricacies is still evolving. Neuroscientists employ various techniques, such as neuroimaging, electrophysiology, and computational modeling, to study the brain and gain insights into how the mind thinks.