Knowledge Graph - NL To Graph Query Translator
/install nl-to-graph-query-translator
Natural Language → Cypher / SPARQL Translator
Convert natural language questions into executable graph queries.
This skill translates human-readable requests into graph query languages such as Cypher (Neo4j) or SPARQL (RDF), allowing developers to interact with graph databases using natural language instead of writing complex query syntax.
Quick Start
Use Cases
Use this skill when a user wants to:
- ✅ Convert natural language questions into graph queries
- ✅ Generate Cypher queries for property graph databases
- ✅ Generate SPARQL queries for RDF triple stores
- ✅ Explore graph datasets using plain English
- ✅ Quickly prototype graph queries
Example requests:
- "Find employees who work at Acme."
- "Show all companies located in California."
- "List people connected to Alice within two hops."
- "Find products purchased by customers in London."
What This Skill Produces
The skill generates executable graph queries in supported query languages:
- 🔗 Cypher queries (Neo4j)
- 🔗 SPARQL queries (RDF triple stores)
- 📝 Query explanations
- 🎯 Query parameter templates
Translation Process
The translator follows a 5-step process to convert natural language into executable queries:
- Identify Entities — Detect entity names (people, organizations, locations)
- Identify Relationships — Extract relationship verbs (works at, located in, purchased, etc.)
- Determine Query Type — Classify request type (nodes, relationships, paths, counts, aggregations)
- Construct Query Pattern — Build graph patterns representing relationships
- Generate Query Syntax — Convert patterns into Cypher or SPARQL
For detailed information about each step, see Query Translation Strategy.
Supported Query Languages
Cypher
Used in Neo4j and other property graph databases.
Example:
MATCH (p:Person)-[:PURCHASED]->(product:Product)
RETURN p, product
📖 See Cypher Query Guide
SPARQL
Used in RDF triple stores and knowledge graphs.
Example:
SELECT ?person ?product
WHERE {
?person :purchased ?product .
}
📖 See SPARQL Query Guide
Common Patterns
Simple Entity Lookup
"Find all people named Alice"
Relationship Traversal
"Show companies where employees work"
Multi-Hop Queries
"Find people connected to Alice within two relationships"
For more patterns, see Query Patterns Reference.
Examples
Browse practical examples organized by complexity and use case:
Best Practices
When generating and executing graph queries:
✓ Use schema labels consistently
✓ Avoid overly broad relationship patterns
✓ Prefer parameterized queries for security
✓ Include LIMIT clauses for large datasets
✓ Validate query syntax before execution
See Architecture & Implementation for advanced considerations.
Advanced Topics
- 🏗️ System Architecture & Design
- 🔧 Entity Recognition Pipeline
- 🔗 Relationship Extraction
- 📚 API Reference
- ⚠️ Known Limitations & Edge Cases
Related Skills
- Graph Query Debugging Tool
- Graph Query Optimization Assistant
- Graph Template Query Generator
- Multi-Hop Reasoning Query Builder
Last Updated: 2026-03-08
Maintainer: OpenClaw Community
License: See LICENSE in repository root
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install nl-to-graph-query-translator - 安装完成后,直接呼叫该 Skill 的名称或使用
/nl-to-graph-query-translator触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Knowledge Graph - NL To Graph Query Translator 是什么?
Translate natural language questions into Cypher or SPARQL queries for graph databases and knowledge graphs. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 38 次。
如何安装 Knowledge Graph - NL To Graph Query Translator?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install nl-to-graph-query-translator」即可一键安装,无需额外配置。
Knowledge Graph - NL To Graph Query Translator 是免费的吗?
是的,Knowledge Graph - NL To Graph Query Translator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Knowledge Graph - NL To Graph Query Translator 支持哪些平台?
Knowledge Graph - NL To Graph Query Translator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Knowledge Graph - NL To Graph Query Translator?
由 Muhammad Asif(@fisa712)开发并维护,当前版本 v1.0.0。