MCPcopy Create free account
hub / github.com/MemTensor/MemOS / example_complex_shared_db

Function example_complex_shared_db

examples/basic_modules/neo4j_example.py:536–567  ·  view source on GitHub ↗
(db_name: str = "shared-traval-group-complex", community=False)

Source from the content-addressed store, hash-verified

534
535
536def example_complex_shared_db(db_name: str = "shared-traval-group-complex", community=False):
537 # User 1: Alice explores structured memory for LLMs
538 run_user_session(
539 user_name="alice",
540 db_name=db_name,
541 topic_text="Alice studies structured memory and long-term memory optimization in LLMs.",
542 concept_texts=[
543 "Short-term memory can be simulated using WorkingMemory blocks.",
544 "A structured memory graph improves retrieval precision for agents.",
545 ],
546 fact_texts=[
547 "Embedding search is used to find semantically similar memory items.",
548 "User memories are stored as node-edge structures that support hierarchical reasoning.",
549 ],
550 community=community,
551 )
552
553 # User 2: Bob focuses on GNN-based reasoning
554 run_user_session(
555 user_name="bob",
556 db_name=db_name,
557 topic_text="Bob investigates how graph neural networks can support knowledge reasoning.",
558 concept_texts=[
559 "GNNs can learn high-order relations among entities.",
560 "Attention mechanisms in graphs improve inference precision.",
561 ],
562 fact_texts=[
563 "GAT outperforms GCN in graph classification tasks.",
564 "Multi-hop reasoning helps answer complex queries.",
565 ],
566 community=community,
567 )
568
569
570def example_complex_shared_db_search_filter(db):

Callers 1

neo4j_example.pyFile · 0.85

Calls 1

run_user_sessionFunction · 0.85

Tested by

no test coverage detected