neo4j-genai-plugin-skill

Generate embeddings and LLM outputs inside Neo4j Cypher queries.

101|35|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-genai-plugin-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neo4j-genai-plugin-skill
Source: https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-genai-plugin-skill
Command: npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-genai-plugin-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It eliminates the need to leave Neo4j to embed text, generate answers, or produce structured JSON by calling LLM providers directly from Cypher with the GenAI Plugin ai.text.* functions.

Core Features & Use Cases

  • In-Cypher Embeddings & Batch Ingestion: Generate vector embeddings with ai.text.embed() and ai.text.embedBatch() for storing vectors on nodes during ingestion.
  • Completion, Chat, and Aggregation: Produce unstructured text with ai.text.completion() and ai.text.aggregateCompletion(), and run stateful chat via ai.text.chat() (OpenAI / Azure).
  • Structured Output with JSON Schema: Validate and return schema-constrained JSON maps using ai.text.structuredCompletion() and aggregate structured results with ai.text.aggregateStructuredCompletion().

Quick Start

Run a Cypher query using the required CYPHER 25 prefix to call ai.text.embed() (or ai.text.completion()) for your selected provider while passing your API token and model via parameters.

Frequently Asked Questions about neo4j-genai-plugin-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate vector embeddings directly inside a Cypher query?

To generate vector embeddings inside a Cypher query, use the `ai.text.embed()` function. This enables direct embedding generation and batch ingestion on nodes during data ingestion without leaving Neo4j.

Can I get structured JSON output from an LLM within Neo4j?

Yes, you can get structured JSON output from an LLM within Neo4j using `ai.text.structuredCompletion()`. It validates and returns schema-constrained JSON maps directly in your query results.

Do I need a specific Neo4j version to call LLM functions from Cypher?

Yes, calling LLM functions from Cypher requires Neo4j 2025.12 or later with the GenAI Plugin enabled. Queries must also use the CYPHER 25 syntax via a per-query prefix or an ALTER DATABASE default.

What is the best way to build a pure-Cypher GraphRAG pipeline?

The best way to build a pure-Cypher GraphRAG pipeline is using the GenAI Plugin's `ai.text.*` functions. It supports embedding generation, text completion, stateful chat, and token-based chunking entirely within your database workflows.

How do I configure LLM providers when using ai.text functions in Neo4j?

You configure LLM providers in Neo4j by passing parameterized provider configuration maps to the `ai.text.*` functions. Use lowercase provider identifiers and include your API token and model via query parameters.

Does Neo4j support stateful chat completions with OpenAI or Azure?

Yes, Neo4j supports stateful chat completions with OpenAI or Azure using the `ai.text.chat()` function. This allows for conversational LLM interactions directly within your database queries.