Skip to content

Research: RAG beside MemNet (graph retrieve-then-generate vs HostSearchBridge) #77

Description

@chouswei

Kind: research (not a ship request). No rag_query on memnet-mcp. No embeddings in the engine until this issue concludes otherwise.

Doctrine already on the tree: MN-REQ-00 — MemNet is working memory, not the search corpus. Design nest HostSearchBridge (ImportGuard-shaped, outside MemNetSystem): docs/grammar/memnet-host-search-nest.md · draft #75.

External references

  1. Adding RAG to your GraphQL API — Adam Cowley, Neo4j Developer Blog (28 Apr 2024). Companion repo: adam-cowley/neo4j-graphql-genai. Note 1 (issue body): retrieve-then-generate on the GraphQL API.
  2. RAGFlow (InfiniFlow) — open-source RAG + agent context engine. Note 2: sibling MCP ragflow_retrieval returns chunks.
  3. 10 best RAG tools and platforms (2026) — Meilisearch roundup. Note 3: taxonomy of the retrieve hop (search engines, orchestrators, vector DBs). Not a MemNet feature list.
  4. HiGram (Yue et al., arXiv 2608.05095, Aug 2026) + GAM / EvoMemKG / MemORAI + ISO GQL Cor 1:2026. Note 21: hierarchical graph memory is view/depth, not Layer; path-local rewrite, not generate.

1. Neo4j GraphQL RAG

What that post actually does (steal the questions, not the stack):

Their move What it is
Weaviate-style generate(prompt) on a collection Retrieved records are stuffed into an LLM prompt
@neo4j/graphql @customResolver on Movie / Actor LLM runs inside the GraphQL API after the graph query
LangChain PromptTemplate + ChatOpenAI Generation is a resolver, not a second database
generateReview(stars) vs generic generate(prompt) Restricted vs open prompt on the same retrieve
GraphQL where then generate Retrieve (graph) then generate — classic RAG, graph as the retriever

That is RAG as a field on the query API. Useful contrast for MemNet: we already rejected the isomorphic footgun (pin_map.generate(prompt) / rag_query on generic MCP). The post is still a clean worked example of retrieve-then-generate with a graph as the retrieve step (not a vector index).

Further reading on the same site (not this issue’s SSOT): GraphRAG study, constant-cost semantic memory.

MemNet mapping (research questions)

Answer these before any engine/MCP work:

  1. Retrieve vs generate vs memory. Their generate is prose out of retrieved nodes. MemNet goldfish is shaped GQL subgraph in. Where (if anywhere) may a host emit generated prose — never on pin_map?
  2. Graph as retriever vs vector as retriever. Neo4j where + neighbourhood vs HostRagAdapter (Cursor index / docs MCP / embeddings / RAGFlow / Meilisearch-class hybrid search). When is Path-B ingest + pin_map / leftover #73 BoundedMatchFind enough, and when is a host corpus probe required?
  3. Resolver vs nest. Their custom resolver sits on the graph API. Our RagHostHook sits beside MutateGate. RAGFlow MCP / LangChain retriever are sibling tools. Is a Weaviate-style generate ever allowed on MemNet, or is that permanently host-only?
  4. Prompt on the wire. Open $prompt on every type (their CanGenerate) vs closed RagDecision (propose / none / skip + locators only). Token budget and MN-REQ-11.13 (no corpus dump).
  5. LangChain / GraphQL-as-tool. LangChain can call a GraphQL API as a tool (LLM outside). The Neo4j post puts the LLM inside. RAGFlow MCP and the Meilisearch list are LLM-outside. MemNet teach is GQL pin_map/mutate, not GraphQL. Do not dual-teach GraphQL or LangChain as agent wire (ADR-001).
  6. Durable cabinet. If M2.5 AgensGraph later grows vector/FTS, keep it behind sessions (hydrate budget) — not LLM↔store RAG as goldfish. Do not vendor ES/Infinity/RAGFlow/Meilisearch/Pinecone as MemNet cabinet. MongoDB “vectors in the primary DB” is the same temptation.

Out of scope for this issue

  • Shipping HostRagAdapter or rag_query.
  • Nesting HostSearchBridge / EvidenceCentre / RAGFlow under MemNetSystem.
  • Storing chunk bodies or embeddings on NODE properties as the memory surface.
  • Treating #75 design docs as implemented.
  • Vendor InfiniFlow RAGFlow, Meilisearch, Pinecone, or LangChain in this repo.

Done when

A short research note records steal / reject / defer for each question across all references, with an explicit MUST NOT list for agent teach. No code required to close.

  • Neo4j: issue body (note 1)
  • RAGFlow: note 2
  • Meilisearch list: note 3
  • 2026 graph-memory + GQL Cor 1: note 21

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions