Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ab72f1c
feat: add more log in tree text mem retriever
CaralHsi Jul 30, 2025
d30f326
feat: add log
CaralHsi Jul 30, 2025
6b17cc8
feat: add log
CaralHsi Jul 30, 2025
cffe75c
feat: bocha search -> ai search
CaralHsi Jul 31, 2025
118ba76
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
28ada88
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
c6b4c8b
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
ce0461c
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
9610928
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
c21db8c
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
ea59de6
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
f162c40
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
4c3bb4f
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
62225ae
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
67f7c62
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
35fbfc9
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
7bc825d
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
91942a6
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
7f103b3
fix: avoid over-rewriting query and wrong reference display
endxxxx Jul 31, 2025
fd87414
fix: [WIP]bug in get_structure_optimization_candidates
CaralHsi Jul 31, 2025
74a7052
Merge branch 'feat/modify_playground' into fix/over-rewrite-query
CaralHsi Jul 31, 2025
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
12 changes: 12 additions & 0 deletions src/memos/memories/textual/tree_text_memory/retrieve/searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ def search(
context = [related_node["memory"] for related_node in related_nodes]
context = list(set(context))

# add some knowledge retrieved from internet to the context to avoid misunderstanding while parsing the task goal.
if self.internet_retriever:
supplyment_memory_items = self.internet_retriever.retrieve_from_internet(
query=query, top_k=3
)
context.extend(
[
each_supplyment_item.memory.partition("\nContent: ")[-1]
for each_supplyment_item in supplyment_memory_items
]
)

# Step 1a: Parse task structure into topic, concept, and fact levels
parsed_goal = self.task_goal_parser.parse(
task_description=query,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
2. Tags: thematic tags to help categorize and retrieve related memories.
3. Goal Type: retrieval | qa | generation
4. Rephrased instruction: Give a rephrased task instruction based on the former conversation to make it less confusing to look alone. If you think the task instruction is easy enough to understand, or there is no former conversation, set "rephrased_instruction" to an empty string.
5. Need for internet search: If you think you need to search the internet to finish the rephrased/original user task instruction, set "internet_search" to True. Otherwise, set it to False.
5. Need for internet search: If the user's task instruction only involves objective facts or can be completed without introducing external knowledge, set "internet_search" to False. Otherwise, set it to True.
6. Memories: Provide 2–5 short semantic expansions or rephrasings of the rephrased/original user task instruction. These are used for improved embedding search coverage. Each should be clear, concise, and meaningful for retrieval.

Task description:
Expand Down
2 changes: 1 addition & 1 deletion src/memos/templates/mos_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
- `memoriesID` is the specific memory ID from the available memories list

### Reference Examples
- Correct: `[1:abc123]`, `[2:def456]`, `[3:ghi789]`, `[4:jkl101]`, `[5:mno112]`
- Correct: `[1:abc123]`, `[2:def456]`, `[3:ghi789]`, `[4:jkl101][5:mno112]` (concatenate reference annotation directly while citing multiple memories)
- Incorrect: `[1:abc123,2:def456]` (do not use connected format)

## Response Guidelines
Expand Down