Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/everalgo-user-memory/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ follows [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- `ProfileExtractor` now threads the target `sender_id` into the INIT and UPDATE prompts as `{target_user}`, and those prompts attribute each fact to the speaker who stated it. Previously the extraction prompts never received the target id, so in any multi-speaker slice — including an ordinary user↔assistant exchange — the model could attribute another participant's statements, or the assistant's own persona, to the profile owner. This applies to the active extraction paths the same target-aware attribution already encoded in the (until now unused) `TEAM_PROFILE_UPDATE_PROMPT`. Backward compatible: a caller-supplied `prompt=` override that omits `{target_user}` renders unchanged.

## [0.3.1] - 2026-06-24

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ async def _init_extract(
prompt: str | None,
) -> Profile:
conversation_text = _render_conversation(memcells)
rendered = render_prompt(PROFILE_INITIAL_EXTRACTION_PROMPT, prompt, conversation_text=conversation_text)
rendered = render_prompt(
PROFILE_INITIAL_EXTRACTION_PROMPT,
prompt,
conversation_text=conversation_text,
target_user=sender_id,
)

data = await _call_llm_for_profile_init(self._llm, rendered)
explicit_info = data["explicit_info"]
Expand Down Expand Up @@ -127,6 +132,7 @@ async def _update_extract(
prompt,
current_profile=current_profile_text,
conversations=conversation_text,
target_user=sender_id,
)

data = await _call_llm_for_profile_update(self._llm, rendered)
Expand Down Expand Up @@ -247,7 +253,7 @@ def _render_conversation(memcells: Sequence[MemCell]) -> str:
continue
speaker = m.sender_name or m.sender_id
user_id = m.sender_id or ""
time_str = format_message_timestamp(m.timestamp)
time_str = format_message_timestamp(m.timestamp)[:10] # 粗化到日期:去秒级噪声、回避 UTC 时区误读(画像抽取无需日内精度)
lines.append(f"[{time_str}] {speaker}(user_id:{user_id}): {text}")
if not lines:
lines.append("(no prior MemCells in the cluster)")
Expand Down
Loading