# pfrezendehs's knowledge hub — full text
Canonical hub URL: https://memory.wiki/hub/pratofeito
Index-only manifest: https://memory.wiki/hub/pratofeito/llms.txt
Concept digest: https://memory.wiki/raw/hub/pratofeito?digest=1&compact=1
# Knowledge graph
_Pre-computed structure across this hub: 40 concepts, 30 relations, 0 bundles with AI analysis. Use this as navigation; the doc bodies below contain the prose._
## Concepts
- **Neo4j** _(entity • weight 134 • 12 docs)_
Graph database platform that serves as the storage and retrieval foundation for knowledge graphs and hybrid search.
- **GraphRAG** _(concept • weight 100 • 8 docs)_
Retrieval-augmented generation pattern that uses knowledge graphs to provide contextual information for LLM responses.
- **Knowledge Graph** _(concept • weight 88 • 7 docs)_
Structured representation of entities and relationships extracted from unstructured data for contextual retrieval.
- **Hybrid Search** _(concept • weight 88 • 8 docs)_
Multi-signal retrieval combining lexical, semantic, and structural search to improve result quality and coverage.
- **Graph Database** _(entity • weight 54 • 8 docs)_
The technology being investigated as a foundational architecture for personal knowledge management.
- **Knowledge Management** _(tag • weight 51 • 7 docs)_
Broad domain of organizing, storing, and retrieving information for personal or organizational use.
- **Memory system** _(concept • weight 45 • 7 docs)_
Concept describing graph databases as a memory system for work.
- **Neo4j Graph Data Science** _(entity • weight 41 • 8 docs)_
Neo4j library providing algorithms like FastRP for converting graph topology into searchable vector embeddings.
- **memory.wiki** _(entity • weight 40 • 10 docs)_
Platform hosting the memory.wiki API reference.
- **Retrieval-Augmented Generation** _(tag • weight 38 • 7 docs)_
Domain combining information retrieval with generative AI to provide contextually grounded LLM responses.
- **Vector indexes** _(concept • weight 38 • 7 docs)_
High-dimensional vector representations enabling semantic similarity in Neo4j.
- **Apache Lucene** _(entity • weight 37 • 7 docs)_
Indexing and search library that powers Neo4j vector indexes.
- **Vector Search** _(concept • weight 35 • 7 docs)_
Semantic similarity search using multidimensional vector representations to find conceptually related content.
- **Private Cloud Compute** _(entity • weight 35 • 1 doc)_
Privacy-preserving model infrastructure offering larger windows and stronger reasoning capabilities.
- **Neo4j Agent Memory** _(entity • weight 35 • 4 docs)_
A system for storing, retrieving, and summarizing agent conversation messages.
- **streaming** _(tag • weight 34 • 1 doc)_
Broad domain classification for the document content.
- **Personal Memory System** _(concept • weight 34 • 7 docs)_
User's goal to build a comprehensive system for managing work and routine data using graph database architecture.
- **Semantic Search** _(concept • weight 33 • 8 docs)_
A method for retrieving ranked candidates from stored message data.
- **Use LLMs for knowledge graph extraction** _(concept • weight 32 • 7 docs)_
Recommended leveraging modern LLMs with detailed prompts to extract and deduplicate entities from unstructured data.
- **Large Language Models** _(entity • weight 29 • 8 docs)_
Modern AI models used for extracting structured information from unstructured data with strong cross-domain language skills.
- **Structural Search** _(concept • weight 29 • 7 docs)_
Graph-native search finding entities with similar topology, neighborhoods, or communities using graph embeddings.
- **Multimodal Prompting** _(concept • weight 27 • 1 doc)_
Integration of image attachments with text prompts using ImageReference.
- **Lexical Search** _(concept • weight 27 • 7 docs)_
Full-text search finding exact names, acronyms, codes, and domain-specific terms through traditional indexing.
- **NAMS** _(entity • weight 26 • 4 docs)_
Neo4j Agent Memory Service, a hosted backend with different capabilities compared to Bolt.
- **Bolt** _(concept • weight 26 • 4 docs)_
A direct database connection protocol for Neo4j supporting specific memory operations.
- **Semantic Matching** _(concept • weight 24 • 7 docs)_
Finding conceptually similar content and paraphrases through vector-based similarity rather than exact text matching.
- **Dynamic Sessions** _(concept • weight 23 • 1 doc)_
Runtime composition of tools and instructions using profiles and session properties.
- **Natural Language Processing** _(tag • weight 23 • 7 docs)_
Domain of computational techniques for understanding and extracting meaning from human language.
- **NLP techniques** _(tag • weight 18 • 7 docs)_
NLP methods for extracting entities and relations from text.
- **Explore graph database for personal memory system** _(concept • weight 18 • 7 docs)_
User chose to investigate graph databases as a foundational architecture for managing work and routine data complexity.
- **com.apple.developer.private-cloud-compute** _(entity • weight 18 • 1 doc)_
Required entitlement for accessing Private Cloud Compute services.
- **Cypher** _(entity • weight 17 • 4 docs)_
The query language used to expose GDS procedures and functions.
- **Generative AI** _(tag • weight 16 • 7 docs)_
Domain of AI systems that generate new content, including LLMs used for entity extraction and response generation.
- **Unstructured Data Processing** _(concept • weight 16 • 7 docs)_
Converting unstructured text, images, and audio into structured knowledge graphs using NLP and LLM techniques.
- **Use hybrid search for RAG applications** _(concept • weight 16 • 7 docs)_
Recommended combining lexical, semantic, and structural search signals to improve retrieval quality in RAG systems.
- **Unstructured Data Extraction** _(concept • weight 16 • 7 docs)_
Process of converting unstructured text, images, and audio into structured entities and relationships using LLMs.
- **LLM-based Entity Extraction** _(concept • weight 16 • 7 docs)_
Using large language models with prompts to extract and deduplicate entities and relationships from unstructured text.
- **From traditional systems to graph-based architecture** _(concept • weight 16 • 7 docs)_
User shifted from existing memory/organizational systems toward graph database exploration for improved data management.
- **knowledge graphs** _(tag • weight 16 • 8 docs)_
Structured networks of entities and relationships.
- **Python SDK** _(entity • weight 15 • 3 docs)_
The client library used to interface with Neo4j Agent Memory.
## Concept relations
- **Knowledge Graph** enables pattern **GraphRAG**
- **Private Cloud Compute** requires entitlement **com.apple.developer.private-cloud-compute**
- **GraphRAG** utilizes **Knowledge Graph**
- **Hybrid Search** combines with **Vector Search**
- **GraphRAG** uses to augment **Knowledge Graph**
- **Neo4j** stores and manages **Knowledge Graph**
- **GraphRAG** instantiates pattern **Retrieval-Augmented Generation**
- **Explore graph database for personal memory system** evaluates platform **Neo4j**
- **Memory system** implemented via **Graph Database**
- **Explore graph database for personal memory system** pursues goal **Personal Memory System**
- **Use LLMs for knowledge graph extraction** recommends technique **LLM-based Entity Extraction**
- **Personal Memory System** implemented with **Neo4j**
- **Personal Memory System** built on platform **Neo4j**
- **Graph Database** implemented by **Neo4j**
- **Use hybrid search for RAG applications** recommends technique **Hybrid Search**
- **Large Language Models** belongs to domain **Generative AI**
- **Unstructured Data Extraction** produces artifact **Knowledge Graph**
- **Python SDK** supports direct connection **Bolt**
- **Neo4j** supports **Hybrid Search**
- **Personal Memory System** instance of domain **Knowledge Management**
- **Vector Search** component of **Hybrid Search**
- **Lexical Search** component of **Hybrid Search**
- **Knowledge Graph** enables **GraphRAG**
- **From traditional systems to graph-based architecture** affects goal **Personal Memory System**
- **Neo4j Graph Data Science** enables capability **Structural Search**
- **Personal Memory System** potential platform **Neo4j**
- **Vector Search** implements technique **Semantic Matching**
- **Large Language Models** enables **LLM-based Entity Extraction**
- **Neo4j** stores **Knowledge Graph**
- **LLM-based Entity Extraction** creates **Knowledge Graph**
---
id: 3uztjWGe
title: HUB: Organizational Evolution and Operational Framework
url: https://memory.wiki/3uztjWGe
updated: 2026-10-19T10:44:48.522803+00:00
---
# HUB: Organizational Evolution and Operational Framework
> The HUB is an impact-driven organization evolved from DiverCidade, structured into four distinct legal units and a multi-phase development roadmap. It currently operates under a new operational folder architecture designed to manage context-based information across its evolving ecosystem.
## Key claims
- [EXTRACTED] The HUB is the successor organization to DiverCidade, defined by the tagline "Diferenças que movimentam negócios" [doc-3].
- [EXTRACTED] The HUB is comprised of four legally separate units: HUB (brand/method), HUB Negócios, Instituto HUB, and Plataforma HUB [doc-3].
- [EXTRACTED] DiverCidade LTDA is not a partner in the current HUB founder scenario, though it maintains potential for asset licensing and retains active access to the HUB Slack and Airtable environments [doc-1].
- [INFERRED] The transition from DiverCidade to HUB involves a shift from a singular entity to a modular, multi-unit structure with a specific focus on "canonical data" as a core development pillar [doc-3].
- [AMBIGUOUS] While the founder equity table lists 95% distribution, it remains unclear if the remaining 5% is reserved for a future investor or if the current ownership structure is fully finalized [doc-3].
## Cross-references
- **Operational Architecture:** The "C.A.O.S." framework (Context, Architecture, Operation, Sustaining) mentioned in [doc-3] aligns with the new folder architecture defined in [doc-2], which emphasizes "Context" as the primary principle for classifying organizational information.
- **DiverCidade's Role:** DiverCidade is treated as a predecessor in [doc-3] and a technical service provider/contractor in [doc-1], while [doc-2] explicitly labels the new folder structure as "DiverCidade HUB," suggesting a transitional naming convention during the migration.
## Open questions / gaps
- What are the specific legal mechanisms for the transition of assets from DiverCidade LTDA to the four new HUB units?
- How will the "canonical data" (P03) interact with the folder architecture defined in [doc-2] to ensure a single source of truth?
- What are the specific criteria for the "Future investor" 5% equity stake?
## Provenance
- [doc-1]: Defines the status of DiverCidade LTDA as a predecessor and current technical contributor.
- [doc-2]: Provides the operational specification for the new folder architecture used by the HUB.
- [doc-3]: Outlines the organizational structure, founder equity, and development roadmap of the HUB.
CONFIDENCE TAGS:
- [EXTRACTED]
- [INFERRED]
- [AMBIGUOUS]
---
id: nVgpibmO
title: memory.wiki API Integration Guide
url: https://memory.wiki/nVgpibmO
updated: 2026-10-19T10:28:34.630979+00:00
---
# memory.wiki API Integration Guide
> This document outlines the technical specifications for interacting with the memory.wiki API, focusing on authentication protocols and document management endpoints. It provides a framework for programmatic access via CLI, MCP, or direct HTTP requests.
## Key claims
- [EXTRACTED] The memory.wiki API enforces a rate limit of 10 requests per minute per IP address [doc-1].
- [EXTRACTED] Authentication is progressive, ranging from unauthenticated access for basic operations to JWT-based identity for CLI and MCP tools [doc-1].
- [EXTRACTED] When creating a document, the API returns an `editToken` which can be used to manage updates or deletions for that specific resource [doc-1].
- [INFERRED] The platform is designed to support multi-modal input sources, as evidenced by the `source` parameter which explicitly categorizes origins like "vscode," "github," and "mcp" [doc-1].
- [AMBIGUOUS] While the API supports `x-user-id` and `x-user-email` headers for ownership verification, the documentation does not specify the exact mechanism for how `allowed_emails` are configured or managed [doc-1].
## Cross-references
- **Authentication Methods**: The API documentation distinguishes between JWT-based authentication (used by CLI/MCP) and token-based authentication (using the `editToken` returned upon creation) [doc-1]. These represent two distinct security tiers: one for persistent user identity and one for granular document-level control.
## Open questions / gaps
- What are the specific error codes returned when the 10 request/min rate limit is exceeded?
- How are `folderId` values generated or retrieved?
- Is there a programmatic way to list documents, or is access strictly limited to fetching by known ID?
## Provenance
- [doc-1]: Provides the technical specifications, endpoint definitions, and authentication requirements for the memory.wiki platform.
---
id: jUwYO3JF
title: Knowledge Management: Graph Database Exploration
url: https://memory.wiki/jUwYO3JF
updated: 2026-10-09T20:38:09.469+00:00
---
# Knowledge Management: Graph Database Exploration
> This document outlines an initial investigation into utilizing graph databases as a foundational architecture for a personal memory system. The goal is to determine if this technology can effectively manage the complexity of daily work and routine data.
## Key claims
- [EXTRACTED] The author is currently exploring graph database options to serve as a comprehensive memory system for work and routine tasks [doc-1].
- [INFERRED] The author perceives existing memory or organizational systems as potentially insufficient for the complexity of their current workflow [doc-1].
- [AMBIGUOUS] It is unclear whether the author has already selected a specific graph database technology or if they are still in the preliminary research phase [doc-1].
## Cross-references
- The concept of a "memory system" is the central focus of [doc-1], serving as the primary driver for the technical exploration of graph databases.
## Open questions / gaps
- What specific criteria or metrics will the author use to evaluate the "usefulness" of a graph database?
- Does the author intend to migrate existing data into this new system, or is this intended for future capture only?
- Are there specific performance or scalability requirements for the "work and routine" data mentioned?
## Provenance
- [doc-1]: A personal reflection document outlining the motivation to investigate graph databases for personal knowledge management.
CONFIDENCE TAGS:
- [EXTRACTED]: The docs say this directly. Quote or close paraphrase.
- [INFERRED]: The docs collectively imply this, but no single sentence states it.
- [AMBIGUOUS]: The evidence is partial or split across docs.
---
id: QjaY4_J0
title: Graph Database & GraphRAG Integration
url: https://memory.wiki/QjaY4_J0
updated: 2026-10-09T20:37:52.32+00:00
---
# Graph Database & GraphRAG Integration
> This collection synthesizes the exploration of graph databases as a foundational architecture for personal knowledge management, specifically leveraging Neo4j and GraphRAG to process unstructured data. The documents outline a transition from initial conceptual research toward implementing structured retrieval systems that bridge the gap between raw information and actionable memory.
## Key claims
- [EXTRACTED] Modern Large Language Models (LLMs) have significantly lowered the barrier to creating Knowledge Graphs (KGs) from unstructured data by enabling automated extraction of entities and relationships into structured JSON [doc-3].
- [EXTRACTED] Neo4j supports advanced retrieval techniques, including hybrid search and vector indexing, which are essential for integrating KGs into RAG workflows [doc-4, doc-5].
- [INFERRED] The owner’s interest in graph databases is driven by a need to manage the high complexity of daily work and routine data that traditional organizational systems may not adequately capture [doc-6, doc-7].
- [INFERRED] Implementing a GraphRAG system requires a multi-stage pipeline: extracting structured data from unstructured sources, storing that data in a graph database, and utilizing specialized retrieval patterns to augment LLM responses [doc-2, doc-3].
- [AMBIGUOUS] While the owner is actively researching graph databases, it remains unclear whether a final technical architecture has been selected or if the project is still in the preliminary evaluation phase [doc-6, doc-7].
## Cross-references
- **Knowledge Graphs:** The concept of KGs appears in [doc-2] and [doc-3]. [doc-3] focuses on the *creation* of these graphs from unstructured text, while [doc-2] focuses on the *application* of these graphs within a RAG framework.
- **Neo4j:** This technology is treated as the primary implementation vehicle across the library, appearing as a database solution [doc-3], a search provider [doc-4], and a vector index host [doc-5].
## Open questions / gaps
- What specific metrics or benchmarks will be used to determine if a graph database is "useful" for the owner's personal memory system?
- Does the owner intend to build a custom pipeline for data ingestion, or are they looking for existing tools to automate the conversion of their current unstructured notes into a graph?
- How will the owner handle the maintenance and de-duplication of entities as their personal knowledge graph grows over time?
## Provenance
- [doc-1]: A curated index of the current library’s documents regarding Neo4j and graph databases.
- [doc-2]: A conceptual overview of GraphRAG and its role in connecting data for better retrieval.
- [doc-3]: A technical guide on using LLMs to extract structured graph data from unstructured text.
- [doc-4]: Reference documentation for implementing hybrid search within Neo4j.
- [doc-5]: Reference documentation for Neo4j’s native vector indexing capabilities.
- [doc-6]: A foundational document outlining the motivation for using graph databases in personal knowledge management.
- [doc-7]: A brief personal note confirming the active exploration of graph-based memory systems.
CONFIDENCE TAGS:
- [EXTRACTED]: The docs say this directly.
- [INFERRED]: The docs collectively imply this.
- [AMBIGUOUS]: The evidence is partial or split across docs.
---
id: UK0Ocv3G
title: Neo4j hybrid search
url: https://memory.wiki/UK0Ocv3G
updated: 2026-10-09T20:36:49.929+00:00
---
# Neo4j hybrid search
---
title: "Hybrid search - Developer Guides"\
source: "https://neo4j.com/developer/genai-ecosystem/hybrid-search/"\
author:\
published:\
created: 2026-10-09\
description: "Hybrid search - Developer Guides"\
tags:
- "clippings"
---
## Hybrid search
Hybrid search is useful when one retrieval signal is not enough. It can combine signals such as:
- **lexical (full-text) search** - which finds exact names, acronyms, codes, and domain-specific terms
- **semantic (vector) search** - which finds conceptually similar content and paraphrases
- **structural (graph topology similarity) search** - which finds graph entities with similar topology, neighborhoods, communities, or graph-derived features
Combining search signals can improve the quality of search results. A result that appears in more than one ranked list gets support from multiple signals, while a result that ranks strongly in one source can still be returned even if another source misses it. This is useful for search and retrieval-augmented generation (RAG) applications where users expect both conceptual matches and exact terminology to work.
Structural search is a graph-native benefit of Neo4j. With Neo4j Graph Data Science (GDS), algorithms such as [FastRP node embeddings](https://neo4j.com/docs/graph-data-science/current/machine-learning/node-embeddings/fastrp/) can turn graph topology into vectors that can be searched alongside lexical and semantic results. This lets applications retrieve entities that are structurally similar even when their text is different.
Hybrid search is often used for lexical + semantic search, such as full-text search plus vector search. The same approach can combine any two or more ranked or scored sources, including several vector indexes, title and body full-text indexes, graph traversal scores, structural similarity from graph embeddings, community membership, business rules, or external retrieval scores.
This page shows two patterns:
- **lexical + semantic search** - using full-text search and vector search
- **lexical + semantic + structural search** - using full-text search and two vector indexes
Both examples use weighted reciprocal rank fusion (WRRF) to combine results. WRRF scores each result from its rank in each source list rather than comparing raw scores from different search methods directly. Use a larger `sourceK` than `finalK` so each source can contribute enough candidates before fusion. The `rrfConstant` dampens the effect of rank position, and `sourceWeights` lets you favor one retrieval signal over another.
## Full-text and vector search
The example below combines:
- a full-text index on `Abstract.text`
- stored embedding vectors on `Abstract.embedding`, queried with a vector index using `SEARCH` in current Neo4j releases or `db.index.vector.queryNodes()` for Neo4j 5.11 compatibility
- WRRF scoring over both ranked lists
Create indexes for your Neo4j version. Current Neo4j releases should use `CREATE VECTOR INDEX`. Neo4j 5.11 uses the legacy vector-index creation procedure. The 5.11 example drops the vector index first so the setup can be rerun; skip the `DROP INDEX` statement if you already have an index you want to keep.
Current Cypher 25 approach
Neo4j 5.11 compatibility
```cypher
CREATE FULLTEXT INDEX \`abstract-fulltext\` IF NOT EXISTS
FOR (abstract:Abstract)
ON EACH [abstract.text];
CREATE VECTOR INDEX \`abstract-embeddings\` IF NOT EXISTS
FOR (abstract:Abstract)
ON abstract.embedding
OPTIONS {indexConfig: {
\`vector.dimensions\`: 1536,
\`vector.similarity_function\`: 'cosine'
}};
CALL db.awaitIndexes(30);
```
```cypher
CREATE FULLTEXT INDEX \`abstract-fulltext\` IF NOT EXISTS
FOR (abstract:Abstract)
ON EACH [abstract.text];
DROP INDEX \`abstract-embeddings\` IF EXISTS;
CALL db.index.vector.createNodeIndex(
'abstract-embeddings',
'Abstract',
'embedding',
1536,
'cosine'
);
CALL db.awaitIndexes(30);
```
The query uses `abstract.id` as a deterministic tie breaker; replace it with a stable unique property from your own data model.
Choose the query form for your Neo4j version:
Current Cypher 25 approach
Neo4j 5.11 compatibility
```cypher
CYPHER 25
LET
query = $query,
queryVector = $queryVector,
sourceK = $sourceK,
finalK = $finalK,
rrfConstant = $rrfConstant,
sourceWeights = $sourceWeights
CALL (query, queryVector, sourceK, rrfConstant, sourceWeights) {
CALL db.index.fulltext.queryNodes('abstract-fulltext', query, {limit: sourceK})
YIELD node AS abstract, score
ORDER BY score DESC, abstract.id ASC
WITH collect(abstract) AS abstracts, rrfConstant, sourceWeights
LET weight = coalesce(sourceWeights['fulltext'], 1.0)
UNWIND CASE WHEN size(abstracts) = 0 THEN [] ELSE range(0, size(abstracts) - 1) END AS rankIndex
RETURN
abstracts[rankIndex] AS abstract,
weight / (rrfConstant + rankIndex + 1) AS contribution
UNION ALL
MATCH (abstract:Abstract)
SEARCH abstract IN (
VECTOR INDEX \`abstract-embeddings\`
FOR queryVector
LIMIT $sourceK
) SCORE AS score
ORDER BY score DESC, abstract.id ASC
WITH collect(abstract) AS abstracts, rrfConstant, sourceWeights
LET weight = coalesce(sourceWeights['vector'], 1.0)
UNWIND CASE WHEN size(abstracts) = 0 THEN [] ELSE range(0, size(abstracts) - 1) END AS rankIndex
RETURN
abstracts[rankIndex] AS abstract,
weight / (rrfConstant + rankIndex + 1) AS contribution
}
WITH abstract, finalK, sum(contribution) AS wrrf
ORDER BY wrrf DESC, abstract.id ASC
WITH collect({abstract: abstract, wrrf: wrrf}) AS orderedRows, finalK
LET limitedRows = orderedRows[..finalK]
UNWIND limitedRows AS row
WITH row.abstract AS abstract, row.wrrf AS wrrf
MATCH (abstract)<--(:Paper)-->(title:Title)
RETURN title.text AS title, abstract.text AS text, wrrf
ORDER BY wrrf DESC, abstract.id ASC;View all (31 more lines)
```
```cypher
WITH
$query AS query,
$queryVector AS queryVector,
$sourceK AS sourceK,
$finalK AS finalK,
$rrfConstant AS rrfConstant,
$sourceWeights AS sourceWeights
CALL {
WITH query, sourceK, rrfConstant, sourceWeights
CALL db.index.fulltext.queryNodes('abstract-fulltext', query, {limit: sourceK})
YIELD node AS abstract, score
WITH abstract, score, rrfConstant, sourceWeights
ORDER BY score DESC, abstract.id ASC
WITH collect(abstract) AS abstracts, rrfConstant, sourceWeights
WITH abstracts, rrfConstant, coalesce(sourceWeights['fulltext'], 1.0) AS weight
UNWIND CASE WHEN size(abstracts) = 0 THEN [] ELSE range(0, size(abstracts) - 1) END AS rankIndex
RETURN
abstracts[rankIndex] AS abstract,
weight / (rrfConstant + rankIndex + 1) AS contribution
UNION ALL
WITH queryVector, sourceK, rrfConstant, sourceWeights
CALL db.index.vector.queryNodes('abstract-embeddings', sourceK, queryVector)
YIELD node AS abstract, score
WITH abstract, score, sourceK, rrfConstant, sourceWeights
ORDER BY score DESC, abstract.id ASC
WITH collect(abstract) AS abstracts, sourceK, rrfConstant, sourceWeights
WITH abstracts, rrfConstant, coalesce(sourceWeights['vector'], 1.0) AS weight
UNWIND CASE WHEN size(abstracts) = 0 THEN [] ELSE range(0, size(abstracts) - 1) END AS rankIndex
RETURN
abstracts[rankIndex] AS abstract,
weight / (rrfConstant + rankIndex + 1) AS contribution
}
WITH abstract, finalK, sum(contribution) AS wrrf
ORDER BY wrrf DESC, abstract.id ASC
WITH collect({abstract: abstract, wrrf: wrrf}) AS orderedRows, finalK
UNWIND orderedRows[..finalK] AS row
WITH row.abstract AS abstract, row.wrrf AS wrrf
MATCH (abstract)<--(:Paper)-->(title:Title)
RETURN title.text AS title, abstract.text AS text, wrrf
ORDER BY wrrf DESC, abstract.id ASC;View all (30 more lines)
```
For example, pass parameters like these from an application: The `queryVector` below is shortened for readability. In a real query, pass an embedding with the same dimensions as the stored embeddings and the vector index, for example 1536 dimensions when using `text-embedding-3-small`.
```json
{
"query": "hierarchical navigable small world graph",
"queryVector": [0.12, -0.03, 0.45],
"sourceK": 20,
"finalK": 10,
"rrfConstant": 60.0,
"sourceWeights": {
"fulltext": 1.0,
"vector": 1.0
}
}
```
Each source contributes `weight / (rrfConstant + sourceRank)` for every matching abstract. If an abstract appears in both result sets, the query sums both contributions. This rewards results that rank highly in either source, and gives an additional boost to results that rank well in both.
Increase the full-text weight when exact terminology is critical, such as product names, codes, or domain-specific vocabulary. Increase the vector weight when conceptual similarity should dominate.
## Add structural search
Structural search adds another ranked source for graph topology. For example, two decisions may be structurally similar because they involve similar accounts, policies, escalation paths, or fraud patterns, even if their text descriptions use different words.
The sample below uses precomputed vectors so that the Cypher is self-contained. In production, structural embeddings can be generated from graph topology, for example with the Neo4j Graph Data Science FastRP node embedding algorithm, then stored on the nodes and queried with a vector index.
The sample data creates six `Decision` nodes:
- one decision that matches lexical, semantic, and structural signals
- one mostly lexical match
- one mostly semantic match
- one mostly structural match
- one partial multi-source match
- one tie-breaker row
```cypher
MATCH (decision:Decision)
WHERE decision.id STARTS WITH 'hybrid-example-'
DETACH DELETE decision;
UNWIND [
{
id: 'hybrid-example-all-signals',
title: 'Credit limit escalation after fraud alert',
text: 'Credit limit increase review with fraud alert and senior risk escalation.',
semanticEmbedding: [1.0, 0.0, 0.0],
structuralEmbedding: [0.0, 0.0, 1.0]
},
{
id: 'hybrid-example-lexical-only',
title: 'Credit limit policy wording match',
text: 'Credit limit fraud review terminology appears in this policy note.',
semanticEmbedding: [0.0, 1.0, 0.0],
structuralEmbedding: [0.0, 1.0, 0.0]
},
{
id: 'hybrid-example-semantic-only',
title: 'Risky customer request',
text: 'Customer request needs a careful decision because exposure may increase.',
semanticEmbedding: [0.98, 0.02, 0.0],
structuralEmbedding: [0.0, 1.0, 0.0]
},
{
id: 'hybrid-example-structural-only',
title: 'Similar account topology',
text: 'Operational case with unrelated vocabulary but matching graph context.',
semanticEmbedding: [0.01, 0.99, 0.0],
structuralEmbedding: [0.0, 0.01, 0.99]
},
{
id: 'hybrid-example-weak-mixed',
title: 'Risk review with related topology',
text: 'Credit risk review for a customer account.',
semanticEmbedding: [0.7, 0.3, 0.0],
structuralEmbedding: [0.0, 0.4, 0.6]
},
{
id: 'hybrid-example-tie-breaker',
title: 'Tie breaker',
text: 'Tie breaker record for deterministic ordering.',
semanticEmbedding: [0.0, 1.0, 0.0],
structuralEmbedding: [0.0, 1.0, 0.0]
}
] AS row
CREATE (decision:Decision)
SET decision = row;View all (36 more lines)
```
Create indexes for your Neo4j version. Current Neo4j releases should use `CREATE VECTOR INDEX`. Neo4j 5.11 uses the legacy vector-index creation procedure. The 5.11 example drops the vector indexes first so the setup can be rerun; skip the `DROP INDEX` statements if you already have indexes you want to keep.
Current Cypher 25 approach
Neo4j 5.11 compatibility
```cypher
CREATE FULLTEXT INDEX \`decision-text\` IF NOT EXISTS
FOR (decision:Decision)
ON EACH [decision.text];
CREATE VECTOR INDEX \`decision-semantic\` IF NOT EXISTS
FOR (decision:Decision)
ON decision.semanticEmbedding
OPTIONS {indexConfig: {
\`vector.dimensions\`: 3,
\`vector.similarity_function\`: 'cosine'
}};
CREATE VECTOR INDEX \`decision-structural\` IF NOT EXISTS
FOR (decision:Decision)
ON decision.structuralEmbedding
OPTIONS {indexConfig: {
\`vector.dimensions\`: 3,
\`vector.similarity_function\`: 'cosine'
}};
CALL db.awaitIndexes(30);View all (7 more lines)
```
```cypher
CREATE FULLTEXT INDEX \`decision-text\` IF NOT EXISTS
FOR (decision:Decision)
ON EACH [decision.text];
DROP INDEX \`decision-semantic\` IF EXISTS;
DROP INDEX \`decision-structural\` IF EXISTS;
CALL db.index.vector.createNodeIndex(
'decision-semantic',
'Decision',
'semanticEmbedding',
3,
'cosine'
);
CALL db.index.vector.createNodeIndex(
'decision-structural',
'Decision',
'structuralEmbedding',
3,
'cosine'
);
CALL db.awaitIndexes(30);View all (10 more lines)
```
The query adds one `UNION ALL` branch per source. Each branch returns the same columns: the matched node, the source name, the rank in that source, and the raw score for diagnostics. The WRRF score uses the rank and source weight, not the raw source score.
Choose the query form for your Neo4j version:
Current Cypher 25 approach
Neo4j 5.11 compatibility
```cypher
CYPHER 25
LET
query = $query,
queryVector = $queryVector,
structuralQueryVector = $structuralQueryVector,
finalK = $finalK,
rrfConstant = $rrfConstant,
sourceWeights = $sourceWeights
CALL (query, queryVector, structuralQueryVector) {
CALL db.index.fulltext.queryNodes('decision-text', query, {limit: $sourceK})
YIELD node AS decision, score
WITH decision, score
ORDER BY score DESC, decision.id ASC
WITH collect({node: decision, rawScore: score}) AS rows
UNWIND CASE WHEN size(rows) = 0 THEN [] ELSE range(0, size(rows) - 1) END AS rankIndex
RETURN
rows[rankIndex].node AS decision,
'fulltext' AS source,
rankIndex + 1 AS sourceRank,
rows[rankIndex].rawScore AS rawScore
UNION ALL
MATCH (decision:Decision)
SEARCH decision IN (
VECTOR INDEX \`decision-semantic\`
FOR queryVector
LIMIT $sourceK
) SCORE AS score
WITH decision, score
ORDER BY score DESC, decision.id ASC
WITH collect({node: decision, rawScore: score}) AS rows
UNWIND CASE WHEN size(rows) = 0 THEN [] ELSE range(0, size(rows) - 1) END AS rankIndex
RETURN
rows[rankIndex].node AS decision,
'semantic' AS source,
rankIndex + 1 AS sourceRank,
rows[rankIndex].rawScore AS rawScore
UNION ALL
MATCH (decision:Decision)
SEARCH decision IN (
VECTOR INDEX \`decision-structural\`
FOR structuralQueryVector
LIMIT $sourceK
) SCORE AS score
WITH decision, score
ORDER BY score DESC, decision.id ASC
WITH collect({node: decision, rawScore: score}) AS rows
UNWIND CASE WHEN size(rows) = 0 THEN [] ELSE range(0, size(rows) - 1) END AS rankIndex
RETURN
rows[rankIndex].node AS decision,
'structural' AS source,
rankIndex + 1 AS sourceRank,
rows[rankIndex].rawScore AS rawScore
}
LET weight = coalesce(sourceWeights[source], 1.0)
LET contribution = weight / (rrfConstant + sourceRank)
WITH decision, finalK, source, sourceRank, rawScore, weight, contribution
ORDER BY decision.id ASC, source ASC, sourceRank ASC
WITH
decision,
finalK,
collect({
source: source,
sourceRank: sourceRank,
weight: weight,
rawScore: rawScore,
contribution: contribution
}) AS contributions
LET wrrf = reduce(wrrf = 0.0, contribution IN contributions |
wrrf + contribution.contribution
)
ORDER BY wrrf DESC, decision.id ASC
WITH collect({
decision: decision,
sources: [contribution IN contributions | contribution.source],
wrrf: wrrf
}) AS orderedRows, finalK
LET limitedRows = orderedRows[..finalK]
UNWIND limitedRows AS row
RETURN
row.decision.title AS title,
row.sources AS sources,
row.wrrf AS wrrf
ORDER BY row.wrrf DESC, row.decision.id ASC;View all (82 more lines)
```
```cypher
WITH
$query AS query,
$queryVector AS queryVector,
$structuralQueryVector AS structuralQueryVector,
$sourceK AS sourceK,
$finalK AS finalK,
$rrfConstant AS rrfConstant,
$sourceWeights AS sourceWeights
CALL {
WITH query, sourceK
CALL db.index.fulltext.queryNodes('decision-text', query, {limit: sourceK})
YIELD node AS decision, score
WITH decision, score
ORDER BY score DESC, decision.id ASC
WITH collect({node: decision, rawScore: score}) AS rows
UNWIND CASE WHEN size(rows) = 0 THEN [] ELSE range(0, size(rows) - 1) END AS rankIndex
RETURN
rows[rankIndex].node AS decision,
'fulltext' AS source,
rankIndex + 1 AS sourceRank,
rows[rankIndex].rawScore AS rawScore
UNION ALL
WITH queryVector, sourceK
CALL db.index.vector.queryNodes('decision-semantic', sourceK, queryVector)
YIELD node AS decision, score
WITH decision, score
ORDER BY score DESC, decision.id ASC
WITH collect({node: decision, rawScore: score}) AS rows
UNWIND CASE WHEN size(rows) = 0 THEN [] ELSE range(0, size(rows) - 1) END AS rankIndex
RETURN
rows[rankIndex].node AS decision,
'semantic' AS source,
rankIndex + 1 AS sourceRank,
rows[rankIndex].rawScore AS rawScore
UNION ALL
WITH structuralQueryVector, sourceK
CALL db.index.vector.queryNodes('decision-structural', sourceK, structuralQueryVector)
YIELD node AS decision, score
WITH decision, score
ORDER BY score DESC, decision.id ASC
WITH collect({node: decision, rawScore: score}) AS rows
UNWIND CASE WHEN size(rows) = 0 THEN [] ELSE range(0, size(rows) - 1) END AS rankIndex
RETURN
rows[rankIndex].node AS decision,
'structural' AS source,
rankIndex + 1 AS sourceRank,
rows[rankIndex].rawScore AS rawScore
}
WITH decision, finalK, source, sourceRank, rawScore,
coalesce(sourceWeights[source], 1.0) AS weight,
rrfConstant
WITH decision, finalK, source, sourceRank, rawScore, weight,
weight / (rrfConstant + sourceRank) AS contribution
ORDER BY decision.id ASC, source ASC, sourceRank ASC
WITH
decision,
finalK,
collect({
source: source,
sourceRank: sourceRank,
weight: weight,
rawScore: rawScore,
contribution: contribution
}) AS contributions
WITH decision, finalK, contributions,
reduce(wrrf = 0.0, contribution IN contributions |
wrrf + contribution.contribution
) AS wrrf
ORDER BY wrrf DESC, decision.id ASC
WITH collect({
decision: decision,
sources: [contribution IN contributions | contribution.source],
wrrf: wrrf
}) AS orderedRows, finalK
WITH orderedRows[..finalK] AS limitedRows
UNWIND limitedRows AS row
RETURN
row.decision.title AS title,
row.sources AS sources,
row.wrrf AS wrrf
ORDER BY row.wrrf DESC, row.decision.id ASC;View all (79 more lines)
```
For example, pass parameters like these from an application:
```json
{
"query": "credit limit fraud review",
"queryVector": [1.0, 0.0, 0.001],
"structuralQueryVector": [0.001, 0.0, 1.0],
"sourceK": 3,
"finalK": 5,
"rrfConstant": 60.0,
"sourceWeights": {
"fulltext": 1.0,
"semantic": 1.0,
"structural": 1.0
}
}
```
| title | sources | wrrf |
| --- | --- | --- |
| "Credit limit escalation after fraud alert" | \["fulltext", "semantic", "structural"\] | 0.048915917503966164 |
| "Risk review with related topology" | \["fulltext", "semantic", "structural"\] | 0.047619047619047616 |
| "Credit limit policy wording match" | \["fulltext"\] | 0.01639344262295082 |
| "Risky customer request" | \["semantic"\] | 0.016129032258064516 |
| "Similar account topology" | \["structural"\] | 0.016129032258064516 |
The first result wins because it appears in all three ranked lists. The structural-only result still appears because it is highly ranked by the structural source, even though it is not lexically or semantically close. This is useful when text alone does not capture graph context, for example when two decisions involve similar account structures, policy chains, or escalation paths.
## Production notes
Hybrid search is a retrieval pattern, not a separate index type. To add another signal, add another source branch that returns the same shape and include a matching source weight. The source can be another vector index, a full-text index, an exact graph traversal score, a graph algorithm output, or an external ranker.
Structural embeddings should be refreshed when the graph topology changes enough that old embeddings no longer represent current context. If you use GDS FastRP, see the [FastRP documentation](https://neo4j.com/docs/graph-data-science/current/machine-learning/node-embeddings/fastrp/) for graph projection, algorithm configuration, and write or mutate modes.
For retrieval-augmented generation (RAG), a common pattern is to retrieve a larger candidate set with hybrid search, then pass the fused results to graph expansion or a reranker.
## Documentation
| Documentation | [Vector indexes](https://neo4j.com/docs/cypher-manual/current/indexes/semantic-indexes/vector-indexes/) |
| --- | --- |
| Documentation | [Full-text indexes](https://neo4j.com/docs/cypher-manual/current/indexes/semantic-indexes/full-text-indexes/) |
| Documentation | `SEARCH`[ clause](https://neo4j.com/docs/cypher-manual/current/clauses/search/) |
| Documentation | [Create and store embeddings](https://neo4j.com/docs/genai/plugin/current/embeddings/) |
| Documentation | [Vector similarity functions](https://neo4j.com/docs/cypher-manual/current/functions/vector/) |
| Documentation | [GDS FastRP node embeddings](https://neo4j.com/docs/graph-data-science/current/machine-learning/node-embeddings/fastrp/) |
| Paper | [Reciprocal Rank Fusion](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf) |
---
id: cjH_v5GY
title: GraphRAG with a Knowledge Graph
url: https://memory.wiki/cjH_v5GY
updated: 2026-10-09T20:36:46.755+00:00
---
# GraphRAG with a Knowledge Graph

# GraphRAG with a Knowledge Graph
Connect the dots for better answers
[What is GraphRAG?](/concepts/intro-to-graphrag) [What is a Knowledge Graph?](/concepts/intro-to-knowledge-graphs)
## Sections
[Concepts](/concepts/intro-to-graphrag) Learn key GraphRAG concepts and how they fit together.
[How-to Guides](/guides/chunking) Goal focused guides, from data preparation to retrieval.
[Reference](/reference/graphrag/basic-retriever) GraphRAG Pattern Catalog of graph models and GraphRAG retrievers
### Appendices
[Research](/appendices/research) Foundational research papers about GraphRAG.
[Glossary](/appendices/glossary) Common terminology and names used within GraphRAG.
---
_Imported from _
---
id: _l0p4GDf
title: Neo4j vector indexes
url: https://memory.wiki/_l0p4GDf
updated: 2026-10-09T20:36:42.14+00:00
---
# Neo4j vector indexes
---
title: "Vector indexes - Cypher Manual"\
source: ""\
author:\
published:\
created: 2026-10-09\
description: "Information about creating, querying, and deleting vector indexes with Cypher."\
tags:
- "clippings"
---
## Vector indexes
Vector indexes enable similarity searches and complex analytical queries by representing nodes or properties as vectors in a multidimensional space. Vector search is often used on its own for semantic matching, but it can also be combined with full-text search or other ranked result sources for hybrid search. For a worked example, see [Developer Guide → Hybrid search](https://neo4j.com/developer/genai-ecosystem/hybrid-search/).
The following resources provide hands-on tutorials for working with LLMs and vector indexes in Neo4j:
Neo4j vector indexes are powered by the [Apache Lucene](https://lucene.apache.org/) indexing and search library.[\[1\]](#fn1)
## Example graph
The examples on this page use the [Neo4j movie recommendations](https://github.com/neo4j-graph-examples/recommendations) dataset, focusing on the `plot` and `embedding` properties of `Movie` nodes. The `embedding` property consists of a 1536-dimension vector embedding of the `plot` and `title` property combined.
The graph contains 28863 nodes and 332522 relationships.
To recreate the graph, download and import this [recommendations-5.26.dump file](https://github.com/neo4j-graph-examples/recommendations/raw/refs/heads/main/data/recommendations-embeddings-aligned-5.26.dump) to an empty Neo4j database.
- Aura instances: select *Restore from file* and drag and drop the dump file. For more information, see [Aura Documentation → Restore from backup file](https://neo4j.com/docs/aura/managing-instances/backup-restore-export/#restore-backup).
- On-prem instances: Use the `neo4j-admin database load` command to import the dump file and the `neo4j-admin database migrate` command to migrate it to the Neo4j version your instance is running. Then create a new database with the **same name** as the dump file.
```js
bin/neo4j-admin database load recommendations-5.26 --from-path=./
bin/neo4j-admin database migrate recommendations-5.26
bin/cypher-shell -u neo4j -p -d system 'CREATE DATABASE \`recommendations-5.26\` WAIT'
```
| | The dump file used to load the dataset contains embeddings generated by [OpenAI](https://openai.com/), using the model `text-embedding-ada-002`. |
| --- | --- |
## Vectors and embeddings in Neo4j
Vector indexes allow you to query vector embeddings from large datasets. An embedding is a numerical representation of a data object, such as a text, image, or document. Each word or token in a text is typically represented as high-dimensional vector where each dimension represents a certain aspect of the word’s meaning.
The embedding for a particular data object can be created by both proprietary (such as [Vertex AI](https://cloud.google.com/vertex-ai) or [OpenAI](https://openai.com/)) and open source (such as [sentence-transformers](https://github.com/huggingface/sentence-transformers)) embedding generators, which can produce vector embeddings with dimensions such as 256, 768, 1536, and 3072. Embeddings can also represent graph structure, not only the semantic content of text, images, or documents. For example, [Neo4j Graph Data Science node embedding algorithms](https://neo4j.com/docs/graph-data-science/current/machine-learning/node-embeddings/) can write embeddings that capture graph topology to node properties. Those properties can then be indexed with a vector index and queried with Neo4j vector search as a structural search signal, either on their own or as one source in a hybrid search query.
Vector embeddings are stored as `LIST` properties on a node or relationship. As of Neo4j 2025.10, they can also be more efficiently stored as `VECTOR` properties using Cypher® 25.
Vector indexes are available in both Neo4j Enterprise Edition and Community Edition. Community Edition can index embeddings stored as `LIST` properties. Storing embeddings as native `VECTOR` properties requires [block format](https://neo4j.com/docs/operations-manual/current/database-internals/store-formats/#store-format-overview), which is available in Enterprise Edition and Aura.
| | For information about how embeddings can be generated and stored as properties, see: - [GenAI documentation → Create and store embeddings in a Neo4j database](https://neo4j.com/docs/genai/plugin/current/embeddings/) - [GenAI documentation → Embeddings & Vector Indexes Tutorial](https://neo4j.com/docs/genai/tutorials/embeddings-vector-indexes/) |
| --- | --- |
For example, the movie The Godfather, has the following `plot`: `"The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son."` This is its 1536-dimensional `embedding` property, where each coordinate in the `LIST` or `VECTOR` represents a particular aspect of the plot’s meaning:
```js
[0.005967312026768923, -0.03817005082964897, 0.0014667075593024492, -0.03868866711854935, -0.006505374796688557, 0.020900176838040352, -0.0027551413513720036, -0.0024731445591896772, -0.03734026849269867, -0.02228747308254242, 0.028783122077584267, 0.017905177548527718, 0.011396560817956924, 0.014235977083444595, 0.023143187165260315, -0.014184115454554558, 0.029846282675862312, -0.011928141117095947, 0.018838683143258095, -0.0019172541797161102, 0.0033483069855719805, 0.009497134014964104, -0.03516208380460739, 0.0021441481076180935, 0.002657901030033827, 0.0030760341323912144, 0.004255882930010557, -0.020809419453144073, 0.02358401007950306, -0.013808120042085648, 0.01064456906169653, -0.006975369527935982, 0.007318951655179262, -0.013872946612536907, 0.005905726458877325, -0.010689947754144669, 0.0020225979387760162, -0.016245609149336815, -0.00038815077277831733, -0.007163367234170437, 0.027668101713061333, 0.007215228863060474, -0.009380445815622807, -0.02956104464828968, -0.000863007502630353, 0.012142069637775421, 0.0012957267463207245, -0.027953339740633965, -0.016414159908890724, 0.008453421294689178, -0.0010777463903650641, 0.03311355784535408, -0.013639570213854313, -0.052457891404628754, 0.0010242642601951957, 0.0034390646032989025, -0.01049546804279089, 0.006456754636019468, 0.003970644902437925, -0.011629937216639519, 0.005280147306621075, -0.023402493447065353, -0.014689764939248562, -0.007623638026416302, -0.002453696448355913, 0.02290981076657772, 0.0017989451298490167, 0.0013427261728793383, -0.001776255783624947, -0.002414800226688385, 0.04833490028977394, 0.031142819672822952, -0.0033013075590133667, 0.017879245802760124, 0.0070077828131616116, -0.016154851764440536, -0.005772831384092569, 0.019875913858413696, -0.018008900806307793, 0.012764407321810722, 0.0055232481099665165, -0.027901478111743927, -0.0034909259993582964, 0.0307279285043478, 0.006472961511462927, 0.008861830458045006, -0.01802186481654644, 0.018281172960996628, -0.014223011210560799, -0.00018313586770091206, 0.0026352116838097572, 0.0006754148053005338, 0.014975002966821194, 0.024361930787563324, -0.017166150733828545, 0.0028880364261567593, 0.011824417859315872, 0.01710132323205471, -0.0005003822734579444, -0.018890544772148132, -0.002192768268287182, -0.0018264965619891882, 0.011033530347049236, -0.009095207788050175, -0.022689398378133774, -0.004281813744455576, 0.007092057727277279, -0.015247276052832603, 0.024115590378642082, 0.002996621420606971, -0.02834230102598667, 0.030546413734555244, 0.02350621670484543, -0.020511215552687645, 0.010190781205892563, -0.016582708805799484, 0.028238577768206596, -0.011967036873102188, 0.011623455211520195, -0.02797926962375641, 0.0026254875119775534, 0.018307102844119072, 0.0038701631128787994, -0.03850715234875679, 0.006246067117899656, -0.0006312514888122678, 0.010352848097682, -0.02358401007950306, -0.026708664372563362, -0.002863726345822215, 0.035862214863300323, 0.009860164485871792, -0.01726987399160862, 0.004275330808013678, -0.02663087099790573, 0.009140586480498314, -0.013872946612536907, 0.019136887043714523, -0.020835351198911667, -0.0250879917293787, 0.03044269047677517, 0.026280807331204414, -0.013406192883849144, 0.006683648563921452, -0.01216800045222044, 0.007824601605534554, 0.031505849212408066, 0.023726629093289375, 0.0294832531362772, -0.013678465969860554, 0.033891480416059494, 0.009211895987391472, 0.017088359221816063, -0.02183368429541588, 0.01847565360367298, 0.004644844215363264, -0.009834233671426773, -0.011344699189066887, -0.0006725785788148642, 0.00012691882147919387, 0.015338033437728882, 0.025736261159181595, -0.003967403434216976, -0.007312469184398651, -0.01312743779271841, 0.02350621670484543, -0.0006843284936621785, -0.011785522103309631, 0.006570201832801104, -0.004187814891338348, -0.0070013003423810005, 0.0165178831666708, -0.004537879955023527, 0.022715330123901367, -0.0025120405480265617, 0.025580676272511482, 0.005053253378719091, -0.0020063910633325577, -0.039285074919462204, -0.001816772622987628, 0.0007224142318591475, 0.0161029901355505, 0.04086684808135033, 0.03536953032016754, 0.009626788087189198, -0.023571044206619263, -0.009607339277863503, 0.011085391975939274, 0.020835351198911667, -0.0009027139167301357, -0.007584741804748774, 0.016958704218268394, 0.011130770668387413, -0.016829051077365875, -0.6712950468063354, -0.006511857267469168, -0.024854615330696106, -0.02663087099790573, -0.00008933950448408723, 0.0061779990792274475, 0.004605947993695736, 0.013231161050498486, -0.020187081769108772, 0.00798666849732399, -0.001847565290518105, 0.04086684808135033, 0.007519915234297514, 0.0040808506309986115, -0.034021131694316864, -0.01997963711619377, -0.004972219467163086, -0.023220978677272797, 0.012129104696214199, 0.0018329792656004429, -0.011649386025965214, 0.028446022421121597, -0.0010356089333072305, -0.006223377771675587, 0.021211346611380577, 0.004006299655884504, 0.021937407553195953, -0.02927580662071705, -0.01129283756017685, -0.009296170435845852, -0.01864420250058174, 0.02717541716992855, -0.0003555347793735564, 0.0021700789220631123, 0.048360832035541534, -0.002277043182402849, -0.009049829095602036, 0.033969271928071976, 0.004557327833026648, 0.018916476517915726, -0.000779542897362262, -0.00638544512912631, 0.022183749824762344, -0.012757924385368824, -0.027149485424160957, -0.012278205715119839, 0.0238303504884243, -0.02963883802294731, 0.005218561738729477, -0.004434156697243452, 0.013665501028299332, -0.0024520757142454386, 0.002124700229614973, -0.007273572962731123, -0.0035654769744724035, -0.0028621056117117405, 0.020640870556235313, 0.01091684214770794, -0.0006867594784125686, -0.011694764718413353, 0.011215046048164368, 0.016504917293787003, 0.00827838946133852, -0.0044471221044659615, 0.010676982812583447, 0.027771824970841408, -0.0133802630007267, 0.029820352792739868, 0.008349698968231678, -0.014573076739907265, -0.009017415344715118, 0.011655868031084538, -0.0061066895723342896, -0.013082059100270271, 0.004353123251348734, 0.00672254478558898, 0.01773662678897381, 0.012433790601789951, 0.023843316361308098, 0.015221345238387585, -0.0046221548691391945, -0.00026214358513243496, -0.016582708805799484, 0.016504917293787003, 0.028005201369524002, 0.005516765173524618, -0.04309689253568649, 0.013743292540311813, -0.0064308238215744495, -0.007176332641392946, 0.01911095716059208, 0.00446332897990942, -0.012971853837370872, -0.016919808462262154, 0.010048162192106247, 0.0032769974786788225, -0.021548446267843246, 0.001816772622987628, 0.01856641098856926, -0.04804966226220131, 0.007286538369953632, -0.007299503777176142, -0.014080392196774483, 0.008952588774263859, 0.023908143863081932, 0.012932957150042057, -0.008433973416686058, 0.012783855199813843, 0.0430709607899189, -0.01015836838632822, 0.03534360229969025, -0.007584741804748774, -0.016453055664896965, -0.005720969755202532, -0.014871280640363693, -0.026540113613009453, 0.005228285677731037, 0.0004019264888484031, 0.005931657273322344, -0.02533433400094509, -0.018825719133019447, 0.0023353875149041414, 0.0014059323584660888, -0.02020004764199257, 0.022481953725218773, 0.034980569034814835, -0.02709762565791607, -0.022974636405706406, -0.025023166090250015, 0.00641785841435194, -0.00019822835747618228, -0.004845807328820229, 0.0003723492263816297, -0.010132437571883202, 0.01498796883970499, 0.001948046963661909, -0.0020161152351647615, -0.008842382580041885, 0.0223652645945549, -0.013574742712080479, -0.002369421534240246, 0.003275376744568348, 0.005879795644432306, 0.005789037793874741, 0.006359514314681292, -0.03549918532371521, 0.003118171589449048, -0.026993902400135994, -0.01614188589155674, 0.011578075587749481, 0.0008524731383658946, -0.013367297127842903, 0.004194297362118959, 0.019331367686390877, 0.006152068264782429, -0.015208380296826363, -0.0018005658639594913, -0.015714028850197792, -0.01681608520448208, -0.028990568593144417, 0.010676982812583447, 0.024595309048891068, -0.045560311526060104, -0.0009262136882171035, 0.014845349825918674, -0.020887212827801704, 0.015739960595965385, 0.011727177537977695, 0.0012560202740132809, -0.023052429780364037, 0.0014245701022446156, -0.013062611222267151, -0.011299320496618748, 0.022274507209658623, 0.011338216252624989, -0.007908876053988934, 0.010339883156120777, -0.006132620386779308, 0.01247916929423809, -0.007947771809995174, -0.0025347298942506313, -0.011416008695960045, 0.011027047410607338, 0.004521673079580069, 0.04880165681242943, 0.0012543996563181281, 0.02115948498249054, 0.0165178831666708, -0.025373229756951332, 0.026125222444534302, -0.0031262750271707773, 0.007669016718864441, 0.003821542952209711, -0.021561412140727043, 0.008187631145119667, 0.02358401007950306, 0.02249491773545742, 0.015247276052832603, -0.004560569301247597, 0.030753860250115395, 0.031090958043932915, -0.021457688882946968, 0.027694031596183777, -0.004823117982596159, 0.0049171168357133865, -0.018346000462770462, -0.0030355174094438553, -0.011176149360835552, 0.024102624505758286, 0.006923507899045944, 0.010009266436100006, -0.00510187353938818, 0.0007916979375295341, -0.004722636193037033, 0.019914809614419937, 0.026190048083662987, -0.013289504684507847, 0.006346548907458782, -0.015415825881063938, -0.026734594255685806, 0.003623821074143052, 0.005325525999069214, -0.003922024741768837, -0.00640813447535038, -0.014624938368797302, -0.0065021333284676075, 0.007435640320181847, -0.002808623481541872, 0.010138919577002525, -0.033813685178756714, -0.0032008260022848845, 0.01614188589155674, -0.018994268029928207, 0.008135770447552204, -0.008596041239798069, -0.015662167221307755, 0.004310985561460257, -0.014663834124803543, 0.014962038025259972, -0.03479905426502228, 0.013114472851157188, 0.01341915875673294, 0.05092797800898552, -0.011908693239092827, 0.005332008935511112, -0.013367297127842903, 0.02501020021736622, -0.00029678543796762824, -0.02454344742000103, 0.003152205841615796, -0.015454721637070179, 0.010028714314103127, -0.02102983184158802, -0.0032624113373458385, 0.03583628311753273, -0.015026864595711231, 0.00672254478558898, 0.000010907877367571928, 0.019875913858413696, 0.020161151885986328, 0.014054462313652039, -0.005675591062754393, -0.009224860928952694, 0.014793488197028637, 0.03687351569533348, -0.005442214198410511, 0.005633453372865915, -0.0030436208471655846, -0.012615305371582508, -0.009075759910047054, 0.017192082479596138, -0.002220319816842675, 0.005798762198537588, -0.0007568534929305315, 0.010378778912127018, 0.005908967927098274, -0.0158825796097517, 0.0088812792673707, 0.007766257040202618, -0.0030209312681108713, -0.013561777770519257, -0.035395462065935135, 0.022391194477677345, -0.0027049004565924406, 0.004748567007482052, -0.020433424040675163, -0.00028706141165457666, -0.005092149134725332, -0.018371930345892906, 0.006009449250996113, -0.00645027169957757, 0.015286171808838844, -0.012343033216893673, -0.008628454059362411, -0.010605673305690289, 0.009192448109388351, 0.007500466890633106, -0.013535846956074238, 0.003831267124041915, -0.02956104464828968, 0.0009724028059281409, 0.0034585127141326666, -0.00004074468961334787, -0.025139853358268738, 0.012278205715119839, 0.023519182577729225, -0.012913509272038937, -0.006301170215010643, 0.0037178201600909233, 0.004716153722256422, -0.017905177548527718, 0.009769407100975513, -0.019746258854866028, -0.011675315909087658, 0.007409709505736828, -0.022676432505249977, -0.013406192883849144, 0.003922024741768837, 0.03925914317369461, -0.011325251311063766, -0.014611972495913506, -0.022404160350561142, -0.03311355784535408, 0.0024634203873574734, 0.1057974249124527, 0.014145219698548317, 0.025956671684980392, 0.006878129206597805, -0.019914809614419937, -0.019162818789482117, -0.009231343865394592, -0.04423784464597702, 0.012018898501992226, -0.00921837892383337, 0.02408965863287449, -0.026501217857003212, 0.020225977525115013, 0.005014357157051563, 0.02053714729845524, 0.014521215111017227, -0.002670866437256336, -0.020433424040675163, -0.0015372068155556917, -0.031168751418590546, 0.0051213214173913, 0.006865163799375296, 0.010048162192106247, 0.003795612370595336, -0.009749959222972393, -0.024063728749752045, 0.026449356228113174, 0.00967864878475666, -0.009049829095602036, -0.012284688651561737, -0.02475089207291603, 0.0034844432957470417, -0.00928320549428463, 0.011772556230425835, -0.01811262220144272, -0.01918874867260456, 0.009043346159160137, 0.023843316361308098, 0.02580108679831028, 0.005980277433991432, 0.029327668249607086, -0.008103356696665287, 0.008083908818662167, -0.005490834359079599, 0.021146519109606743, -0.0023499734234064817, -0.03298390284180641, 0.005283388774842024, -0.00043352958164177835, -0.024271173402667046, 0.03181701898574829, -0.000028944177756784484, -0.004479535389691591, -0.002066355897113681, 0.017995934933423996, -0.012783855199813843, 0.013859981670975685, -0.006615580525249243, -0.0008403180981986225, 0.025489918887615204, -0.01789221167564392, -0.03189481049776077, 0.00028949242550879717, -0.03251715004444122, 0.03588814660906792, -0.03500650078058243, -0.007869980297982693, -0.024361930787563324, 0.00451519014313817, -0.018177449703216553, 0.020627904683351517, 0.003249445930123329, 0.010962220840156078, -0.005299595184624195, 0.048023734241724014, -0.0033094107639044523, 0.012971853837370872, -0.02290981076657772, 0.017918141558766365, -0.016245609149336815, -0.013179299421608448, -0.020589008927345276, 0.0037469922099262476, -0.029327668249607086, -0.007383778691291809, 0.013017232529819012, 0.006327101029455662, -0.02689017914235592, -0.004385536536574364, 0.005789037793874741, -0.005597798619419336, -0.004152160137891769, 0.012719028629362583, -0.008220044896006584, -0.01702353172004223, -0.011506766080856323, 0.0042980206198990345, 0.0018702547531574965, -0.0032964455895125866, 0.007267090491950512, -0.009581409394741058, -0.0058182100765407085, -0.005429248791188002, -0.008829417638480663, -0.0030403793789446354, -0.01194110605865717, -0.002591453492641449, 0.005756624508649111, -0.01618078351020813, -0.009821268729865551, -0.00021210535487625748, -0.01768476516008377, -0.0005562954465858638, -0.017451388761401176, -0.015545479021966457, 0.02332470193505287, 0.015960371121764183, 0.02208002656698227, 0.01369143184274435, -0.014495284296572208, -0.007701430004090071, -0.0005567006301134825, 0.027590308338403702, 0.05188741534948349, -0.023609939962625504, -0.017957039177417755, 0.015999266877770424, -0.020900176838040352, 0.003038758644834161, 0.021042795851826668, -0.009814785793423653, 0.0014083633432164788, 0.010897394269704819, -0.0167253278195858, -0.020135220140218735, -0.005273664370179176, -0.009788854978978634, -0.002986897248774767, -0.008764590136706829, -0.006729027256369591, -0.018449721857905388, -0.009166517294943333, -0.002651418326422572, 0.008245975710451603, 0.0034358231350779533, -0.028757192194461823, 0.01511762198060751, -0.008544179610908031, 0.005344973877072334, 0.013924808241426945, -0.003299686824902892, -0.04143732413649559, -0.0008403180981986225, 0.010949255898594856, -0.013600673526525497, -0.03448788449168205, -0.007863497361540794, -0.01809965819120407, -0.00444063963368535, 0.004920358303934336, 0.0330357663333416, -0.008816451765596867, 0.006683648563921452, 0.00823301076889038, -0.015947405248880386, 0.02608632668852806, 0.0037243026308715343, -0.007623638026416302, -0.028031131252646446, 0.027123555541038513, 0.01843675784766674, 0.016712361946702003, 0.040374163538217545, -0.0021538722794502974, 0.01885164901614189, -0.011740143410861492, 0.017490284517407417, -0.0004517621418926865, -0.00034439266892150044, -0.026190048083662987, -0.021729961037635803, 0.0020209772046655416, -0.014521215111017227, -0.01467679999768734, 0.002505557844415307, -0.01061863824725151, 0.015623271465301514, -0.010087057948112488, -0.0031748951878398657, 0.01631043665111065, 0.016375262290239334, -0.013257091864943504, 0.010741809383034706, -0.012932957150042057, -0.002484489232301712, 0.0027324517723172903, 0.00897203665226698, -0.004793945699930191, 0.0043466403149068356, -0.0020047705620527267, 0.0021538722794502974, 0.021263208240270615, -0.0269679706543684, -0.024115590378642082, -0.0025833500549197197, 0.030598275363445282, 0.002772968728095293, 0.01584368385374546, 0.006981851998716593, -0.0037113374564796686, -0.01273199450224638, -0.026280807331204414, -0.02182071842253208, -0.049527715891599655, 0.02195037342607975, -0.008628454059362411, -0.004353123251348734, 0.01064456906169653, -0.009698097594082355, -0.04094463959336281, 0.0238303504884243, 0.0034649954177439213, 0.032802388072013855, 0.0002048123424174264, 0.022507883608341217, 0.03770329803228378, -0.010346366092562675, 0.0028588641434907913, 0.026410460472106934, 0.019085025414824486, 0.008848865516483784, 0.015830717980861664, -0.004469811450690031, 0.013808120042085648, -0.012031864374876022, -0.02099093608558178, -0.006054827943444252, -0.045638103038072586, -0.024050762876868248, 0.014417491853237152, 0.01218744833022356, 0.0032413427252322435, -0.013302470557391644, -0.0003156257444061339, 0.006942956242710352, 0.00542600778862834, -0.0034358231350779533, 0.022067060694098473, -0.013847015798091888, -0.026942040771245956, -0.0334506556391716, -0.01835896447300911, -0.0021036313846707344, -0.001962633104994893, 0.012615305371582508, -0.0186053067445755, 0.01572699472308159, -0.02542509138584137, 0.019422125071287155, -0.013950739055871964, -0.002110114088281989, 0.02052418142557144, -0.0014197081327438354, 0.0010485743405297399, -0.004372571129351854, 0.0069299908354878426, -0.005105114541947842, -0.003756716148927808, -0.015960371121764183, 0.025554746389389038, 0.003516856813803315, 0.005951105151325464, 0.009736993350088596, 0.043459922075271606, -0.008952588774263859, 0.021315069869160652, -0.011318768374621868, -0.016375262290239334, -0.004560569301247597, -0.026656802743673325, 0.004842565860599279, 0.0004894427256658673, -0.023635871708393097, 0.007448605261743069, -0.008965553715825081, 0.0026092808693647385, -0.01999260112643242, -0.007811635732650757, 0.012142069637775421, -0.01375625841319561, -0.02102983184158802, -0.006806819699704647, 0.015869613736867905, -0.0074032265692949295, -0.001892944099381566, -0.0037016132846474648, -0.005322284530848265, 0.03293204307556152, -0.014430457726120949, 0.0418262854218483, -0.012641236186027527, 0.018216345459222794, -0.028290439397096634, 0.02576219104230404, 0.008433973416686058, 0.013963703997433186, 0.030598275363445282, -0.01225227490067482, 0.012051312252879143, 0.0014553628861904144, -0.008822934702038765, 0.01100111659616232, 0.009860164485871792, -0.004388778004795313, -0.01685498282313347, 0.01091035921126604, -0.00033223762875422835, -0.007850532419979572, -0.0006320617976598442, 0.002114976057782769, -0.007532880175858736, 0.01710132323205471, 0.015610306523740292, -0.009036863222718239, 0.008200597018003464, 0.012174483388662338, 0.00447305291891098, 0.0186053067445755, -0.019253576174378395, 0.010638087056577206, -0.02086128108203411, 0.022404160350561142, 0.010437123477458954, 0.0006920266896486282, -0.02128913812339306, -0.009296170435845852, -0.004106780979782343, 0.044808320701122284, -0.013782189227640629, -0.003750233445316553, -0.01181145291775465, 0.02764216996729374, 0.011960554867982864, -0.005043528974056244, 0.006155309733003378, -0.015584375709295273, 0.012433790601789951, -0.021600307896733284, -0.04314875230193138, -0.01214855257421732, -0.024776823818683624, 0.039077628403902054, 0.016271540895104408, 0.000348039175150916, -0.01511762198060751, 0.0014926382573321462, -0.04068533331155777, -0.0020290804095566273, -0.006904060021042824, 0.02099093608558178, 0.017049461603164673, -0.006981851998716593, 0.007364330347627401, 0.007416191976517439, 0.00766253424808383, 0.02153548039495945, -0.002995000686496496, 0.02157437615096569, -0.011312286369502544, -0.009685131721198559, 0.00414891866967082, -0.009672166779637337, -0.01308854203671217, -0.003380720503628254, -0.003168412484228611, 0.013769223354756832, -0.012615305371582508, 0.007973702624440193, 0.001315985107794404, -0.006139102857559919, -0.028212646022439003, 0.0004906582762487233, 0.0006340876570902765, 0.013289504684507847, -0.010359331034123898, -0.02956104464828968, 0.0263456329703331, 0.02621597982943058, 0.005357939284294844, -0.022754225879907608, -0.009393410757184029, 0.007053161505609751, -0.018086692318320274, -0.0012552099069580436, 0.003977127373218536, -0.010839049704372883, -0.01584368385374546, 0.007753291632980108, 0.005951105151325464, 0.02478978969156742, -0.00858955830335617, 0.007280055433511734, 0.013257091864943504, -0.0000065713156800484285, 0.007234676741063595, -0.00413919473066926, -0.01467679999768734, -0.018333034589886665, -0.017658835276961327, -0.01681608520448208, 0.005108356010168791, -0.007630120497196913, 0.008479352109134197, -0.02771996334195137, 0.004567051772028208, -0.018579376861453056, -0.003983610309660435, -0.0023110774345695972, 0.023065393790602684, 0.04281165450811386, -0.015273206867277622, -0.006696613971143961, 0.002272181212902069, -0.008356180973351002, -0.014508250169456005, -0.0066090975888073444, 0.00827838946133852, -0.016906842589378357, 0.003750233445316553, -0.008524730801582336, -0.0022802846506237984, -0.005156976170837879, -0.009633270092308521, -0.035940006375312805, -0.004323950968682766, 0.027771824970841408, 0.19261354207992554, -0.014547145925462246, -0.006657717749476433, 0.013808120042085648, -0.021340999752283096, 0.011869796551764011, 0.024115590378642082, 0.014080392196774483, 0.0023856281768530607, 0.0005133476224727929, -0.016206713393330574, 0.01723097823560238, 0.008012599311769009, 0.0019723570439964533, 0.006560477428138256, -0.040996503084897995, -0.010657534934580326, 0.00037032339605502784, -0.027875546365976334, -0.011727177537977695, -0.00768198212608695, -0.007299503777176142, -0.011202080175280571, -0.01939619518816471, 0.039622172713279724, -0.011668833903968334, -0.015830717980861664, 0.016919808462262154, 0.03207632899284363, 0.015960371121764183, -0.01093629002571106, -0.016842016950249672, -0.008336733095347881, -0.013244125992059708, -0.011999450623989105, -0.020122256129980087, -0.007422674912959337, -0.02501020021736622, -0.008505282923579216, -0.005526489112526178, -0.0011830900330096483, 0.01773662678897381, 0.010709396563470364, -0.007267090491950512, 0.015999266877770424, 0.02604742906987667, -0.013315435498952866, 0.01621967926621437, -0.02082238532602787, -0.01689387857913971, -0.0439007468521595, -0.03358031064271927, 0.000994281843304634, 0.03726247698068619, -0.02208002656698227, 0.000011990435268671717, 0.006949438713490963, 0.020433424040675163, 0.00515373470261693, -0.031298406422138214, 0.0031116888858377934, 0.015701064839959145, -0.02813485451042652, -0.007377295754849911, 0.007461570668965578, 0.03985555097460747, -0.010975186713039875, -0.025697365403175354, 0.0397258959710598, -0.026319703087210655, -0.0030403793789446354, -0.010067610070109367, -0.002486109733581543, -0.0088812792673707, 0.0017438423819839954, -0.001923736883327365, 0.017827384173870087, 0.006220136769115925, 0.010255607776343822, 0.001199296792037785, -0.01772366091609001, 0.035136155784130096, -0.0061066895723342896, -0.010735327377915382, -0.010651051998138428, -0.026151152327656746, 0.006981851998716593, 0.006622062996029854, -0.010048162192106247, -0.0009124379721470177, -0.00419105589389801, -0.019668467342853546, 0.00012296844215597957, 0.004894427489489317, 0.006852198392152786, 0.010437123477458954, 0.005908967927098274, 0.0038247844204306602, -0.008103356696665287, -0.006456754636019468, -0.028653468936681747, 0.018216345459222794, 0.032205980271101, 0.00022101905778981745, -0.029664767906069756, -0.008155218325555325, 0.03871459513902664, 0.03394334018230438, 0.005860347766429186, -0.013600673526525497, -0.016958704218268394, 0.006372479721903801, 0.0012543996563181281, -0.01911095716059208, -0.010437123477458954, 0.008356180973351002, -0.012855164706707, -0.008472870104014874, 0.019370263442397118, -0.029457321390509605, 0.0034487885423004627, -0.015415825881063938, -0.00047364120837301016, 0.008887761272490025, -0.0020015290938317776, 0.010501950047910213, -0.007500466890633106, -0.0017470837337896228, 0.01717911660671234, -0.024063728749752045, 0.026734594255685806, -0.024556411430239677, 0.0013573121977970004, -0.00010007645323639736, -0.00450546620413661, 0.007513432297855616, 0.027201347053050995, 0.003426099196076393, -0.022183749824762344, 0.002813485451042652, 0.008064460940659046, 0.002243009163066745, 0.009899060241878033, 0.010988151654601097, -0.004790704697370529, -0.004638361278921366, 0.006025656126439571, -0.010605673305690289, -0.01625857502222061, -0.020342666655778885, -0.016090024262666702, -0.026410460472106934, 0.0121226217597723, -0.009406376630067825, 0.0023759042378515005, -0.0273828636854887, -0.015260240994393826, -0.004832841921597719, -0.0007702240254729986, 0.01856641098856926, -0.031039098277688026, 0.0073967440985143185, 0.018721995875239372, -0.023026498034596443, -0.008200597018003464, -0.023480286821722984, -0.16450461745262146, 0.025710329413414, 0.01681608520448208, -0.009023898281157017, 0.023428425192832947, -0.022754225879907608, 0.027616240084171295, 0.015234310179948807, -0.009224860928952694, 0.005166700109839439, 0.0008131718495860696, 0.0038507150020450354, -0.03153178095817566, -0.0026757284067571163, 0.003335341578349471, 0.00672254478558898, -0.030546413734555244, 0.036277107894420624, 0.017256908118724823, 0.0010526260593906045, 0.0053125605918467045, -0.02091314271092415, -0.0016555157490074635, -0.0012454859679564834, 0.023467320948839188, 0.009497134014964104, 0.0046351198107004166, 0.005380628630518913, -0.021691065281629562, -0.013062611222267151, -0.048023734241724014, -0.0008427490829490125, 0.017321735620498657, 0.021340999752283096, 0.011740143410861492, 0.012219862081110477, -0.012984818778932095, 0.007020748220384121, -0.015130587853491306, -0.016193747520446777, 0.0071439193561673164, 0.03236156702041626, 0.024997234344482422, 0.01185683161020279, 0.010735327377915382, 0.04636416584253311, 0.014599007554352283, -0.009004450403153896, 0.019383229315280914, -0.009607339277863503, -0.00414891866967082, -0.008336733095347881, -0.019888877868652344, -0.0005830365116707981, 0.02771996334195137, 0.005620488431304693, -0.00701426574960351, 0.013730327598750591, 0.014145219698548317, 0.011331734247505665, -0.021807754412293434, 0.022857949137687683, 0.01593444123864174, -0.0031343784648925066, 0.001282761339098215, -0.028627539053559303, 0.013354332186281681, 0.0034098925534635782, -0.014689764939248562, -0.004784221760928631, -0.015208380296826363, -0.00796722061932087, -0.008693280629813671, -0.02311725541949272, 0.011629937216639519, -0.012323584407567978, -0.03243935853242874, 0.007643085904419422, 0.00766253424808383, 0.0028702090494334698, -0.017412493005394936, 0.026267841458320618, 0.010884428396821022, -0.03448788449168205, 0.004327192436903715, 0.018838683143258095, -0.02228747308254242, -0.014702730812132359, -0.01020374707877636, -0.027694031596183777, 0.006122896447777748, -0.004252641461789608, -0.012686614878475666, -0.008829417638480663, 0.03319134935736656, 0.01789221167564392, 0.021250242367386818, -0.006683648563921452, 0.009412859566509724, -0.02294870652258396, 0.0009659201023168862, -0.008336733095347881, -0.019603639841079712, -0.012116138823330402, 0.009775889106094837, 0.03993334248661995, 0.009892578236758709, 0.017153184860944748, 0.015545479021966457, -0.01288109552115202, -0.020433424040675163, 0.013652535155415535, 0.022170783951878548, 0.024102624505758286, -0.003623821074143052, 0.03230970352888107, 0.01852751523256302, -0.03132433444261551, -0.017218012362718582, 0.011279872618615627, 0.052250444889068604, 0.005604281555861235, 0.010722361505031586, 0.006155309733003378, -0.016362298280000687, 0.0038020950742065907, -0.1179330125451088, 0.0006563718779943883, 0.006923507899045944, 0.010300987400114536, 0.010313952341675758, 0.016128921881318092, 0.010683465749025345, 0.032050397247076035, -0.0040808506309986115, 0.011318768374621868, -0.021016865968704224, -0.05787741392850876, -0.018786821514368057, -0.03155771270394325, 0.010994634591042995, -0.00672254478558898, 0.010605673305690289, -0.029042430222034454, -0.018294138833880424, 0.01147435326129198, -0.0367957204580307, 0.016906842589378357, 0.010385261848568916, -0.006301170215010643, -0.014547145925462246, -0.004356364719569683, -0.03181701898574829, -0.0031505851075053215, 0.004936564713716507, 0.012952405028045177, 0.010398227721452713, -0.018164483830332756, 0.01794407330453396, -0.020977970212697983, -0.0003221084189135581, 0.007617155089974403, 0.0036173383705317974, -0.01026209071278572, 0.037651438266038895, -0.015662167221307755, 0.011156701482832432, -0.014599007554352283, -0.00417160801589489, -0.03412485495209694, 0.010022231377661228, 0.004084091633558273, -0.005659384187310934, -0.0012973473640158772, 0.02266346849501133, -0.015195414423942566, -0.021211346611380577, -0.01056029461324215, -0.008284871466457844, -0.001761669758707285, 0.005711245816200972, 0.009205413050949574, 0.008997967466711998, -0.021470654755830765, -0.02379145473241806, 0.013872946612536907, -0.004845807328820229, -0.016193747520446777, -0.003912300802767277, 0.00304200011305511, -0.002687073079869151, -0.007617155089974403, 0.003983610309660435, -0.028575677424669266, 0.012939440086483955, -0.004434156697243452, -0.020381562411785126, 0.0030338966753333807, -0.022131888195872307, 0.0012187449028715491, -0.020251909270882607, 0.003640027716755867, -0.018449721857905388, 0.008557144552469254, 0.029042430222034454, -0.00807094294577837, -0.025502884760499, -0.025852948427200317, 0.03057234361767769, -0.032205980271101, 0.011779039166867733, 0.007481019012629986, -0.010112988762557507, 0.017114289104938507, 0.011623455211520195, -0.01751621626317501, -0.009341550059616566, -0.005238009616732597, -0.013561777770519257, -0.005001391749829054, -0.014702730812132359, 0.008609006181359291, -0.009568443521857262, 0.00857011042535305, 0.0027049004565924406, 0.009101689793169498, -0.018294138833880424, -0.0010202126577496529, -0.07286538183689117, 0.01214855257421732, -0.011403043754398823, 0.0032656528055667877, 0.0046221548691391945, -0.017568077892065048, 0.019136887043714523, -0.022546779364347458, -0.0037826469633728266, -0.004913875367492437, -0.01572699472308159, 0.034306369721889496, 0.013509916141629219, -0.014158184640109539, -0.011014082469046116, -0.010787188075482845, 0.005027322564274073, 0.002033942611888051, 0.017218012362718582, 0.02478978969156742, -0.010430640541017056, 0.0027437966782599688, 0.00802556425333023, -0.01406742725521326, 0.0038442325312644243, 0.0035038914065808058, -0.003345065750181675, 0.02386924810707569, -0.00384747376665473, -0.012550478801131248, 0.0008500420954078436, -0.012025381438434124, 0.015662167221307755, 0.019914809614419937, 0.029846282675862312, -0.026656802743673325, -0.006203929893672466, -0.011033530347049236, 0.04947585612535477, 0.03575849160552025, -0.007960737682878971, -0.024984268471598625, 0.013548812828958035, -0.02484164945781231, -0.01406742725521326, 0.011681798845529556, -0.022806087508797646, 0.0018378413515165448, 0.030961304903030396, 0.007928323931992054, 0.03251715004444122, 0.010884428396821022, 0.002808623481541872, -0.008466387167572975, 0.02379145473241806, -0.019162818789482117, 0.05357291176915169, -0.0044049848802387714, -0.0040581608191132545, -0.013471020385622978, 0.020718662068247795, 0.00829783733934164, -0.01685498282313347, -0.004100298509001732, -0.000024132808903232217, -0.014482319355010986, -0.03404706344008446, 0.007876462303102016, 0.0011855211341753602, -0.0405556783080101, -0.01225227490067482, -0.006268756929785013, 0.015312102623283863, 0.015299137681722641, 0.013548812828958035, 0.014560110867023468, 0.01471569575369358, -0.002121458761394024, -0.01100111659616232, 0.00015933225222397596, 0.01965550146996975, -0.003769681556150317, -0.02826450765132904, 0.01413225382566452, 0.029198015108704567, 0.048568278551101685, -0.005461662542074919, 0.014274872839450836, 0.0036529931239783764, 0.005160217639058828, 0.0010145402047783136, 0.017243942245841026, -0.006793854292482138, 0.0005344163510017097, 0.01341915875673294, 0.019538814201951027, -0.003721061395481229, -0.01056029461324215, 0.005033805035054684, 0.03562884032726288, -0.004832841921597719, 0.012997783720493317, -0.006443789228796959, -0.015817752107977867, -0.015947405248880386, 0.023208012804389, -0.019590675830841064, -0.0267605260014534, -0.008045012131333351, 0.0018005658639594913, 0.022935740649700165, -0.006323859561234713, -0.0033677550964057446, 0.02027783915400505, -0.020433424040675163, 0.01689387857913971, -0.027019832283258438, -0.040166717022657394, -0.0001858707400970161, 0.009393410757184029, 0.0010169713059440255, 0.00733839999884367, 0.00923782680183649, -0.011007599532604218, 0.022339332848787308, 0.01406742725521326, 0.01659567467868328, -0.021794788539409637, -0.019085025414824486, -0.008245975710451603, 0.016323402523994446, -0.0023759042378515005, -0.0077208783477544785, -0.001962633104994893, 0.0036108556669205427, -0.0008832658641040325, -0.0267605260014534, 0.02873126231133938, -0.022935740649700165, 0.02412855438888073, -0.005513523705303669, 0.00507918419316411, 0.005951105151325464, 0.005173183046281338, 0.005001391749829054, -0.0177625585347414, 0.015130587853491306, -0.01999260112643242, -0.0192406103014946, 0.02140582725405693, -0.007377295754849911, 0.02927580662071705, -0.015104657039046288, -0.01216800045222044, 0.0034552712459117174, -0.003481202060356736, 0.013561777770519257, 0.0022592158056795597, -0.01183090079575777, 0.013665501028299332, 0.017075393348932266, 0.008511765860021114, -0.007409709505736828, -0.0014261907199397683, -0.003058206755667925, 0.0031424816697835922, 0.0021846650633960962, -0.000989419873803854, -0.022144854068756104, 0.0036270625423640013, -0.006233102176338434, -0.016504917293787003, 0.003999816719442606, 0.017931107431650162, -0.025956671684980392, 0.021626237779855728, 0.002192768268287182, -0.001260882243514061, 0.018721995875239372, -0.023493250831961632, 0.030598275363445282, -0.011616972275078297, -0.019331367686390877, 0.01505279541015625, 0.01505279541015625, 0.004524914547801018, 0.0019042887724936008, -0.014962038025259972]
```
Words that are semantically similar are often represented by vectors that are close to each other in this vector space. This allows for mathematical operations like addition and subtraction to carry semantic meaning. For example, the vector representation of "king" minus "man" plus "woman" should be close to the vector representation of "queen." In other words, vector embeddings are a numerical representation of a particular data object.
A vector index allows you to retrieve a neighborhood of nodes or relationships based on the similarity between the embedding properties of those nodes or relationships and the ones specified in the query.
## Create vector indexes
A vector index is created by using the `CREATE VECTOR INDEX [index_name]` command. It is recommended to give the index a name when it is created. If no name is given when created, a random name will be assigned. The index name can also be given as a parameter: `CREATE VECTOR INDEX $name …`.
| Neo4j version | Capabilities |
| --- | --- |
| **5.13 (general availability)** | Supports single-label, single-property index for nodes or single-relationship-type, single-property index for relationships. Vectors stored as `LIST ` properties. |
| **2025.10** | Adds support for `VECTOR` value properties validated against index dimensions and the configured vector similarity function. |
| **2026.01** | Adds support for multi-label and multi-relationship-type vector indexes with additional properties used for filtering. These properties can later be used in [vector search with filters using ](https://neo4j.com/docs/cypher-manual/current/clauses/search/#vector-search-filtering)`SEARCH … WHERE`, but they cannot be vector properties. A vector index can store only one vector property per node or relationship. |
| **2026.07** | Adds support for High Fidelity Quantized (HFQ) vector search, which can be enabled [in the index configuration](#configuration-settings). |
| | The index name must be unique among both indexes and constraints. A newly created index is not immediately available but is created in the background. |
| --- | --- |
| | Creating indexes requires [the ](https://neo4j.com/docs/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index)`CREATE INDEX`[ privilege](https://neo4j.com/docs/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index). |
| --- | --- |
```cypher
CREATE VECTOR INDEX moviePlots IF NOT EXISTS
FOR (m:Movie)
ON m.embedding
OPTIONS { indexConfig: {
\`vector.dimensions\`: 1536,
\`vector.similarity_function\`: 'cosine'
}}
```
The `CREATE VECTOR INDEX` command is optionally idempotent. This means that its default behavior is to throw an error if an attempt is made to create the same index twice. With `IF NOT EXISTS`, no error is thrown and nothing happens should an index with the same name, schema or both already exist. It may still throw an error should a constraint with the same name exist. An informational notification is returned when nothing happens, showing the existing index which blocks the creation.
To read more about the available configuration settings, see [Configuration settings](#configuration-settings). In the above example, the vector dimension is explicitly set to `1536`. Providing dimensions when creating a vector index is recommended, as it ensures that only vectors of that size are indexed and makes dimension mismatches fail clearly at query time. The vector similarity function is set to `'cosine'`, which is generally the preferred similarity function for text embeddings. To read more about the available similarity functions, see [Cosine and Euclidean similarity functions](#similarity-functions).
You can also create a vector index for relationships with a particular type on a given property using the following syntax:
```cypher
CREATE VECTOR INDEX name IF NOT EXISTS
FOR ()-[r:REL_TYPE]-() ON (r.embedding)
OPTIONS { indexConfig: {
\`vector.dimensions\`: $dimension,
\`vector.similarity_function\`: $similarityFunction
}}
```
Like full-text indexes, vector indexes may be created for multiple labels or relationship types. In that case, all nodes with *at least one* label matching *at least one* of the labels or a relationship whose type matches *at least one* of the relationship types are included as long as they have the vector property.
In contrast to multi-property full-text indexes, the vector property is the only property to determine if the node or relationship is included in the index. The additional properties will only be included in the index if they are of one of the types `INTEGER`, `FLOAT`, `STRING`, `BOOLEAN`, `DATE`, `ZONED DATETIME`, `LOCAL DATETIME`, `ZONED TIME`, `LOCAL TIME` or `DURATION`. If the node or relationship does not have an additional property or if the additional property is of another type, it is treated as `null` by the index.
You can create a vector index on multiple labels with additional properties for filtering using the following query:
```cypher
CREATE VECTOR INDEX multiLabelAdditionalProperties IF NOT EXISTS
FOR (n:Movie|Actor)
ON n.embedding
WITH [n.title, n.plot, n.name, n.born]
OPTIONS { indexConfig: {
\`vector.dimensions\`: 1536,
\`vector.similarity_function\`: 'cosine'
}}
```
And similarly for relationships on multiple relationship types with additional properties using the following syntax:
```cypher
CREATE VECTOR INDEX name IF NOT EXISTS
FOR ()-[r:REL_TYPE1|REL_TYPE2|REL_TYPE3]-()
ON (r.embedding)
WITH [r.property]
OPTIONS { indexConfig: {
\`vector.dimensions\`: $dimension,
\`vector.similarity_function\`: $similarityFunction
}}
```
### Configuration settings
For more information about the values accepted by different index providers, see [Vector index providers for compatibility](#vector-index-providers).
#### vector.dimensions
The dimensions of the vectors to be indexed. For more information, see [Vectors and embeddings in Neo4j](#embeddings). This setting can be omitted, and any `LIST` or, as of Neo4j 2025.10, additionally `VECTOR` value can be indexed and queried, separated by their dimensions, *though only vectors of the same dimension can be compared.* Setting this value adds additional checks that ensure only vectors with the configured dimensions are indexed, and querying the index with a vector of a different dimension returns an error.
| | It is recommended to provide dimensions when creating a vector index. Doing so avoids the confusing situation where the same index may contain side-by-side vectors of different dimensions, while still only allowing comparisons between vectors of the same dimension. |
| --- | --- |
Accepted values
`INTEGER` between `1` and `4096` inclusively.
Default value
None.
#### vector.similarity_function
The name of the similarity function used to assess the similarity of two vectors. To read more about the available similarity functions, see [Cosine and Euclidean similarity functions](#similarity-functions).
Accepted values
`STRING`: `'cosine'`, `'euclidean'`.
Default value
`'cosine'`.
#### vector.default_search_expansion_factorIntroduced in Neo4j 2026.07
Scales the number of nearest neighbors to query the vector index, while returning the originally requested number of nearest neighbors. Setting this value above `1.0` can increase accuracy at the cost of query time.
Accepted values
`FLOAT`: between `1.0` and `10_000.0` *inclusive*.
Default values
Dependent upon the value of `vector.quantization.type`.
| Value of `vector.quantization.type` | Default value `vector.default_search_expansion_factor` |
| --- | --- |
| `'none'` | `1.0` |
| `'scalar'` | `1.5` |
| `'binary'` | `3.0` |
#### vector.quantization.enabledDeprecated in Neo4j 2026.06
Quantization is a technique to reduce the size of vector representations. Enabling quantization can accelerate search performance but can slightly decrease accuracy. It is recommended to enable quantization on machines with limited memory.
Accepted values
`BOOLEAN`: `true`, `false`.
Default value
`true`
#### vector.quantization.typeIntroduced in Neo4j 2026.06
Quantization is a technique to reduce the size of vector representations. Setting a quantization type can accelerate search performance but decrease accuracy. Binary quantization is a more aggressive form of Scalar quantization, reducing each dimension to a single bit. If `vector.default_search_expansion_factor` is set larger than `1.0` with binary quantization, the returned nearest neighbors are rescored with their unquantized vector values to increase accuracy (High Fidelity Quantized vector search).
It is recommended to use quantization on machines with limited memory.
Accepted values
`STRING`: `'none'`, `'scalar'`, `'binary'`.
Default value
`'binary'`
| | Prior to the release of Neo4j 2026.08, the default value for this setting was `'scalar'`. |
| --- | --- |
### Advanced configuration settings
#### vector.hnsw.m
The `M` parameter controls the maximum number of connections each node has in the HNSW (Hierarchical Navigable Small Worlds) graph. Increasing this value may lead to greater accuracy at the expense of increased index population and update times, especially for vectors with high dimensionality.
Accepted values
`INTEGER` between `1` and `512` inclusively.
Default value
`16`
#### vector.hnsw.ef_construction
The number of nearest neighbors tracked during the insertion of vectors into the HNSW graph. Increasing this value increases the quality of the index, and may lead to greater accuracy (with diminishing returns) at the expense of increased index population and update times.
Accepted values
`INTEGER` between `1` and `3200` inclusively.
Default value
`100`
## Query vector indexes
As of Neo4j 2026.01, the preferred way of querying vector indexes is by using the Cypher [SEARCH](https://neo4j.com/docs/cypher-manual/current/clauses/search/) clause. A less powerful alternative, which also works for earlier Neo4j versions, is using the procedures [db.index.vector.queryNodes](https://neo4j.com/docs/operations-manual/current/procedures/built-in-procedures/#procedure_db_index_vector_queryNodes) and [db.index.vector.queryRelationships](https://neo4j.com/docs/operations-manual/current/procedures/built-in-procedures/#procedure_db_index_vector_queryRelationships). These procedures are deprecated as of Neo4j 2026.04.
Vector index scores are meaningful within the result set from a vector query. When combining vector results with full-text results or other scored sources, rank each source independently rather than comparing raw score values directly. For more information, see [Developer Guide → Hybrid search](https://neo4j.com/developer/genai-ecosystem/hybrid-search/).
| | An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created. To check the `state` of a vector index — whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) — run the following command: `SHOW VECTOR INDEXES`. |
| --- | --- |
### Querying a node vector index using the SEARCH clause
The `SEARCH` clause returns the neighborhood of nodes, optionally with their respective similarity scores, ordered by those scores. The scores are bounded between `0.0` and `1.0`, where the closer to `1.0` the score is, the more similar the indexed vector is to the query vector.
```cypher
MATCH (m:Movie {title: 'Godfather, The'})
MATCH (movie: Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR m.embedding
LIMIT 5
) SCORE AS score
RETURN movie.title AS title, movie.plot AS plot, score
```
Result
```js
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| title | plot | score |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "Godfather, The" | "The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son." | 0.9999999403953552 |
| "Godfather: Part III, The" | "In the midst of trying to legitimize his business dealings in New York and Italy in 1979, aging Mafia don Michael Corleone seeks to avow for his sins while taking a young protégé under his wing." | 0.9648237824440002 |
| "Godfather: Part II, The" | "The early life and career of Vito Corleone in 1920s New York is portrayed while his son, Michael, expands and tightens his grip on his crime syndicate stretching from Lake Tahoe, Nevada to pre-revolution 1958 Cuba." | 0.954778790473938 |
| "Scarface" | "An ambitious and near insanely violent gangster climbs the ladder of success in the mob, but his weaknesses prove to be his downfall." | 0.9367182850837708 |
| "Jane Austen's Mafia!" | "Takeoff on the Godfather with the son of a mafia king taking over for his dying father" | 0.9366796016693115 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
All movies returned have a plot centered around criminal family organizations. The `score` results are returned in *descending order*, where the best matching result entry is put first. `The Godfather` has a similarity score of `1.0` because the index was queried with this specific property. To exclude the query vector, add the predicate `WHERE score < 1`.
### Querying a node vector index using the db.index.vector.queryNodes() procedure
```syntax
db.index.vector.queryNodes(indexName :: STRING, numberOfNearestNeighbours :: INTEGER, query :: ANY) :: (node :: NODE, score :: FLOAT)
```
- The `indexName` refers to the unique name of the vector index to query.
- The `numberOfNearestNeighbours` refers to the number of nearest neighbors to return.
- The `query` refers to the `LIST` or, as of Neo4j 2025.10, additionally the `VECTOR` of which the neighborhood should be searched.
The procedure returns the neighborhood of nodes with their respective similarity scores, ordered by those scores. The scores are bounded between `0` and `1`, where the closer to `1` the score is, the more similar the indexed vector is to the query vector.
```cypher
MATCH (m:Movie {title: 'Godfather, The'})
CALL db.index.vector.queryNodes('moviePlots', 5, m.embedding)
YIELD node AS movie, score
RETURN movie.title AS title, movie.plot AS plot, score
```
Result
```js
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| title | plot | score |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "Godfather, The" | "The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son." | 0.9999999403953552 |
| "Godfather: Part III, The" | "In the midst of trying to legitimize his business dealings in New York and Italy in 1979, aging Mafia don Michael Corleone seeks to avow for his sins while taking a young protégé under his wing." | 0.9648237824440002 |
| "Godfather: Part II, The" | "The early life and career of Vito Corleone in 1920s New York is portrayed while his son, Michael, expands and tightens his grip on his crime syndicate stretching from Lake Tahoe, Nevada to pre-revolution 1958 Cuba." | 0.954778790473938 |
| "Scarface" | "An ambitious and near insanely violent gangster climbs the ladder of success in the mob, but his weaknesses prove to be his downfall." | 0.9367182850837708 |
| "Jane Austen's Mafia!" | "Takeoff on the Godfather with the son of a mafia king taking over for his dying father" | 0.9366796016693115 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
Note that all movies returned have a plot centred around criminal family organizations. The `score` results are returned in *descending order*, where the best matching result entry is put first (in this case, `The Godfather` has a similarity score of `1.0`, which is to be expected as the index was queried with this specific property). If the query vector itself is not wanted, adding the predicate `WHERE score < 1` removes identical vectors.
### Querying a relationship vector index
To query a relationship vector index, use the Cypher [SEARCH](https://neo4j.com/docs/cypher-manual/current/clauses/search/) clause or the `db.index.vector.queryRelationships` procedure in a similar manner as shown for node vector indexes above.
```syntax
db.index.vector.queryRelationships(indexName :: STRING, numberOfNearestNeighbours :: INTEGER, query :: ANY) :: (relationship :: RELATIONSHIP, score :: FLOAT)
```
`db.index.vector.queryRelationships()` has the same argument descriptions as `db.index.vector.queryNodes()`.
| | Use [Vector functions](https://neo4j.com/docs/cypher-manual/current/functions/vector/) to compute the similarity score between two specific vector pairs without using a vector index. |
| --- | --- |
## Performance suggestions
Vector indexes can take advantage of the incubated Java Vector API for noticeable speed improvements. If you are using a compatible version of Java, you can add the following setting to your [configuration settings](https://neo4j.com/docs/operations-manual/current/configuration/configuration-settings/#config_server.jvm.additional):
Configuration settings
```config
server.jvm.additional=--add-modules=jdk.incubator.vector
```
Starting with Neo4j 2026.08, the `jdk.incubator.vector` module is enabled by default. For details, see the [Operations manual → Changes in Neo4j 2025-2026 series](https://neo4j.com/docs/operations-manual/current/changes-2025-2026/#vector-api-changes).
| | While the Neo4j 5 series requires at least Java 17, *at least* Java 20 is necessary to take advantage of this performance improvement in Neo4j 5.14-5.26. If you are using Neo4j 2025.01 or later, Java 21 is required. For more information about what Java versions are supported by different Neo4j versions, see the [Operations Manual → System requirements → Java](https://neo4j.com/docs/operations-manual/current/installation/requirements/#deployment-requirements-java). |
| --- | --- |
## Show vector indexes
To show all vector indexes in a database, use the `SHOW VECTOR INDEXES` command. This is the same `SHOW`[ command as for other indexes](https://neo4j.com/docs/cypher-manual/current/indexes/performance-indexes/list-indexes/), with the index type filtering on `VECTOR`.
| | Showing indexes requires [the ](https://neo4j.com/docs/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index)`SHOW INDEX`[ privilege](https://neo4j.com/docs/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index). |
| --- | --- |
Example 1. Show all vector indexes
```cypher
SHOW VECTOR INDEXES
```
Result
```js
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | name | state | populationPercent | type | entityType | labelsOrTypes | properties | indexProvider | owningConstraint | lastRead | readCount |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | "moviePlots" | "ONLINE" | 100.0 | "VECTOR" | "NODE" | ["Movie"] | ["embedding"] | "vector-2026.08" | NULL | 2026-08-24T12:10:35.169Z | 2 |
| 2 | "multiLabelAdditionalProperties" | "ONLINE" | 100.0 | "VECTOR" | "NODE" | ["Movie", "Actor"] | ["embedding", "title", "plot", "name", "born"] | "vector-2026.08" | NULL | NULL | 0 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
For a full description of all return columns, see [Performance indexes → Show indexes → Return columns](https://neo4j.com/docs/cypher-manual/current/indexes/performance-indexes/list-indexes/#show-indexes-result-columns).
Example 2. Show vector indexes with full or filtered details
To return full vector index details, use `YIELD *`.
```cypher
SHOW VECTOR INDEXES YIELD *
```
Result
```js
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | name | state | populationPercent | type | entityType | labelsOrTypes | properties | indexProvider | owningConstraint | lastRead | readCount | trackedSince | options | failureMessage | createStatement |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | "moviePlots" | "ONLINE" | 100.0 | "VECTOR" | "NODE" | ["Movie"] | ["embedding"] | "vector-2026.08" | NULL | 2026-08-24T12:10:35.169Z | 2 | 2026-08-24T12:08:41.009Z | {indexConfig: {\`vector.dimensions\`: 1536, \`vector.default_search_expansion_factor\`: 3.0, \`vector.hnsw.m\`: 16, \`vector.quantization.type\`: "BINARY", \`vector.similarity_function\`: "COSINE", \`vector.hnsw.ef_construction\`: 100}} | "" | "CREATE VECTOR INDEX \`moviePlots\` FOR (n:\`Movie\`) ON (n.\`embedding\`) OPTIONS {indexConfig: {\`vector.default_search_expansion_factor\`: 3.0,\`vector.dimensions\`: 1536,\`vector.hnsw.ef_construction\`: 100,\`vector.hnsw.m\`: 16,\`vector.quantization.type\`: 'BINARY',\`vector.similarity_function\`: 'COSINE'}}" |
| 2 | "multiLabelAdditionalProperties" | "ONLINE" | 100.0 | "VECTOR" | "NODE" | ["Movie", "Actor"] | ["embedding", "title", "plot", "name", "born"] | "vector-2026.08" | NULL | NULL | 0 | 2026-08-24T12:08:53.602Z | {indexConfig: {\`vector.dimensions\`: 1536, \`vector.default_search_expansion_factor\`: 3.0, \`vector.hnsw.m\`: 16, \`vector.quantization.type\`: "BINARY", \`vector.similarity_function\`: "COSINE", \`vector.hnsw.ef_construction\`: 100}} | "" | "CREATE VECTOR INDEX \`multiLabelAdditionalProperties\` FOR (n:\`Movie\`|\`Actor\`) ON (n.\`embedding\`) WITH [n.\`title\`, n.\`plot\`, n.\`name\`, n.\`born\`] OPTIONS {indexConfig: {\`vector.default_search_expansion_factor\`: 3.0,\`vector.dimensions\`: 1536,\`vector.hnsw.ef_construction\`: 100,\`vector.hnsw.m\`: 16,\`vector.quantization.type\`: 'BINARY',\`vector.similarity_function\`: 'COSINE'}}" |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
To return only specific details, specify the desired column name(s) after the `YIELD` clause.
```cypher
SHOW VECTOR INDEXES YIELD name, type, entityType, labelsOrTypes, properties
```
Result
```js
+--------------------------------------------------------------------------------------------------------------------------------+
| name | type | entityType | labelsOrTypes | properties |
+--------------------------------------------------------------------------------------------------------------------------------+
| "moviePlots" | "VECTOR" | "NODE" | ["Movie"] | ["embedding"] |
| "multiLabelAdditionalProperties" | "VECTOR" | "NODE" | ["Movie", "Actor"] | ["embedding", "title", "plot", "name", "born"] |
+--------------------------------------------------------------------------------------------------------------------------------+
```
## Drop vector indexes
A vector index is dropped by using the [same command as for other indexes](https://neo4j.com/docs/cypher-manual/current/indexes/performance-indexes/drop-indexes/), `DROP INDEX`. It is possible to drop vector indexes created in a different Cypher version than the one in use. For example, although the multiple labels or additional properties were added in Cypher 25, such indexes can still be dropped using Cypher 5.
The index name can also be given as a parameter when dropping an index: `DROP INDEX $name`.
| | Dropping indexes requires [the ](https://neo4j.com/docs/operations-manual/current/database-administration/authentication-authorization/database-administration/#access-control-database-administration-index)`DROP INDEX`[ privilege](https://neo4j.com/docs/operations-manual/current/database-administration/authentication-authorization/database-administration/#access-control-database-administration-index). |
| --- | --- |
```cypher
DROP INDEX moviePlots
```
## Vector index providers for compatibility
Neo4j automatically selects the latest provider when creating a vector index: it is not possible to specify an index provider explicitly in Cypher 25. Indexes created with older providers will continue to function.
```cypher
SHOW VECTOR INDEXES YIELD name, type, indexProvider
```
Learn more about the `vector-2026.08` provider **(latest)** Introduced in Neo4j 2026.08
| Feature | Capability |
| --- | --- |
| Index schema | multi-label, multi-property index for nodes. multi-type, multi-property index for relationships. Only one vector property can be stored per node or relationship. Any additional properties included in the index must be one of the following types: `INTEGER`, `FLOAT`, `STRING`, `BOOLEAN`, `DATE`, `ZONED DATETIME`, `LOCAL DATETIME`, `ZONED TIME`, `LOCAL TIME` or `DURATION`. |
| Indexed property value type | `VECTOR` or `LIST`. |
| Indexed vector dimension | `INTEGER` between `1` and `4096` *inclusive*. |
| Indexed vector quantization | High Fidelity Quantized vector search for binary quantization. `'binary'` is the default quantization type. |
| Indexed hnsw settings | Supported |
| [Cosine similarity vector validity](#similarity-functions) | All vector components can be represented finitely in IEEE 754 ***double*** precision. Its -norm is non-zero and can be represented finitely in IEEE 754 ***double*** precision. The ratio of each vector component with its -norm can be represented finitely in IEEE 754 ***single*** precision. |
Learn more about the `vector-2026.07` provider Introduced in Neo4j 2026.07
| Feature | Capability |
| --- | --- |
| Index schema | multi-label, multi-property index for nodes. multi-type, multi-property index for relationships. Only one vector property can be stored per node or relationship. Any additional properties included in the index must be one of the following types: `INTEGER`, `FLOAT`, `STRING`, `BOOLEAN`, `DATE`, `ZONED DATETIME`, `LOCAL DATETIME`, `ZONED TIME`, `LOCAL TIME` or `DURATION`. |
| Indexed property value type | `VECTOR` or `LIST`. |
| Indexed vector dimension | `INTEGER` between `1` and `4096` *inclusive*. |
| Indexed vector quantization | High Fidelity Quantized vector search for scalar and binary quantization. |
| Indexed hnsw settings | Supported |
| [Cosine similarity vector validity](#similarity-functions) | All vector components can be represented finitely in IEEE 754 ***double*** precision. Its -norm is non-zero and can be represented finitely in IEEE 754 ***double*** precision. The ratio of each vector component with its -norm can be represented finitely in IEEE 754 ***single*** precision. |
Learn more about the `vector-2026.06` provider Introduced in Neo4j 2026.06
| Feature | Capability |
| --- | --- |
| Index schema | multi-label, multi-property index for nodes. multi-type, multi-property index for relationships. Only one vector property can be stored per node or relationship. Any additional properties included in the index must be one of the following types: `INTEGER`, `FLOAT`, `STRING`, `BOOLEAN`, `DATE`, `ZONED DATETIME`, `LOCAL DATETIME`, `ZONED TIME`, `LOCAL TIME` or `DURATION`. |
| Indexed property value type | `VECTOR` or `LIST`. |
| Indexed vector dimension | `INTEGER` between `1` and `4096` *inclusive*. |
| Indexed vector quantization | Scalar and binary quantization supported. |
| Indexed hnsw settings | Supported |
| [Cosine similarity vector validity](#similarity-functions) | All vector components can be represented finitely in IEEE 754 ***double*** precision. Its -norm is non-zero and can be represented finitely in IEEE 754 ***double*** precision. The ratio of each vector component with its -norm can be represented finitely in IEEE 754 ***single*** precision. |
Learn more about the `vector-3.0` provider Introduced in Neo4j 2025.09
| Feature | Capability |
| --- | --- |
| Index schema | multi-label, multi-property index for nodes. multi-type, multi-property index for relationships. Only one vector property can be stored per node or relationship. Any additional properties included in the index must be one of the following types: `INTEGER`, `FLOAT`, `STRING`, `BOOLEAN`, `DATE`, `ZONED DATETIME`, `LOCAL DATETIME`, `ZONED TIME`, `LOCAL TIME` or `DURATION`. |
| Indexed property value type | `VECTOR` or `LIST` |
| Indexed vector dimension | `INTEGER` between `1` and `4096` *inclusive*. |
| Indexed vector quantization | Scalar quantization supported. |
| Indexed hnsw settings | Supported |
| [Cosine similarity vector validity](#similarity-functions) | All vector components can be represented finitely in IEEE 754 ***double*** precision. Its -norm is non-zero and can be represented finitely in IEEE 754 ***double*** precision. The ratio of each vector component with its -norm can be represented finitely in IEEE 754 ***single*** precision. |
Learn more about the `vector-2.0` provider Introduced in Neo4j 5.18
| Feature | Capability |
| --- | --- |
| Index schema | Single-label, single-property index for nodes. Single-type, single-property index for relationships. |
| Indexed property value type | `VECTOR` or `LIST` |
| Indexed vector dimension | `INTEGER` between `1` and `4096` *inclusive*. |
| Indexed vector quantization | Scalar quantization supported. |
| Indexed hnsw settings | Supported |
| [Cosine similarity vector validity](#similarity-functions) | All vector components can be represented finitely in IEEE 754 ***double*** precision. Its -norm is non-zero and can be represented finitely in IEEE 754 ***double*** precision. The ratio of each vector component with its -norm can be represented finitely in IEEE 754 ***single*** precision. |
Learn more about the `vector-1.0` provider Introduced in Neo4j 5.11
| Feature | Capability |
| --- | --- |
| Index schema | Single-label, single-property index for nodes. *No relationship support.* |
| Indexed property value type | `LIST` |
| Indexed vector dimension | `INTEGER` between `1` and `2048` *inclusive*. |
| Indexed vector quantization | Not supported |
| Indexed hnsw settings | Not supported |
| [Cosine similarity vector validity](#similarity-functions) | All vector components can be represented finitely in IEEE 754 ***single*** precision. Its -norm is non-zero and can be represented finitely in IEEE 754 ***single*** precision. |
## Cosine and Euclidean similarity functions
The choice of similarity function affects which indexed vectors are considered similar, and which are valid. The semantic meaning of the vector may itself dictate which similarity function to choose. Refer to the documentation for the particular vector embedding model you are using, as it may suggest a preference for certain similarity functions. Otherwise, being able to differentiate between the various similarity functions can assist in making a more informed decision.
| Name | Case insensitive argument | Key similarity feature |
| --- | --- | --- |
| Cosine | `"cosine"` | *angle* |
| Euclidean | `"euclidean"` | *distance* |
For -normalized vectors (unit vectors), cosine and Euclidean similarity functions produce the same similarity ordering.
Learn more about the cosine similarity function
Cosine similarity is used when the *angle* between the vectors is what determines how similar two vectors are.
A valid vector for a cosine vector index is when:
- All vector components can be represented finitely in IEEE 754 double precision.[\[2\]](#fn2)
- Its -norm is non-zero and can be represented finitely in IEEE 754 double precision.
- The ratio of each vector component with its -norm can be represented finitely in IEEE 754 single precision.
Cosine similarity interprets the vectors in Cartesian coordinates. The measure is related to the angle between the two vectors. However, an angle can be described in many units, sign conventions, and periods. The trigonometric cosine of this angle is both agnostic to the aforementioned angle conventions and bounded. Cosine similarity rebounds the trigonometric cosine.
In the above equation the trigonometric cosine is given by the scalar product of the two unit vectors.
Learn more about the Euclidean similarity function
Euclidean similarity is useful when the *distance* between the vectors is what determines how similar two vectors are.
A valid vector for a Euclidean vector index is when all vector components can be represented finitely in IEEE 754 single precision.
Euclidean interprets the vectors in Cartesian coordinates. The measure is related to the Euclidean distance, i.e., how far two points are from one another. However, that distance is unbounded and less useful as a similarity score. Euclidean similarity bounds the square of the Euclidean distance.
## Vector index procedures
| Usage | Procedure | Description |
| --- | --- | --- |
| Use node vector index. | `db.index.vector.queryNodes()` | Query the given node vector index. Returns the requested number of approximate nearest neighbor nodes and their similarity score, ordered by score. Replaced by Cypher’s `SEARCH` clause. Deprecated in Neo4j 2026.04 |
| Use relationship vector index. | `db.index.vector.queryRelationships()` | Query the given relationship vector index. Returns the requested number of approximate nearest neighbor relationships and their similarity score, ordered by score. Replaced by Cypher’s `SEARCH` clause. Deprecated in Neo4j 2026.04 |
| Set node vector property. | `db.create.setNodeVectorProperty()` | Update a given node property with the given vector in a more space-efficient way than directly using `SET`. |
| Set relationship vector property. | `db.create.setRelationshipVectorProperty()` | Update a given relationship property with the given vector in a more space-efficient way than directly using `SET`. |
## Limitations and known issues
The vector index is no longer a beta feature. It does, however, still contain some limitations:
- The query is an *approximate* nearest neighbor search. The requested *k* nearest neighbors may not be the exact *k* nearest, but close within the same wider neighborhood.
- For large requested nearest neighbors, *k*, close to the total number of indexed vectors, the search may retrieve fewer than *k* results.
- Only one vector index can be over a schema. For example, you cannot have one [Euclidean](#similarity-functions) and one [cosine](#similarity-functions) vector index on the same label-property key pair.
- Changes made within the same transaction are not visible to the index.
Vector indexes also contain some known issues. The following table lists the issues and, if fixed, the version in which they were fixed:
| Known issues | Fixed in |
| --- | --- |
| The creation of a vector index using the legacy procedure `db.index.vector.createNodeIndex()` may fail with an error in Neo4j 5.18 and later if the database was last written to with a version prior to Neo4j 5.11, and the legacy procedure is the first write operation used on the newer version. In Neo4j 5.20, the error was clarified. Using the `CREATE VECTOR INDEX` command instead avoids this issue. If the use of the procedure is unavoidable, performing any other write operation to the database on the newer binary before using the procedure will avoid the issue | |
| Procedure signatures from `SHOW PROCEDURES` render the vector arguments with a type of `ANY` rather than the semantically correct type of `VECTOR | LIST`. The types are still enforced as `VECTOR | LIST`. | |
---
1. [1](#_footnoteref_1). Lucene implements a Hierarchical Navigable Small World (HNSW) Graph to perform a k approximate nearest neighbors (k-ANN) query over the vector fields. For more information, see [Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs](https://ieeexplore.ieee.org/document/8594636/) — Yury A. Malkov and Dmitry A. Yashunin [↩︎](#fnref1)
2. [2](#_footnoteref_2). [IEEE Standard for Floating-Point Arithmetic](https://ieeexplore.ieee.org/document/8766229) [↩︎](#fnref2)
---
id: 7I_hgnUs
title: Neo4j & Graph Database — Curated Index
url: https://memory.wiki/7I_hgnUs
updated: 2026-10-09T20:36:29.643+00:00
---
# Neo4j & Graph Database — Curated Index
A collection of the memory.wiki documents currently in your library about Neo4j, graph databases, knowledge graphs, and GraphRAG.
## Documents
1. [I’m exploring how useful a graph database really is](https://memory.wiki/knmVnVm9) — initial exploration of graph databases as a memory system.
2. [Knowledge Management: Graph Database Exploration](https://memory.wiki/jUwYO3JF) — motivation and open questions for evaluating graph databases for knowledge management.
3. [Neo4j hybrid search](https://memory.wiki/UK0Ocv3G) — Neo4j hybrid search reference.
4. [Neo4j vector indexes](https://memory.wiki/_l0p4GDf) — Neo4j vector index reference.
5. [Creating Knowledge Graphs from Unstructured Data - Developer Guides](https://memory.wiki/HAPYFIou) — guide to creating knowledge graphs from unstructured data.
6. [GraphRAG with a Knowledge Graph](https://memory.wiki/cjH_v5GY) — GraphRAG concepts and knowledge graph approach.
## Scope
This index includes all six documents from the current memory.wiki library that match the Neo4j and graph database topic. It is a curated index document; the connected MCP tools do not expose native bundle creation or bundle membership editing.
---
id: sTWJ4K3E
title: Store, retrieve, and summarize messages - Neo4j Agent Memory
url: https://memory.wiki/sTWJ4K3E
updated: 2026-10-09T20:35:49.758+00:00
---
# Store, retrieve, and summarize messages - Neo4j Agent Memory
---
title: "Extract and inspect entity candidates - Neo4j Agent Memory"\
source: "https://neo4j.com/labs/agent-memory/how-to/entity-extraction/"\
author:\
published:\
created: 2026-10-09\
description: "Extract and inspect entity candidates - Neo4j Agent Memory"\
tags:
- "clippings"
---
## Extract and inspect entity candidates
**Runs client-side.** The extractors on this page run in your Python process and do not call a memory backend, so they work next to either backend. Configuring them as a `MemoryClient` extraction pipeline applies only to Bolt: NAMS extracts entities server-side and ignores the client’s `extraction` settings with a `UserWarning`. See the [backend capabilities reference](https://neo4j.com/labs/agent-memory/reference/backend-capabilities/).
To extract entity candidates with a local model, select a supported domain schema, run extraction on the input, and inspect the returned names and types before persistence.
Figure 1. Extraction pipeline: input text, configured extractors, merge strategy, then persisted entities and relationships
For the rationale, see [Understanding the extraction pipeline](https://neo4j.com/labs/agent-memory/explanation/extraction-pipeline/).
## 1. Install the local extractor
Use Python 3.10 or newer and a POSIX shell. Prepare the example files and install the required extra:
Create a local folder and virtual environment for the examples on this page. The commands reuse an existing environment without changing its files:
```bash
mkdir -p ~/agent-memory-tutorials
cd ~/agent-memory-tutorials
if [ -e .venv ]; then
printf '%s\n' 'Using the existing virtual environment.'
else
python3 -m venv .venv
fi
source .venv/bin/activate
```
Expected: `~/agent-memory-tutorials` is your working directory and its virtual environment is active. Install the published SDK with the command below.
Each complete code block labelled **Save as** names a file to create in this folder using your editor. Copy the entire block, including imports and the entry point. Expand each helper disclosure and use **Copy code** to copy its full source. Keep all files together so their imports resolve.
When continuing from another tutorial or guide, retain the existing environment, configuration, session files, and `.tutorial-state/`. Reuse unchanged helper files; compare an existing file before replacing it, and finish any pending cleanup or recovery before changing the code that owns its state.
```bash
python -m pip install 'neo4j-agent-memory[gliner2]==0.7.0'
```
The maintained program `extraction_recipes.py` supplies its own imports, source texts, and event-loop entry point. It downloads the GLiNER2.5 checkpoint `fastino/gliner2.5-base-v1` (about 407 MB) on first inference; allow disk space and network access for the download. These commands do not connect to a database or require an LLM API key.
Save the complete program below in `agent-memory-tutorials/`. It has no local helper imports. The next section explains the selected function.
Complete `extraction_recipes.py`
```python
"""Complete local-model extraction recipes without a database or LLM API."""
import argparse
import asyncio
from neo4j_agent_memory.extraction.domain_schemas import DomainSchema, get_schema
from neo4j_agent_memory.extraction.gliner2_extractor import GLiNER2Extractor
from neo4j_agent_memory.extraction.pipeline import ExtractionPipeline, MergeStrategy
from neo4j_agent_memory.extraction.streaming import StreamingExtractor
from neo4j_agent_memory.ontology import RelationshipDef
TEXTS = [
"Maya Chen works at Northstar Robotics in Denver.",
"Ravi Shah joined Summit Research in Boulder.",
]
# tag::schema[]
def custom_extractor():
schema = DomainSchema(
name="support_catalog",
entity_types={"customer": "A named customer", "product": "A named purchased item"},
)
return GLiNER2Extractor(
ontology=schema,
label_mapping={"customer": ("PERSON", None), "product": ("OBJECT", "PRODUCT")},
threshold=0.5,
)
# end::schema[]
# tag::extract[]
async def extract(selected, text):
result = await selected.extract(text, extract_relations=False, extract_preferences=False)
if not result.entities:
raise RuntimeError("No candidate entities; inspect the input/schema/model threshold")
for entity in result.entities:
print(entity.name, entity.type, entity.subtype, entity.confidence)
print(f"Verified: {result.entity_count} candidate entities returned; inspect their accuracy")
return result
# end::extract[]
# tag::relations[]
def relation_extractor():
# The business catalog declares labels only; attach typed relationships.
ontology = get_schema("business").to_ontology(
relationships=[
RelationshipDef(
type="EMPLOYED_BY",
source="person",
target="company",
description="The person works for or has joined this company",
),
RelationshipDef(
type="LOCATED_IN",
source="company",
target="location",
description="The company is based or operates in this place",
),
]
)
return GLiNER2Extractor.for_ontology(ontology, threshold=0.5)
async def relations(selected, text):
result = await selected.extract(text, extract_preferences=False)
if not result.relations:
raise RuntimeError("No relations; check the declared relationships and thresholds")
for relation in result.relations:
print(relation.source, relation.relation_type, relation.target, relation.confidence)
print(f"Verified: {len(result.relations)} candidate relations returned; inspect them")
return result
# end::relations[]
# tag::batch[]
async def batch(selected, texts):
# Propagate stage errors so the batch can distinguish a failed item from an empty extraction.
pipeline = ExtractionPipeline(
stages=[selected], merge_strategy=MergeStrategy.CONFIDENCE, fallback_on_error=False
)
result = await pipeline.extract_batch(
texts,
batch_size=2,
max_concurrency=1,
fail_fast=False,
extract_relations=False,
extract_preferences=False,
on_progress=lambda done, total: print(f"Progress: {done}/{total}"),
)
assert result.total_items == len(texts)
for item in result.results:
if item.success:
print(f"Input {item.index}: {item.result.entity_count} entities")
else:
print(f"Input {item.index} failed: {item.error}")
if result.failed_items:
raise RuntimeError(
f"Retry failed source indexes after fixing errors: {result.get_errors()}"
)
print(f"Verified: all {result.total_items} inputs accounted for")
return result
# end::batch[]
# tag::streaming[]
async def streaming(selected, text):
streamer = StreamingExtractor(selected, chunk_size=400, overlap=40, chunk_by_tokens=False)
result = await streamer.extract(text, extract_relations=False)
errors = [
(chunk.chunk.index, chunk.error) for chunk in result.chunk_results if not chunk.success
]
if errors:
raise RuntimeError(f"Chunk extraction failed: {errors}")
assert result.chunk_results
combined = result.to_extraction_result(source_text=text)
print(
f"Verified: {len(result.chunk_results)} chunks completed; {combined.entity_count} merged entities"
)
return result
# end::streaming[]
async def main():
parser = argparse.ArgumentParser()
parser.add_argument("command", choices=["extract", "schema", "relations", "batch", "streaming"])
args = parser.parse_args()
if args.command == "schema":
await extract(custom_extractor(), "Maya Chen bought a Trail Starter shoe.")
elif args.command == "relations":
await relations(relation_extractor(), TEXTS[0])
else:
selected = GLiNER2Extractor.for_schema("business")
if args.command == "extract":
await extract(selected, TEXTS[0])
elif args.command == "batch":
await batch(selected, TEXTS)
else:
await streaming(selected, "\n".join(TEXTS * 12))
if __name__ == "__main__":
asyncio.run(main())View all (139 more lines)
```
## 2. Configure and run the extraction
The runner constructs `GLiNER2Extractor.for_schema("business")`, which loads the built-in `business` template, and uses the first built-in fictional source text. Relation and preference extraction are disabled for this entity-only task; GLiNER2.5 never extracts preferences.
The following function is included from the complete program. Run the maintained file with the command below it.
```python
async def extract(selected, text):
result = await selected.extract(text, extract_relations=False, extract_preferences=False)
if not result.entities:
raise RuntimeError("No candidate entities; inspect the input/schema/model threshold")
for entity in result.entities:
print(entity.name, entity.type, entity.subtype, entity.confidence)
print(f"Verified: {result.entity_count} candidate entities returned; inspect their accuracy")
return result
```
```bash
python extraction_recipes.py extract
```
## 3. Verify the result
Expected: candidate names, POLE+O types, optional subtypes, and confidence values, followed by `Verified: … candidate entities returned; inspect their accuracy`. A template label maps onto its POLE+O pair, so a `company` mention comes back as type `ORGANIZATION` with subtype `COMPANY`. No entities causes an explicit error, not a successful extraction claim.
The command raises on the documented failure conditions. Inspect candidate names, types, and confidence against source text before storing them. Counts alone do not measure extraction accuracy.
## Choose the extraction path for the task
| Task | Next operation |
| --- | --- |
| Custom domain labels | [Construct a DomainSchema and label mapping](https://neo4j.com/labs/agent-memory/how-to/entity-extraction-schemas/). `financial` and `ecommerce` are not registered schema names. |
| One typed schema for extraction, validation, and storage | [Write an ontology and hand it to the client](https://neo4j.com/labs/agent-memory/how-to/ontology-driven-extraction/). The same document drives GLiNER2.5’s joint entity and relation decoding, the LLM prompt, and relation validation on ingest. |
| Document batches or chunking | [Use the pipeline and streaming result contracts](https://neo4j.com/labs/agent-memory/how-to/entity-extraction-batch/). |
| Relationships | GLiNER2.5 decodes typed relations in the same pass as the entities when the ontology declares relationship types. The `poleo`, `podcast`, and `news` templates declare them; attach them to a custom schema as shown in [relationship extraction](https://neo4j.com/labs/agent-memory/how-to/entity-extraction-schemas/#_relationship_extraction). For relation types the local model misses, compose its mentions with `LLMEntityExtractor` relations; see [the complete document program](https://neo4j.com/labs/agent-memory/tutorials/knowledge-graph/). |
| LLM extraction | Choose an explicit LLM provider and `extractor_type="llm"`; see [the provider tutorial](https://neo4j.com/labs/agent-memory/tutorials/anthropic-and-local-embeddings/). |
| Multiple extraction stages | Use `ExtractionPipeline`; pass `ontology=` to drop merged relations the ontology does not permit, and compare per-stage results and the chosen merge strategy in [the extractor reference](https://neo4j.com/labs/agent-memory/reference/extractors/). |
| Code written for GLiNER v1 or GLiREL | [Migrate to GLiNER2.5](https://neo4j.com/labs/agent-memory/how-to/migrate-to-gliner2/). Release 0.7 removed both; their class names raise `ImportError` with the replacement. |
## Store candidates with provenance
A standalone extractor returns `ExtractionResult`; it does not persist nodes. Its entities expose `name`, `type`, `subtype`, and `confidence`; a GLiNER2.5 entity also carries a mention `id` scoped to that result, `start_pos`, `end_pos`, `context`, and `extractor="gliner2"`. A relation exposes `source`, `target`, and `relation_type`; from GLiNER2.5 it also carries `source_id` and `target_id`, the mention ids of its endpoints in the same result. Store accepted entities with `add_entity` and, on Bolt, attach source evidence using `link_entity_to_message`; the NAMS client has no provenance-link method. Entity storage has no `confidence` parameter; on Bolt, keep extraction confidence on the provenance link or in metadata. The NAMS `add_entity` sends only name, type and description, so it does not store extraction confidence. To record which model produced the candidates, pass the extractor’s `model_id` (the checkpoint) and `version` (the installed `gliner2` package) to `long_term.register_extractor`.
The [document tutorial](https://neo4j.com/labs/agent-memory/tutorials/knowledge-graph/) includes a complete write/readback path and skips ambiguous relationship endpoints. On Bolt, the ingestion path (`add_message`, `add_messages_batch`, and `extract_entities_from_session`) already stores extracted entities, `MENTIONS` links, and typed `RELATED_TO` edges, and resolves each mention against existing entities by default; see [entity resolution on ingest](https://neo4j.com/labs/agent-memory/how-to/tune-entity-resolution/). Avoid automatic extraction on `add_message` when you also run and store an explicit extraction, or you may duplicate work and records.
For conditional/multi-stage extraction, use the supported constructor options rather than undocumented callbacks. `FIRST_SUCCESS` stops when a stage reaches the configured minimum; other merge policies can also stop with `stop_on_success=True`. Stage execution success does not imply factual correctness. See [all extractor and pipeline options](https://neo4j.com/labs/agent-memory/reference/extractors/).
---
id: HAPYFIou
title: Creating Knowledge Graphs from Unstructured Data - Developer Guides
url: https://memory.wiki/HAPYFIou
updated: 2026-10-09T20:35:32.692+00:00
---
# Creating Knowledge Graphs from Unstructured Data - Developer Guides
# Creating Knowledge Graphs from Unstructured Data
Creating graph structures from unstructured text using [NLP techniques like Spacy, Stanford NLP, OpenNLTK](https://neo4j.com/blog/machine-learning/accelerating-towards-natural-language-search-graphs/) etc. has been a long-standing possibility. Those usually required fine-tuning of the NLP models on the specific domain and language of the text to be processed and substantial NLP skills to get the best results.
The rise of prompt-able modern day Large Language Models (LLMs) with strong language skills across many languages and domains, extended the capabilities massively. The LLMs can be instructed with detailed prompts (instructions, examples, schema, existing entities, output formatting) to extract, and de-duplicate entities and relationships from unstructured text, images and audio fragments. The extracted information is returned in a structured JSON format and can be stored in a graph database like Neo4j and linked back to the source documents and additional metadata.
This allows to build Knowledge Graphs (KGs) from unstructured data and integrate them with existing structured data in Neo4j. Those Knowledge Graphs can then be used for a variety of applications, including [GraphRAG](https://graphrag.com) (Retrieval Augmented Generation) applications, where the Knowledge Graph is used to retrieve relevant contextual information to augment the LLM’s responses.

[](https://graphacademy.neo4j.com/courses/llm-vectors-unstructured/?category=generative-ai)
## [](#_neo4j_product_capabilities)Neo4j Product Capabilities
### [](#_graphrag_python_package)GraphRAG Python Package
The Neo4j Python GraphRAG package offers a comprehensive Pipeline for unstructured document processing, graph schema based entity extraction, resolution and storage.
The `SimpleKGBuilder` provides an easy way to get started, for full configurability, please use
```python
from neo4j_graphrag.experimental.pipeline.kg_builder import SimpleKGPipeline
ENTITIES = [
"Person",
{"label": "Company", "description": "Company or organization"},
{"label": "Location", "properties": [{"name": "city", "type": "STRING"}]},
]
RELATIONS = [
"LOCATED_AT",
{
"label": "COMPETES_WITH",
"description": "Used for competitor relationships between companies",
},
{"label": "WORKS_AT", "properties": [{"name": "fromYear", "type": "INTEGER"}]},
]
kg_builder = SimpleKGPipeline(
llm=llm, # an LLMInterface for Entity and Relation extraction
driver=neo4j_driver, # a neo4j driver to write results to graph
embedder=embedder, # an Embedder for chunks
from_pdf=True, # set to False if parsing an already extracted text
entities=ENTITIES,
relations=RELATIONS,
potential_schema=POTENTIAL_SCHEMA, # a optional list of node-relationship-node schema entries
)
await kg_builder.run_async(file_path=str(file_path))
```

A full Knowledge Graph (KG) construction pipeline requires a few more components:
- **Data loader:** extract text from files (PDFs, …).
- **Text splitter:** split the text into smaller pieces of text (chunks), manageable by the LLM \* context window (token limit).
- **Chunk embedder (optional):** compute the chunk embeddings.
- **Schema builder:** provide a schema to ground the LLM extracted entities and relations and obtain \* an easily navigable KG.
- **Lexical graph builder:** build the lexical graph (Document, Chunk and their relationships) \* (optional).
- **Entity and relation extractor:** extract relevant entities and relations from the text.
- **Knowledge Graph writer:** save the identified entities and relations.
- **Entity resolver:** merge similar entities into a single node.
Learn more in the documentation:
- [Neo4j GraphRAG Python Package Overview](https://neo4j.com/developer/genai-ecosystem/graphrag-python/)
- [User Guide: Knowledge Graph Builder](https://neo4j.com/docs/neo4j-graphrag-python/current/user_guide_kg_builder.html)
- [User Guide: Pipeline](https://neo4j.com/docs/neo4j-graphrag-python/current/user_guide_pipeline.html)
- [GraphAcademy Course](https://graphacademy.neo4j.com/courses/llm-vectors-unstructured/?category=generative-ai)
Those generated Knowledge Graphs can then be used with the [same Python package, for building GraphRAG powered](https://neo4j.com/docs/neo4j-graphrag-python/current/user_guide_rag.html) GenAI applications.
## [](#_prototyping_and_demonstrations)Prototyping and Demonstrations
### [](#_llm_knowledge_graph_builder)LLM Knowledge Graph Builder
The [LLM Knowledge Graph Builder](https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/) is an easy to use tool for building Knowledge Graphs from unstructured text.
It uses the LangChain LLMGraphTransformer under the hood, but provides a simple UI to extract entities and relations from uploaded PDFs, Office Documents, Web pages or YouTube video transcripts. It extracts first a lexical graph (Document, Chunk and their relationships) and then uses the chosen LLM to extract entities and relations. Optionally it enriches the graph community summaries and embeddings. You can specify a graph schema to guide the extraction process and visualize the extracted graphs.

To interact with the extracted information, you can compare a number of different retrievers including GraphRAG, Vector, Hybrid and Text2Cypher. For each answer you can inspect the source of the information and the retrieved context that was used to generate the answer. It also allows to run an RAGAs evaluation across the retrieval results.
Some of the internal details are documented in [LLM Graph Builder - Knowledge Graph Extraction Challenges](https://neo4j.com/blog/developer/knowledge-graph-extraction-challenges/).
### [](#_ai_assistant_with_neo4j_mcp_server)AI Assistant with Neo4j MCP Server
A quick way of experimenting interactively with Knowledge Graph extraction is to use a AI assistant like Claude, ChatGPT or an MCP enabled IDE like VS Code, Cursor, Windsurf to process text or discussions interactively and prompt the LLM to extract Entities and Relationships.
Previously those extracted graph entities would have to be imported through an intermediate format like JSON or CSV (e.g. via the Data Importer) or via Cypher.
Now they can be automatically saved to a connected graph using the [mcp-neo4j-cypher](https://github.com/neo4j-contrib/mcp-neo4j/tree/main/servers/mcp-neo4j-cypher) or [mcp-neo4j-memory](https://github.com/neo4j-contrib/mcp-neo4j/tree/main/servers/mcp-neo4j-memory) MCP servers.

## [](#_ecosystem_integrations)Ecosystem Integrations
Neo4j integrates with a number of other tools and frameworks to provide solutions for Knowledge Graph extraction and usage.
### [](#_unstructured_io)Unstructured.io
[Unstructured.io](https://unstructured.io) is a platform and python package for extracting structured data from unstructured documents. It provides a set of tools for parsing, cleaning, and transforming unstructured data into structured formats.
The Neo4j Integration allows you to extract lexical graphs from any supported source.

Both in the [Platform](https://docs.unstructured.io/ui/destinations/neo4j) and the [open source package](https://docs.unstructured.io/ingestion/destination-connectors/neo4j), you can use the `Neo4jConnectionConfig`, `Neo4jUploaderConfig` to write the extracted lexical data to a Neo4j graph.
```python
Pipeline.from_configs(
context=ProcessorConfig(),
indexer_config=LocalIndexerConfig(input_path=os.getenv("LOCAL_FILE_INPUT_DIR")),
downloader_config=LocalDownloaderConfig(),
source_connection_config=LocalConnectionConfig(),
...
chunker_config=ChunkerConfig(chunking_strategy="by_title"),
embedder_config=EmbedderConfig(embedding_provider="huggingface"),
destination_connection_config=Neo4jConnectionConfig(
access_config=Neo4jAccessConfig(password=os.getenv("NEO4J_PASSWORD")),
username=os.getenv("NEO4J_USERNAME"),
uri=os.getenv("NEO4J_URI"),
database=os.getenv("NEO4J_DATABASE"),
),
stager_config=Neo4jUploadStagerConfig(),
uploader_config=Neo4jUploaderConfig(batch_size=100)
).run()
```
### [](#_langchain)LangChain
The [first implementation for Knowledge Graph extraction](https://medium.com/data-science/building-knowledge-graphs-with-llm-graph-transformer-a91045c49b59) was the [LangChain LLMGraphTransformer](https://python.langchain.com/api_reference/experimental/graph_transformers/langchain_experimental.graph_transformers.llm.LLMGraphTransformer.html).

The usage is pretty straightforward, as documented in [Constructing Knowledge Graphs](https://python.langchain.com/docs/how_to/graph_constructing/). You can use the `convert_to_graph_documents` method to convert a list of LangChain documents into graph documents (nodes and relationships). To guide the extraction process, you can specify a schema with allowed nodes and relationships, as well as properties and additional extraction instructions.
```python
from langchain_experimental.graph_transformers import LLMGraphTransformer
llm_transformer = LLMGraphTransformer(
llm=llm,
allowed_nodes=["Person", "Country", "Organization"],
allowed_relationships=["NATIONALITY", "LOCATED_IN", "WORKED_AT", "SPOUSE"],
node_properties=["born_year"],
)
graph_documents = llm_transformer.convert_to_graph_documents(documents)[0]
print(f"Nodes: {graph_documents.nodes} Rels: {graph_documents.relationships}")
graph.add_graph_documents(graph_documents, include_source=True)
```

### [](#_llamaindex)LlamaIndex
In [LlamaIndex the PropertyGraphIndex](https://www.llamaindex.ai/blog/introducing-the-property-graph-index-a-powerful-new-way-to-build-knowledge-graphs-with-llms) is the main component for managing Knowledge Graphs including building them from unstructured data. For extracting entities and relations, different extractors can be used, for instance the `SchemaLLMPathExtractor`.
```python
from typing import Literal
from llama_index.core.indices.property_graph import SchemaLLMPathExtractor
entities = Literal["Person", "Place", "Thing"]
relations = Literal["PART_OF", "HAS", "IS_A"]
schema = {
"Person": ["PART_OF", "HAS", "IS_A"],
"Place": ["PART_OF", "HAS"],
"Thing": ["IS_A"],
}
kg_extractor = SchemaLLMPathExtractor(
llm=llm,
possible_entities=entities,
possible_relations=relations,
kg_validation_schema=schema,
strict=True, # if false, will allow triplets outside of the schema
num_workers=4,
max_triplets_per_chunk=10,
)
graph_store = Neo4jPropertyGraphStore(
username="neo4j",
password="",
url="neo4j+s://xxx.databases.neo4j.io",
)
# creates an index
index = PropertyGraphIndex.from_documents(
documents,
property_graph_store=graph_store,
# optional, neo4j also supports vectors directly
vector_store=vector_store,
embed_kg_nodes=True,
)
```
The Neo4j-PropertyGraphIndex can be used for GraphRAG as a retriever, e.g. via VectorContextRetriever, LLMSynonymRetriever, TextToCypherRetriever, CypherTemplateRetriever.
- [Property Graph Index Documentation](https://docs.llamaindex.ai/en/stable/module_guides/indexing/lpg_index_guide/)
- [Neo4j Property Graph Index](https://docs.llamaindex.ai/en/stable/examples/property_graph/property_graph_neo4j/)
- [Property Graph Construction in Neo4j](https://docs.llamaindex.ai/en/stable/examples/property_graph/property_graph_advanced/)
## [](#_research)Research
- [GLiNER](https://graphrag.com/appendices/research/2311.08526/), [GLiNER Neo4j](https://bluetickconsultants.medium.com/dual-approaches-to-building-knowledge-graphs-traditional-techniques-or-llms-400fee0f5ac9), [LangChain GlinerGraphTransformer](https://python.langchain.com/api_reference/experimental/graph_transformers/langchain_experimental.graph_transformers.gliner.GlinerGraphTransformer.html)
- [Entity Linking and Relationship Extraction With Relik](https://neo4j.com/blog/developer/entity-linking-relationship-extraction-relik-llamaindex/)
- [SciPhi Triplex](https://www.sciphi.ai/blog/triplex), [Triplex Neo4j](https://www.sciphi.ai/blog/graphrag)
- [KGGen: Extracting Knowledge Graphs from Plain Text with Language Models](https://arxiv.org/abs/2502.09956)
## [](#_blog_posts)Blog Posts
- [From Unstructured Text to Interactive Knowledge Graphs using LLMs (2025)](https://robert-mcdermott.medium.com/from-unstructured-text-to-interactive-knowledge-graphs-using-llms-dd02a1f71cd6)
- [GraphRAG in Action: From Commercial Contracts to a Dynamic Q&A Agent (2024)](https://neo4j.com/blog/developer/graphrag-in-action/)
- [Using LlamaParse for Knowledge Graph Creation from Documents (2024)](https://medium.com/neo4j/using-llamaparse-for-knowledge-graph-creation-from-documents-3bd1e1849754)
- [Automate Building Knowledge Graphs from Scientific Abstracts with LLMs and Neo4j (2024)](https://blog.gopenai.com/automate-building-knowledge-graphs-from-scientific-abstracts-with-llms-and-neo4j-2-ways-b9d5152a12da)
- [Enhancing the Accuracy of RAG Applications with Knowledge Graphs (2024)](https://medium.com/neo4j/enhancing-the-accuracy-of-rag-applications-with-knowledge-graphs-ad5e2ffab663)
- [Document Knowledge Graph with Unstructured.io (2024)](https://neo4j.com/blog/developer/document-knowledge-graph-unstructuredio/)
- [Constructing Knowledge Graphs from Text using OpenAI Functions (2023)](https://bratanic-tomaz.medium.com/constructing-knowledge-graphs-from-text-using-openai-functions-096a6d010c17)
- [Text to Knowledge Graph Information Extraction Pipeline (2022)](https://neo4j.com/blog/genai/text-to-knowledge-graph-information-extraction-pipeline/)
---
_Imported from _
---
id: knmVnVm9
title: I’m exploring how useful a graph database really is
url: https://memory.wiki/knmVnVm9
updated: 2026-10-09T20:21:39.393+00:00
---
# I’m exploring how useful a graph database really is
I’m exploring some options for a memory system that can handle all of my work and routine