Skip to content
Open
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
1 change: 0 additions & 1 deletion demo/utils/simple_memory_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ async def search(
- "keyword": Keyword retrieval (BM25)
- "vector": Vector retrieval
- "hybrid": Keyword + Vector + Rerank
- "rrf": Keyword + Vector + RRF fusion
- "agentic": LLM-guided multi-round retrieval
show_details: Whether to show detailed information (default: True)

Expand Down
2 changes: 1 addition & 1 deletion src/biz_layer/mem_db_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _convert_timestamp_to_time(
try:
dt = from_iso_format(timestamp)
return to_iso_format(dt)
except:
except Exception:
# If parsing fails, return string directly
return timestamp
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def create_and_save_episodic_memory(
metadata_json = metadata
try:
metadata_dict = json.loads(metadata)
except:
except Exception:
metadata_dict = {}

# Prepare entity data
Expand Down
14 changes: 10 additions & 4 deletions src/memory_layer/prompts/en/episode_mem_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
- When the conversation mentions relative times (e.g., "yesterday", "last week"), preserve both the original relative expression AND calculate the absolute date
- Format time references as: "original relative time (absolute date)" - e.g., "last week (May 7, 2023)"
- This dual format supports both absolute and relative time-based questions
- ALWAYS use ISO 8601 format for timestamps: "YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS+HH:MM"
- Example: "2026-01-23T02:19:25Z" or "2026-01-23T10:07:00+08:00"
- DO NOT use Chinese characters, weekdays, "AM/PM", "UTC", or any non-standard format
- All absolute time calculations should be based on the provided start time

Please generate a structured episodic memory and return only a JSON object containing the following two fields:
Expand Down Expand Up @@ -63,10 +66,10 @@


Example:
If the conversation start time is "March 14, 2024 (Thursday) at 3:00 PM UTC" and the conversation is about Caroline planning to go hiking:
If the conversation start time is "2024-03-14T15:00:00Z" and the conversation is about Caroline planning to go hiking:
{{
"title": "Caroline's Mount Rainier Hiking Plan March 14, 2024: Weekend Adventure Planning Session",
"content": "On March 14, 2024 at 3:00 PM UTC, Caroline expressed interest in hiking this weekend (March 16-17, 2024) and sought advice. She wanted to see the sunrise at Mount Rainier. When asked about gear by Melanie, Caroline received suggestions: hiking boots, warm clothing, flashlight, water, and high-energy food. Caroline decided to leave early Saturday morning (March 16, 2024) to catch the sunrise and planned to invite friends. She was excited about the trip."
"content": "On March 14, 2024 at 3:00 PM UTC, Caroline expressed interest in hiking this weekend (2024-03-16 to 2024-03-17) and sought advice. She wanted to see the sunrise at Mount Rainier. When asked about gear by Melanie, Caroline received suggestions: hiking boots, warm clothing, flashlight, water, and high-energy food. Caroline decided to leave early Saturday morning (2024-03-16T06:00:00Z) to catch the sunrise and planned to invite friends. She was excited about the trip."
}}

Return only the JSON object, do not add any other text:
Expand All @@ -87,6 +90,9 @@
- When the conversation mentions relative times (e.g., "yesterday", "last week"), preserve both the original relative expression AND calculate the absolute date
- Format time references as: "original relative time (absolute date)" - e.g., "last week (May 7, 2023)"
- This dual format supports both absolute and relative time-based questions
- ALWAYS use ISO 8601 format for timestamps: "YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS+HH:MM"
- Example: "2026-01-23T02:19:25Z" or "2026-01-23T10:07:00+08:00"
- DO NOT use Chinese characters, weekdays, "AM/PM", "UTC", or any non-standard format
- All absolute time calculations should be based on the provided start time

Please generate a structured episodic memory and return only a JSON object containing the following two fields:
Expand Down Expand Up @@ -128,10 +134,10 @@


Example:
If the conversation start time is "March 14, 2024 (Thursday) at 3:00 PM UTC" and the conversation is about Caroline planning to go hiking:
If the conversation start time is "2024-03-14T15:00:00Z" and the conversation is about Caroline planning to go hiking:
{{
"title": "Caroline's Mount Rainier Hiking Plan March 14, 2024: Weekend Adventure Planning Session",
"content": "On March 14, 2024 at 3:00 PM UTC, Caroline expressed interest in hiking this weekend (March 16-17, 2024) and sought advice. She wanted to see the sunrise at Mount Rainier. When asked about gear by Melanie, Caroline received suggestions: hiking boots, warm clothing, flashlight, water, and high-energy food. Caroline decided to leave early Saturday morning (March 16, 2024) to catch the sunrise and planned to invite friends. She was excited about the trip."
"content": "On March 14, 2024 at 3:00 PM UTC, Caroline expressed interest in hiking this weekend (2024-03-16 to 2024-03-17) and sought advice. She wanted to see the sunrise at Mount Rainier. When asked about gear by Melanie, Caroline received suggestions: hiking boots, warm clothing, flashlight, water, and high-energy food. Caroline decided to leave early Saturday morning (2024-03-16T06:00:00Z) to catch the sunrise and planned to invite friends. She was excited about the trip."
}}

Return only the JSON object, do not add any other text:
Expand Down