ArcFlow
Company
Managed Services
Markets
  • News
  • LOG IN
  • GET STARTED

OZ brings Visual Intelligence to physical venues, a managed edge layer that lets real-world environments see, understand, and act in real time.

Talk to us

ArcFlow

  • World Models
  • Sensors

Managed Services

  • OZ VI Venue 1
  • Case Studies

Markets

  • Sports
  • Broadcasting
  • Robotics

Company

  • About
  • Technology
  • Careers
  • Contact

Ready to see it live?

Talk to the OZ team about deploying at your venues, from a single pilot match to a full regional rollout.

Schedule a deployment review

© 2026 OZ. All rights reserved.

LinkedIn
ArcFlow Docs
Get Started
  • Get Started
  • Quickstart
  • Installation
  • Project Setup
  • Platforms
  • Bindings
  • Licensing
  • Pricing
Capabilities
  • Vector Search
  • Graph Algorithms
  • Sync
  • MCP Server (AI Agents)
  • Live Queries
  • Programs
  • Temporal
  • Spatial
  • Trusted RAG
  • Behavior Graph
  • Agent-Native
  • Event Sourcing
  • GPU Acceleration
  • Intent Relay
Concepts
  • World Model
  • Graph Model
  • Query Language (GQL)
  • Graph Patterns
  • SQL vs GQL
  • Parameters
  • Query Results
  • Persistence & WAL
  • Error Handling
  • Observations & Evidence
  • Confidence & Provenance
  • Proof Artifacts & Gates
  • Skills
GQL / WorldCypher
  • Overview
  • MATCH
  • WHERE
  • RETURN
  • OPTIONAL MATCH
  • CREATE
  • SET
  • MERGE
  • DELETE
  • REMOVE
  • WITH
  • UNION
  • UNWIND
  • CASE
  • Spatial Queries
  • Temporal Queries
  • Algorithms Reference
  • Triggers
Schema
  • Overview
  • Indexes
  • Constraints
  • Data Types
Functions
  • Built-in Functions
  • Aggregations
  • Procedures
  • Shortest Path
  • EXPLAIN
  • PROFILE
Skills
  • Overview
  • CREATE SKILL
  • PROCESS NODE
  • REPROCESS EDGES
Operations
  • CLI
  • REPL Commands
  • Snapshot & Restore
  • Server Modes & PG Wire
  • Persistence
  • Import & Export
  • Docker
  • Architecture
  • Cloud Architecture
  • Sync Protocol (Deep Dive)
Guides
  • Agent Integration
  • World Model
  • Graph Model Fundamentals
  • Trusted RAG
  • Using Skills
  • Behavior Graphs
  • Swarm & Multi-Agent
  • Migration Guide
  • Filesystem Workspace
  • From SQL to GQL
  • ArcFlow for Coding Agents
  • Data Quality & Pipeline Integrity
  • Code Intelligence
Tutorials
  • Knowledge Graph
  • Entity Linking
  • Vector Search
  • Graph Algorithms
Recipes
  • CRUD
  • Multi-MATCH
  • MERGE (Upsert)
  • Full-Text Search
  • Temporal Queries
  • Batch Projection
  • GraphRAG
Use Cases
  • Agent Tooling
  • Knowledge Management
  • RAG Pipeline
  • Fraud Detection
  • Sports Analytics
  • Grounded Neural Objects
  • Behavior Graphs
  • Autonomous Systems
  • Digital Twins
  • Robotics & Perception
Reference
  • TypeScript API
  • GQL Conformance
  • Compatibility Matrix
  • Glossary
  • Data Types
  • Operators
  • Error Codes
  • Known Issues

Tutorial: Vector Search

Embeddings are first-class node properties in ArcFlow — stored in the world model alongside confidence scores and relationships, searchable with the same GQL used for everything else.

Overview#

ArcFlow includes a built-in vector index. You can:

  1. Store embeddings as node properties
  2. Create a vector index
  3. Search for nearest neighbors by similarity

No external vector database needed.

1. Store embeddings#

import { openInMemory } from 'arcflow'
 
const db = openInMemory()
 
// Create nodes with embedding properties
db.mutate("CREATE (d:Document {title: 'AI Introduction', embedding: '[0.1, 0.2, 0.3, 0.4, 0.5]'})")
db.mutate("CREATE (d:Document {title: 'Machine Learning', embedding: '[0.15, 0.22, 0.28, 0.42, 0.48]'})")
db.mutate("CREATE (d:Document {title: 'Database Systems', embedding: '[0.8, 0.1, 0.05, 0.02, 0.03]'})")

2. Create a vector index#

db.mutate(
  "CREATE VECTOR INDEX doc_search FOR (n:Document) ON (n.embedding) OPTIONS {dimensions: 5, similarity: 'cosine'}"
)

Options:

  • dimensions — must match your embedding size (e.g., 1536, 768, or 384 depending on your model)
  • similarity — 'cosine' (recommended) or 'euclidean'

3. Search by similarity#

const queryVector = [0.12, 0.21, 0.29, 0.41, 0.49]  // From your embedding model
 
const results = db.query(
  "CALL algo.vectorSearch('doc_search', $vector, $k)",
  { vector: JSON.stringify(queryVector), k: 5 }
)
 
for (const row of results.rows) {
  console.log(row.get('title'), row.get('score'))
}
// "Machine Learning" 0.99
// "AI Introduction" 0.97
// "Database Systems" 0.42

4. Combine vector search with graph traversal#

The real power: use vector similarity to find a starting point, then traverse the graph for context.

// Find similar documents, then get their authors and related topics
const similar = db.query(
  "CALL algo.vectorSearch('doc_search', $vector, 3)",
  { vector: JSON.stringify(queryVector) }
)
 
for (const row of similar.rows) {
  const docTitle = row.get('title')
 
  // Traverse from each result
  const context = db.query(
    "MATCH (d:Document {title: $title})-[:AUTHORED_BY]->(a:Person) RETURN a.name",
    { title: String(docTitle) }
  )
  console.log(`${docTitle} by ${context.rows.map(r => r.get('name')).join(', ')}`)
}

5. GraphRAG pattern#

Use the built-in GraphRAG procedure for retrieval-augmented generation:

const context = db.query("CALL algo.graphRAG()")
// Returns graph context optimized for LLM consumption

Full-text search alternative#

For keyword-based search (no embeddings needed):

// Create full-text index
db.mutate("CREATE FULLTEXT INDEX doc_text FOR (n:Document) ON (n.title)")
 
// Search with BM25 scoring
const results = db.query("CALL db.index.fulltext.queryNodes('doc_text', 'machine learning')")

Hybrid search#

Combine vector similarity with full-text search:

const results = db.query(
  "CALL algo.hybridSearch()",
  // Combines vector and keyword signals
)

See Also#

  • Vector Search — vector index setup, hybrid search, and configuration reference
  • Trusted RAG — confidence-filtered retrieval built on vector + graph search
  • Graph Algorithms — combine vector search with PageRank for importance-weighted results
  • GPU Acceleration — GPU-accelerated ANN search at scale
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousEntity LinkingNext →Graph Algorithms