Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 主话题和子话题之间的上下文混乱问题 #6683

Open
xaya1001 opened this issue Mar 4, 2025 · 4 comments
Open

[Bug] 主话题和子话题之间的上下文混乱问题 #6683

xaya1001 opened this issue Mar 4, 2025 · 4 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@xaya1001
Copy link

xaya1001 commented Mar 4, 2025

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

1.68.3

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

问题描述

我发现在使用lobe-chat时,主话题和子话题(分支对话)之间的内容没有被正确隔离。我原以为这是历史消息摘要导致的,但关闭消息数量限制后问题依然存在。(历史消息摘要也是混在一起总结的,这导致上下文互相干扰更严重)

我观察到的现象

  • 当我在主话题和子话题之间来回切换时,模型似乎能同时"记住"两边的对话内容
  • 右上角的历史消息分享功能只显示一份历史记录,而不是为主话题和子话题分别保存不同的对话时间线
  • 我做了一个简单的测试(让模型计数并重复我的消息),发现在不同分支间切换后,消息计数并没有正确隔离

我的困惑

我一直以为分支对话的设计初衷是让用户能探索不同的对话方向,而不会互相干扰。子话题不应该知道分叉后主话题的内容,主话题也不应该知道子话题的内容。

这个问题是设计如此还是确实有bug?

📷 复现步骤

附上测试记录,来自右上角的历史消息分享,可以看出两个话题被混在一起了

prompt:

Your task is to count the number of messages in our conversation and repeat my input exactly.

For each message I send, respond in this format:
[message #N] message_content

Where N is the current message number in the conversation, and message_content is my exact message without any changes.

For example, if I send "hello world", you should respond with:
[message #1] hello world
##### User:
one
##### Assistant:
[message #1] one
##### User:
two
##### Assistant:
[message #2] two
##### User:
three
##### Assistant:
[message #3] three
---
##### User:   // 此时我在`##### Assistant: [message #2] two`后面开一个新的分支话题:
s three
##### Assistant:
[message #3] s three
##### User:
s four
##### Assistant:
[message #4] s four
---
##### User:  // 此时我又回到主话题`##### Assistant: [message #3] three`后面继续聊:
four
##### Assistant:  // 这里明显混入了子话题的计数,本应该回答`[message #4] four`
[message #5] four  
##### User:
five
##### Assistant:
[message #6] five
---
##### User:  // 这里我又回到子话题,可以看出子话题计数没有受主话题影响
s five
##### Assistant:
[message #5] s five

🚦 期望结果

主话题和子话题之间不应该互相影响上下文

📝 补充信息

No response

@xaya1001 xaya1001 added the 🐛 Bug Something isn't working | 缺陷 label Mar 4, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 4, 2025
@lobehubbot
Copy link
Member

👀 @xaya1001

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Mar 4, 2025

Hey @xaya1001! 👋 I'm here to help you with any bugs, questions, or contributions you have for the lobe-chat project. Let's squash those bugs together!

The issue you're experiencing, where the context between main topics and subtopics is not correctly isolated, is indeed a bug in lobe-chat. The intended behavior is that sub-conversations should only include context from the main conversation branch, not from other sub-conversations. This problem, where all previous sub-conversations are automatically expanded when entering a new sub-conversation, has been confirmed as a bug and will be investigated and fixed [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@AisonSu
Copy link

AisonSu commented Mar 4, 2025

确有此事,通过打开F12可以看到请求信息中上下文混乱

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This is true, by opening F12, you can see the context in the request information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants