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

Use Case: RAG Pipeline

Standard RAG retrieves flat chunks and trusts the LLM to figure out the rest. Trusted RAG runs on a world model — every fact has a confidence score, every source has provenance, and retrieval follows relationship paths rather than approximate vector similarity.

LLMs are strong at language. They are weak at multi-hop reasoning over connected facts — finding what links entity A to entity B through three degrees of relationship. That's a traversal problem. It requires world model infrastructure, not a vector index.

Build a retrieval-augmented generation pipeline that combines vector similarity, graph traversal, and full-text search — all operating on the same spatial-temporal world model.

The problem#

Standard RAG (vector search → LLM) misses structural context:

  • Related entities that aren't in the retrieved chunks
  • Relationship paths between concepts
  • Community structure and importance rankings

Why graph-powered RAG#

ArcFlow combines three retrieval strategies in one engine:

  1. Vector search — semantic similarity over embeddings
  2. Graph traversal — follow relationships for structured context
  3. Full-text search — keyword matching with BM25 scoring

No separate databases. No orchestration layer. One query engine.

Implementation#

import { open } from 'arcflow'
 
const db = open('./rag-graph')
 
async function graphRAG(query: string, queryEmbedding: number[]) {
  // 1. Vector search: find semantically similar documents
  const similar = db.query(
    "CALL algo.vectorSearch('doc_index', $vec, 5)",
    { vec: JSON.stringify(queryEmbedding) }
  )
 
  // 2. Graph expansion: follow relationships from retrieved docs
  const context: string[] = []
  for (const row of similar.rows) {
    const title = String(row.get('title'))
    context.push(`Document: ${title}`)
 
    // Get mentioned entities
    const entities = db.query(
      "MATCH (d:Document {title: $t})-[:MENTIONS]->(e) RETURN e.name, labels(e)",
      { t: title }
    )
    for (const e of entities.rows) {
      context.push(`  Mentions: ${e.get('name')} (${e.get('labels(e)')})`)
    }
  }
 
  // 3. Full-text search: keyword-based retrieval
  const keywords = db.query(
    "CALL db.index.fulltext.queryNodes('doc_text', $q)",
    { q: query }
  )
 
  // 4. Graph algorithms: importance ranking
  const ranked = db.query("CALL algo.pageRank()")
 
  // 5. Assemble context for LLM
  return {
    vectorResults: similar.rows.map(r => r.toObject()),
    graphContext: context,
    keywordResults: keywords.rows.map(r => r.toObject()),
    topEntities: ranked.rows.slice(0, 10).map(r => r.toObject()),
  }
}

Built-in GraphRAG#

ArcFlow includes a built-in Trusted GraphRAG pipeline:

const context = db.query("CALL algo.graphRAGTrusted()")

This combines vector retrieval, graph traversal, and trust scoring in a single call.

See Also#

  • Trusted RAG — full Trusted RAG page with confidence scoring, observation classes, and provenance
  • Vector Search — vector index creation, k-NN search, hybrid search
  • RAG Pipeline Guide — step-by-step implementation guide
  • Graph Algorithms — algo.graphRAG(), algo.graphRAGTrusted(), algo.graphRAGContext()
  • Knowledge Management — persistent world model as RAG substrate
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousKnowledge ManagementNext →Fraud Detection