How to ask LLM generate ReAct format?
linonetwo opened this issue · 5 comments
Did you use prompt like https://github.com/hwchase17/langchain/blob/bc2ed93b77cf9c40920ca5bf96968c90bb3e322e/langchain/agents/react/textworld_prompt.py#L4-L45 to ask GPT3 to generate result in ReAct format?
Or you just create many examples, and fine tune it, so it generate it? And this only works in your fine tuned model, and not working in GPT3-4?
I'd like to know if the method in langchain actually correct and works.
In the langchain example, they prepend the [EXAMPLES]
which are examples of how to go about following the REact framework, this is basically few-shot learning based off prompt. This is purely prompt engineering and does not touch the weights of the model.
The method is correct. You can also use the examples for fine-tuning the llms if you have the resources (data + compute) and want better results as shown by the author of the paper in a few different datasets challenges.
Thank you for the confirmation!
So in your paper, you are fine-tuning, which produces better output but needs a long manual data preparation period. And while fine-tuning save some token when calling API, it also increases each API call's cost. So each has pros and cons.
I will use few-shot prompt engineering as a start, and collect data for fine-tuning.
I think the data collected for fine-tuning in this paper does not really require to take very long since the author just mention that they prompted the larger language models for the data, it is basically knowledge distillation.
hi @linonetwo , is there a followup question?
I was confused about why it could do this. But I read more materials these days and I know even OpenAI doesn't know why there is the emergence.