HugeGraph is a convenient, efficient, and adaptable graph database compatible with theThis notebook shows how to use LLMs to provide a natural language interface to HugeGraph database.Apache TinkerPop3framework and theGremlinquery language. Gremlin is a graph traversal language and virtual machine developed byApache TinkerPopof theApache Software Foundation.
Setting up
You will need to have a running HugeGraph instance. You can run a local docker container by running the executing the following script:Creating HugeGraphQAChain
We can now create the HugeGraph and HugeGraphQAChain. To create the HugeGraph we simply need to pass the database object to the HugeGraph constructor.
Refresh graph schema information
If the schema of database changes, you can refresh the schema information needed to generate Gremlin statements.Querying the graph
We can now use the graph Gremlin QA chain to ask question of the graphConnect these docs to Claude, VSCode, and more via MCP for real-time answers.