Skip to content

Persistant memory to LLMs

Aim is to study and strategize ways to implement persistent memory stores to the LLMs.

Persistant memory with Knowledge graphs:

  1. Langchain’s LLMGraphTransformer :
    • graph schema, tool calling and prompt tuning
    • Have multiple memory node for different branches ? – easy to define a graph schema
    • eg: Medicine memory node, public sector memory node, Construction, etc
  2. Neo4j Graph builder - Online tool

Persitent memory with Vector embedings:

  1. Langchain’s long term Agentic memory with LangGraph:
    • Memory component - InMemoryStore ( not clear how it is persistent memory )
    • Types of memory:
      • Semantic memory – uses to store and search factual data (persistent memory) - manage memory tool, search memory tool
      • Episodic memory - Uses human-in-the-loop to refine LLM's ability to perform well ( Few shot examples )
      • Procedure memory - allows the user to update instructions within an agent

Tasks

  • Memory pipeline-First version

    A running version of memory pipeline published on AI-Builder.image

    Neo4j rendering in AI-Runner:

    Current working solution:

    1. Flask is removed and neo4j exposed on port 8062 directly
    2. neo4j.conf server.bolt.listen_address=0.0.0.0:7687 server.http.listen_address=0.0.0.0:8062
    3. kubectl expose pod 4. DB connection - neo4j://internal_ip:nodeport
    • Streamline the process
  • Improvements on memory component:

    Various improvements made on the memory component:

    1. Knowledge graph on "Countries in Europe" - 99 nodes in total

      image.png

    2. Chat Interface - dialog box with "Process":

      image.png

      image.png

    3. Graph generation

      - Batch processing and creating properties to nodes using LLM prompting techniques

      image.png

    4. Graph retrieval

      - Primary Cypher generation based on schema

      - Fallback Cypher generation with fixed schema

      image.png

    5. Stategraph workflow enhancement

      sequence_diagram.PNG

Innovation LAB 2025

Edited by Sangamithra Panneer Selvam