Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

[FEATURE] 兼顾对话管理

Open dywlegend1002 opened this issue 1 year ago • 4 comments

如何在知识库检索的情况下,兼顾对话管理? 比如: 历史:关羽是三国蜀汉的第一大将。 输入:它什么时候去世的?

检索的输入应该是“关羽什么时候去世的”,而不是“它什么时候去世的”~

dywlegend1002 avatar May 16 '23 04:05 dywlegend1002

对话历史是有传入模型的,具体传入多少取决于全局变量history_len

dywlegend @.***>于2023年5月16日 周二12:01写道:

如何在知识库检索的情况下,兼顾对话管理? 比如: 历史:关羽是三国蜀汉的第一大将。 输入:它什么时候去世的?

检索的输入应该是“关羽什么时候去世的”,而不是“它什么时候去世的”~

— Reply to this email directly, view it on GitHub https://github.com/imClumsyPanda/langchain-ChatGLM/issues/374, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5ETGKKVAU42LY4ATG2DXGL3YZANCNFSM6AAAAAAYDBLNOU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

imClumsyPanda avatar May 16 '23 04:05 imClumsyPanda

我的意思不是没有加对话历史,我的意思是 当用户输入“它什么时候去世的?”,检索出来的最近结果可能是别的去世信息,而不是关羽的。 这种情况下整合的结果会有问题。

dywlegend1002 avatar May 16 '23 04:05 dywlegend1002

明白了,这样的话可能利用历史记录+当前问题重新生成问题后再匹配的解决方案更合理,只是会增加单轮对话时长,因为相当于两次经过llm处理

imClumsyPanda avatar May 16 '23 04:05 imClumsyPanda

后续会考虑加入该模式

imClumsyPanda avatar May 16 '23 04:05 imClumsyPanda

后续会考虑加入该模式

现在加入了吗

ArtificialZeng avatar Jul 17 '23 06:07 ArtificialZeng