Azure Cosmos DB for Apache Gremlin is a graph database service that can be used to store massive graphs with billions of vertices and edges. You can query the graphs with millisecond latency and evolve the graph structure easily. Gremlin is a graph traversal language and virtual machine developed byThis notebook shows how to use LLMs to provide a natural language interface to a graph database you can query with theApache TinkerPopof theApache Software Foundation.
Gremlin query language.
Setting up
Install a library:/type as a partition key.
Seeding the database
Assuming your database is empty, you can populate it using the GraphDocuments For Gremlin, always add property called ‘label’ for each Node. If no label is set, Node.type is used as a label. For cosmos using natural id’s make sense, as they are visible in the graph explorer.Refresh graph schema information
If the schema of database changes (after updates), you can refresh the schema information.Querying the graph
We can now use the gremlin QA chain to ask question of the graphConnect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.