Create Graph Visualizations for GraphRAG

XMLWordPrintableJSON

    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      MongoDBGraphStore is a knowledge graph of entities (nodes) and their relationships (edges), both of which contain rich additional metadata / attributes. The value of being able to interact with this graph visually should go without saying, but for those that have not familiar, notebooks and html pages provide widgets where one can pan, zoom, and scroll, where one can not just apply labels, but also easily show metadata with hover tools.

      The LLM's ability to extract and make connections is incredible, but it is also buggy. An interactive plot would be great for debugging, especially as the API to the store itself allows one to adjust LLM prompts and place constraints on the entities and relationships.

      What I suggest is using holoviews.Graph.. A look at that link will give one a sense of what is possible, and its flexibility and simplicity. In notebooks, it will output a widget. They can also render in html, and static images can be saved in formats like png.

      Definition of Done*

      • Create an extra to add holoviews dependency, i.e.  langchain_mongo[viz]
      • Write code to traverse the MongoDBGraphStore (a collection) and produce the holoviews.Graph
      • Expose as a method on the GraphStore
      • Let Product Marketing / DevRel know once you've got it working to help come up with attractive, sensible defaults.

      Pitfalls

      • It will likely attract attention and further work in this space.

              Assignee:
              Unassigned
              Reporter:
              Casey Clements
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: