VertexAiRagMemoryService drops distinct events that share a timestamp
維護者通常 3 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
search_memory loses distinct events from separate retrieved chunks of the same session when their timestamps match. _merge_event_lists uses timestamps for deduplication, although uploaded transcript lines also store author and text.
Expected: both the question and the answer containing ORCHID are returned, in order. Actual on upstream/main: only the question is returned. Exact copies from overlapping chunks should still appear once.
Offline reproduction (mocked RAG listing and retrieval; no credentials, model, or cloud service).
The final assertion fails on main:
import asyncio
import json
from types import SimpleNamespace as NS
from unittest.mock import AsyncMock, patch
from google.adk.memory.vertex_ai_rag_memory_service import VertexAiRagMemoryService
async def main():
service = VertexAiRagMemoryService(rag_corpus="corpus")
events = [("user", "What is the launch code?"),
("model", "The launch code is ORCHID.")]
contexts = [NS(source_display_name="demo.alice.session", text=json.dumps({
"author": author, "timestamp": 1700000000.0, "text": text,
})) for author, text in events]
client = NS(rag=NS(
list_files=AsyncMock(side_effect=PermissionError("offline")),
retrieve_contexts=AsyncMock(return_value=NS(contexts=NS(contexts=contexts))),
))
with patch("agentplatform.Client", return_value=NS(aio=client)):
response = await service.search_memory(
app_name="demo", user_id="alice", query="launch code")
actual = [(m.author, m.content.parts[0].text) for m in response.memories]
print(actual)
assert actual == events
asyncio.run(main())
Environment: ADK main (2.14.1), Python 3.11.17. Regression introduction unknown. Deterministic offline case.
Suggested fix: retain timestamp-based overlap grouping and stable ordering, but deduplicate using (timestamp, author, text). Parsed Event IDs are regenerated and cannot identify overlapping copies.
- 主要語言
- Python
- 星號
- 22.3k
- 分支
- 4.4k
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 6
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
google/adk-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
google/adk-python#8360 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
google/adk-python#8359 ·
維護者通常 3 天內回覆
-
Can pin to litellm version be changed?可能已有人在做 @llalitkumarrr 於 10 天前認領。 未關閉models
難度 1/5 1 小時以內 新手友好度 65/100
google/adk-python#8129 · 2 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
OpenAPI tools ignore operation- and path-level server overrides可能已有人在做 @sanketpatil06 於 14 天前認領。 未關閉tools
難度 2/5 1-3 小時 新手友好度 75/100
google/adk-python#8064 · 4 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
Two docstrings in openapi_tool document parameters the signatures do not accept可能已有人在做 @surajksharma07 於 17 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
google/adk-python#8024 · 1 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
查看 google/adk-python 的全部 Issue
相似的 Issue
-
🧫10장-투향
難度 2/5 1-3 小時 新手友好度 65/100
hyunjimoon/golden-cage-book#188 ·
-
agent/scanner bug stage/010-actionable
難度 1/5 1 小時以內 新手友好度 88/100
torch-spyre/spyre-inference#1812 ·
維護者通常 1 天內回覆
-
Bug: fenced drafts inside <think> tags break parsing or are returned instead of the answer可能已有人在做 @aad1tyaaaaa 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
google/langextract#639 ·
維護者通常 1 天內回覆
-
[oblt-aw][autodoc] Update autodoc routing docs for relative in-repo lock uses可能已有人在做 @github-actions 今天認領。 未關閉
難度 1/5 1-3 小時 新手友好度 87/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆