MCPcopy Create free account
hub / github.com/bigdata-ustc/Agent4Edu / retrieve_long

Method retrieve_long

Code/memory.py:39–50  ·  view source on GitHub ↗
(self, current_concept: str | None = None, time_step: int = 1)

Source from the content-addressed store, hash-verified

37 return self.short
38
39 def retrieve_long(self, current_concept: str | None = None, time_step: int = 1) -> dict[str, Any]:
40 concepts = list(self.long["practiced_knowledge"])
41 if current_concept:
42 concepts.append(normalize_concept(current_concept))
43 kp = self._proficiency_context(concepts, time_step)
44 self.long["knowledge_proficiency"] = kp
45 return {
46 "significant_facts": self.long["significant_facts"],
47 "learning_status": self.long["learning_status"],
48 "knowledge_proficiency": kp,
49 "practiced_knowledge": self.long["practiced_knowledge"],
50 }
51
52 def _proficiency_context(self, concepts: list[str], time_step: int) -> list[dict[str, Any]]:
53 seen: set[str] = set()

Callers 1

simulate_practiceMethod · 0.80

Calls 2

_proficiency_contextMethod · 0.95
normalize_conceptFunction · 0.90

Tested by

no test coverage detected