Natural language querying with GraphChat
GraphChat allows you to:
- Instead of writing Cypher queries, ask natural language questions about your dataset directly from the Memgraph Lab interface.
- See behind-the-scenes details, including the generated Cypher query and its results.
- Debug with ease by examining query execution and results.
Benefits
- Ease of use: Query your graph database as if you’re having a conversation.
- Transparency: View the Cypher query generated by the LLM, the JSON results and the final summarized response.
- Guided conversations: Use precise prompts to guide the LLM based on how your data is structured.
- Instant insights: Quickly extract meaningful insights from your datasets.
GraphChat with GraphRAG
The engineering flow behind GraphChat involves a seamless process that combines graph database querying with LLMs:
1. Retrieve the graph schema
GraphChat first fetches your graph schema from Memgraph to understand the data structure and relationships.
2. Send the question to the LLM
Your natural language query and the graph schema are sent to the LLM for processing.
3. Generate the Cypher query
The LLM generates a Cypher query tailored to your graph schema.
4. Run the query in Memgraph
The Cypher query is executed on Memgraph to retrieve results.
5. Summarize the results
The results (in JSON format) are sent back to the LLM, which summarizes them in natural language.
This flow enables both data aggregation and GraphRAG queries. While GraphChat currently supports straightforward queries, more complex graph traversal capabilities are under development.
For a full technical breakdown, setup instructions, and advanced usage examples, visit the GraphChat docs.