neo4j-genai-plugin-skill
可直接在数据库内生成嵌入和结构化输出,方便构建 GraphRAG
可能调用外部 LLM 服务并产生计费或数据外泄风险
在 Cypher 中使用 Neo4j GenAI 插件进行嵌入、补全与批量注入
在 Cypher 里直接生成向量、补全或结构化输出,能用 ai.text.embed()/embedBatch()/completion()/chat() 等函数把 LLM 能力塞进查询里。适合做纯 Cypher 的 GraphRAG、在图内为节点注入嵌入或从提示中抽取 JSON map,免去外部 Python。支持 OpenAI、Azure、Vertex AI、Amazon Bedrock 等 provider,要求 CYPHER 25,替代旧的 genai.vector.encode()。
▸ 展开 SKILL.md 英文原文
Use Neo4j GenAI Plugin ai.text.* functions and procedures for in-Cypher embedding generation, text completion, structured output, chat, tokenization, and batch ingestion. Covers ai.text.embed(), ai.text.embedBatch(), ai.text.completion(), ai.text.structuredCompletion(), ai.text.aggregateCompletion(), ai.text.chat(), ai.text.tokenCount(), ai.text.chunkByTokenLimit(), and provider configuration for OpenAI, Azure OpenAI, VertexAI, and Amazon Bedrock. Requires CYPHER 25. Replaces deprecated genai.vector.encode(). Use when writing pure-Cypher GraphRAG, embedding nodes in-graph, generating structured maps from prompts, or calling LLMs inside Cypher queries. Does NOT handle neo4j-graphrag Python library pipelines — use neo4j-graphrag-skill. Does NOT handle vector index creation/search — use neo4j-vector-index-skill.
帮我安装这个 skill:https://raw.githubusercontent.com/neo4j-contrib/neo4j-skills/main/neo4j-genai-plugin-skill/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/neo4j-contrib/neo4j-skills/main/neo4j-genai-plugin-skill/SKILL.md"## When to Use - Generating embeddings inside Cypher without external Python (`ai.text.embed()`) - Batch-embedding nodes/chunks during ingestion (`ai.text.embedBatch()`) - Calling LLMs directly in Cypher for completions or GraphRAG (`ai.text.completion()`) - Extracting structured JSON maps from LLM inside Cypher (`ai.text.structuredCompletion()`) - Aggregating LLM summaries over grouped rows (`ai.text.aggregateCompletion()`) - Stateful chat sessions in Cypher (`ai.text.chat()`) - Counting tokens or chunking text by token limit (`ai.text.tokenCount()`, `ai.text.chunkByTokenLimit()`) ## When NOT to Use - **Python-based GraphRAG pipelines** (VectorCypherRetriever, HybridCypherRetriever) → `neo