Implementation:24kchengYe MemoMind Link Expansion Retrieval Standalone
| Knowledge Sources | |
|---|---|
| Domains | Search, Graph_Retrieval |
| Last Updated | 2026-10-28 00:00 GMT |
Overview
Standalone copy of link expansion graph retrieval at the engine root level — patchable version that overrides the pip-installed module during installation.
Description
The engine/link_expansion_retrieval.py module is identical to `engine/hindsight_api/engine/search/link_expansion_retrieval.py` — it expands from semantic/temporal seeds through entity, semantic, and causal links. This standalone copy exists as part of the patches system, allowing MemoMind to override specific hindsight engine files without forking the entire package. The patch applier copies this file over the pip-installed version during installation.
Usage
Not imported directly — the patch system copies this file to override the installed version. The module provides link expansion graph retrieval for the recall pipeline.
Code Reference
Source Location
- Repository: MemoMind
- File: engine/link_expansion_retrieval.py
- Lines: L1-501
Signature
# Identical to engine/hindsight_api/engine/search/link_expansion_retrieval.py
# Expands from semantic/temporal seeds through entity, semantic, and causal links
async def link_expansion_retrieval(
pool,
query_embedding: list[float],
bank_id: str,
schema: str | None = None,
...
) -> list[dict]: ...
Import
# Not imported directly — overrides the installed version via patch system
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| query_embedding | list[float] | Yes | Query embedding vector |
| bank_id | str | Yes | Memory bank ID |
| schema | str | No | Schema for multi-tenancy |
Outputs
| Name | Type | Description |
|---|---|---|
| returns | list[dict] | Expanded retrieval results from graph traversal |
Usage Examples
Patched Link Expansion
# This file is applied as a patch:
python patch_hindsight.py
# Copies engine/link_expansion_retrieval.py → overrides installed version
Related Pages
Implements Principle
- Principle:24kchengYe_MemoMind_Hybrid_Retrieval
- Principle:24kchengYe_MemoMind_Patch_Based_Customization