MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / __init__

Method __init__

methods/lightmem_agent.py:28–63  ·  view source on GitHub ↗
(
        self,
        llm_client: BaseLLMClient,
        model: str,
        temperature: float = 0.1,
        max_tokens: int = 2000,
        top_p: float = 0.1,
    )

Source from the content-addressed store, hash-verified

26LOCOMO_ANSWER_PROMPT = """You are an intelligent memory assistant tasked with retrieving accurate information from conversation memories.
27
28# CONTEXT:
29You have access to memories from two speakers in a conversation. These memories contain
30timestamped information that may be relevant to answering the question.
31
32# INSTRUCTIONS:
331. Carefully analyze all provided memories from both speakers
342. Pay special attention to the timestamps to determine the answer
353. If the question asks about a specific event or fact, look for direct evidence in the memories
364. If the memories contain contradictory information, prioritize the most recent memory
375. If there is a question about time references (like "last year", "two months ago", etc.),
38 calculate the actual date based on the memory timestamp. For example, if a memory from
39 4 May 2022 mentions "went to India last year," then the trip occurred in 2021.
406. Always convert relative time references to specific dates, months, or years. For example,
41 convert "last year" to "2022" or "two months ago" to "March 2023" based on the memory
42 timestamp. Ignore the reference while answering the question.
437. Focus only on the content of the memories from both speakers. Do not confuse character
44 names mentioned in memories with the actual users who created those memories.
458. The answer should be less than 5-6 words.
46
47# APPROACH (Think step by step):
481. First, examine all memories that contain information related to the question
492. Examine the timestamps and content of these memories carefully
503. Look for explicit mentions of dates, times, locations, or events that answer the question
514. If the answer requires calculation (e.g., converting relative time references), show your work
525. Formulate a precise, concise answer based solely on the evidence in the memories
536. Double-check that your answer directly addresses the question asked
547. Ensure your final answer is specific and avoids vague time references
55
56Memories for user {speaker_1_name}:
57
58{speaker_1_memories}
59
60Memories for user {speaker_2_name}:
61
62{speaker_2_memories}
63
64Question: {question}
65
66Answer:"""

Callers

nothing calls this directly

Calls 3

ConfigProxyClass · 0.85
resolveMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected