Persistant memory to LLMs
Aim is to study and strategize ways to implement persistent memory stores to the LLMs.
Persistant memory with Knowledge graphs:
- 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
- Neo4j Graph builder - Online tool
Persitent memory with Vector embedings:
- 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.
Neo4j rendering in AI-Runner:
Current working solution:
- Flask is removed and neo4j exposed on port 8062 directly
- neo4j.conf server.bolt.listen_address=0.0.0.0:7687 server.http.listen_address=0.0.0.0:8062
- kubectl expose pod 4. DB connection - neo4j://internal_ip:nodeport
- Streamline the process
-
Improvements on memory component:
Various improvements made on the memory component:
-
Knowledge graph on "Countries in Europe" - 99 nodes in total
-
Chat Interface - dialog box with "Process":
-
Graph generation
- Batch processing and creating properties to nodes using LLM prompting techniques
-
Graph retrieval
- Primary Cypher generation based on schema
- Fallback Cypher generation with fixed schema
-
Stategraph workflow enhancement
- https://medium.com/data-science/building-knowledge-graphs-with-llm-graph-transformer-a91045c49b59
- https://learn.deeplearning.ai/courses/long-term-agentic-memory-with-langgraph/lesson/a0k5a/baseline-email-assistant
- https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/
- https://github.com/neo4j-labs/llm-graph-builder
-