# Would it be a good strategy to train on "summarization" for creating a chat bot?

**URL:** <https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595>\
**Category:** Generative AI with Large Language Models\
**Tags:** week-module-2\
**Created:** [October 18, 2023, 4:03pm UTC](https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595 "2023-10-18T16:03:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KotaMori](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@KotaMori](https://community.deeplearning.ai/u/KotaMori)\
**Post date:** [October 18, 2023, 4:03pm UTC](https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595/1 "2023-10-18T16:03:35Z")

</div>

In this week’s example of creating a chatbot, the lecture and the lab fine-tuned the model to make a good summary for a dialog data. I wonder if this is know as a good strategy for making a chatbot. We could also train the model to generate a response given the conversation before. Is there some reason why we should not do so?

My question is if “training on summarization” is known as a better approach than “training to generate response” (and if so, why?), or it is just for one approach that has been chosen for the demonstration.

---

<div class="post-metadata">

**Author:** ![leonardo.pabon](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/leonardo.pabon/32/67180_2.png) [@leonardo.pabon](https://community.deeplearning.ai/u/leonardo.pabon)\
**Post date:** [October 19, 2023, 2:21am UTC](https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595/2 "2023-10-19T02:21:07Z")

</div>

LLMs don’t remember previous interactions by themselves. If you want to keep the context of previous messages, you must use some memory. One example is the OpenAI API, where you must send all previous conversations with the new prompt to GPT to consider the whole conversation to generate an answer.

One limit to memory is the maximum number of tokens each LLM accepts. You could summarize previous conversations and use the summary instead of all previous messages to implement a more efficient memory.

---

<div class="post-metadata">

**Author:** ![KotaMori](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@KotaMori](https://community.deeplearning.ai/u/KotaMori)\
**Post date:** [October 19, 2023, 2:25am UTC](https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595/3 "2023-10-19T02:25:27Z")

</div>

@leonardo.pabon Thank you. In that scenario, does the summarization of conversation works as an auxiliary role to generate the summarized context passed to the prompt?

---

<div class="post-metadata">

**Author:** ![leonardo.pabon](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/leonardo.pabon/32/67180_2.png) [@leonardo.pabon](https://community.deeplearning.ai/u/leonardo.pabon)\
**Post date:** [October 19, 2023, 2:28am UTC](https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595/4 "2023-10-19T02:28:44Z")

</div>

Yes. If you use Langchain to implement your chatbot, it provides a few options for memory. Some of them use summarization. It will only work if the model in use can create a good summary of the previous conversation.

---

<div class="post-metadata">

**Author:** ![KotaMori](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@KotaMori](https://community.deeplearning.ai/u/KotaMori)\
**Post date:** [October 19, 2023, 2:44am UTC](https://community.deeplearning.ai/t/would-it-be-a-good-strategy-to-train-on-summarization-for-creating-a-chat-bot/472595/5 "2023-10-19T02:44:51Z")

</div>

Thanks a lot.
