Urgent.News

What's breaking now, across thousands of outlets.

Tech

Using SynapCores as a LlamaIndex Vector Store + Property Graph Store

Most LlamaIndex setups end up with two separate backends once you go beyond plain vector search: a vector store for VectorStoreIndex , and a separate graph database for PropertyGraphIndex when you need relationship-aware retrieval (GraphRAG). Two services, two connection strings, two things to keep in sync. This is a walkthrough of backing both index types with SynapCores instead — one engine,…

LlamaIndex setups often require two separate backends once plain vector search is no longer sufficient: a vector store for VectorStoreIndex and a separate graph database for PropertyGraphIndex when relationship-aware retrieval (GraphRAG) is needed. Maintaining two services, two connection strings, and keeping them in sync can be cumbersome. This walkthrough demonstrates how to utilize SynapCores to back both index types with a single engine and one connection, simplifying the setup.

To get started, run the SynapCores container with Docker:

```

docker run -d --name synapcores -p 8080:8080 \

-e AIDB_ACCEPT_LICENSE = 1 \

-v synapcores-data:/var/lib/synapcores \

ghcr.io/synapcores/community:latest

```

Then, install the necessary integration packages from PyPI:

```

pip install llama-index llama-index-vector-stores-synapcores llama-index-graph-stores-synapcores

```

The vector store implementation, SynapCoresVectorStore, adheres to the full BasePydanticVectorStore ABC, enabling add, delete, query, delete_nodes, clear operations, and asynchronous support. Metadata filtering supports 12 operators with AND/OR/NOT and nested groups, ensuring no loss of filtering power when moving away from a dedicated vector DB.

For the property graph store, SynapCoresPropertyGraphStore integrates seamlessly with GraphRAG. It implements the full PropertyGraphStore ABC, supporting both structured queries and vector queries, including the depth-bounded BFS primitive used by PropertyGraphIndex.as_retriever(). Structured queries can be written manually using Cypher with named-parameter binding if desired.

By using SynapCores, both index types are served from the same instance, utilizing the same connection. This approach allows vector and graph retrieval to operate within a single engine, eliminating the need for separate databases and cross-service joins. This setup is particularly beneficial for prototyping GraphRAG without requiring a dedicated Neo4j database or for combining vector and graph retrieval in a single query.

The integration has been thoroughly tested with 48 tests across a live engine via Docker Compose, encompassing 23 vector and 25 graph tests. Additionally, runnable notebooks are provided, which demonstrate the usage of real HuggingFace MiniLM embeddings (384 dimensions). The source code, tests, and notebooks are available on GitHub and on PyPI, making installation straightforward with a simple pip install command.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

You Wished for It. Here It Is. ❤️

I know how tough it can be to build smooth, secure backend features, so I wanted to bring a little joy to your day and give something back to this amazing community.

More from Thursday 27 August →