I’m missing something. How is all of this more efficient/better than passing one step-by-step prompt and specifying all the variable and the format of the output. Can anyone please clarify that?
I think chains provide a way to integrate multiple modules which langchain provides.
chains can help to link prompt and other tools. prompt is just a way to instruct llm to do certain things or actions. and for llm to provide better results we have to integrate tools like memory with prompts that user provide. and its all about breaking down your problem into smaller steps aka abstraction so that you can manage the problem you are trying to solve in efficient way.
so rather than one big prompt, using chains to integrate modules, language model and prompts of different type is better.
i am still learning so please correct me if my interpretation is not valid.
Thank you, Saugat. You can also do that with Chain Prompting (even web search, Math, if conditions etc.). Other than the slight difference in number of tokens, it’s very unclear to me how to choose.