forked from zovos/vk_hackathon
Add mentions to render_message for better BM25 recall
When a question references a user by name/id, sparse search now finds chunks where that user was mentioned even if not the sender. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9750868ea8
commit
965fc906f3
1 changed files with 3 additions and 0 deletions
|
|
@ -101,6 +101,9 @@ def render_message(message: Message) -> str:
|
||||||
else:
|
else:
|
||||||
parts_list.append(part_text)
|
parts_list.append(part_text)
|
||||||
|
|
||||||
|
if message.mentions:
|
||||||
|
parts_list.append(" ".join(message.mentions))
|
||||||
|
|
||||||
if message.file_snippets:
|
if message.file_snippets:
|
||||||
parts_list.append(f"[Файл]: {message.file_snippets}")
|
parts_list.append(f"[Файл]: {message.file_snippets}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue