LlamaIndex property graph store integration for SynapCores — for GraphRAG.
Project description
llama-index-graph-stores-synapcores
LlamaIndex property graph store integration for SynapCores. Use it as the backend for PropertyGraphIndex and GraphRAG workflows.
pip install llama-index llama-index-graph-stores-synapcores
Quickstart
from llama_index.core import PropertyGraphIndex
from llama_index.core.readers import SimpleDirectoryReader
from llama_index.graph_stores.synapcores import SynapCoresPropertyGraphStore
# 1. docker run -p 8080:8080 -e AIDB_ACCEPT_LICENSE=1 synapcores/community:latest
graph_store = SynapCoresPropertyGraphStore(
uri="http://localhost:8080",
graph_name="my_kb",
embedding_dim=1536,
)
docs = SimpleDirectoryReader("./data").load_data()
index = PropertyGraphIndex.from_documents(
docs,
property_graph_store=graph_store,
)
retriever = index.as_retriever()
for node in retriever.retrieve("Who founded Acme and when?"):
print(node.text)
Configuration
| Argument | Default | Env fallback |
|---|---|---|
uri |
http://localhost:8080 |
SYNAPCORES_URI |
database |
default |
SYNAPCORES_DATABASE |
auth_token |
None |
SYNAPCORES_AUTH_TOKEN |
graph_name |
llama_graph |
— |
embedding_dim |
1536 |
— |
overwrite |
False |
— |
graph_name tags every node + relation so multiple logical graphs can coexist in one engine without colliding.
Storage model
| LlamaIndex type | Cypher label | Notes |
|---|---|---|
EntityNode (name + type, e.g. "PERSON Alice") |
:Entity {id, name, label, properties_json, graph_name, embedding?} |
Embedding stored when provided |
ChunkNode (source text) |
:Chunk {id, text, label, properties_json, graph_name, embedding?} |
|
Relation (typed edge with properties) |
[:RELATION {label, properties_json, graph_name}] |
label is the relation type — preserved as a property so filtering by type doesn't need to parse the edge label |
Free-form properties are JSON-serialized into a single properties_json field on each node/relation. Round-tripping is reliable across every engine version (>=v1.7.0.2-ce) the package supports.
What works in v0.1.0
upsert_nodes,upsert_relations— bulk MERGEget,get_triplets— filtered fetch by id / name / propertyget_rel_map(graph_nodes, depth=2, limit=30, ignore_rels=…)— depth-bounded BFS expansion, the load-bearing GraphRAG retrieval primitivestructured_query(cypher, param_map)— pass-through Cypher with named-bind translation ($entity→$1)vector_query(VectorStoreQuery)— cosine similarity over Chunk-node embeddings (client-side; see Performance below)delete(entity_names, relation_names, properties, ids)— selective delete; refuses to wipe the entire graph without at least one selectoraupsert_nodes,aupsert_relations,aget_*,astructured_query,avector_query— async viaasyncio.to_thread
Performance
vector_query in v0.1.0 pulls every Chunk's embedding and scores client-side — O(N) in chunk count, fine for graphs up to ~thousands of chunks. The v0.2.0 path stores chunk embeddings in a parallel SQL table with HNSW for sub-linear lookup. Native get_rel_map via variable-length path matches (MATCH p = (a)-[*1..N]-(b)) is also queued for v0.2.0 — current path is single-hop Cypher in a Python BFS.
Engine requirements
synapcores/community:v1.7.0.2-ceor newer (needs Cypher on/v1/query/execute— fixed in #223)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_graph_stores_synapcores-0.1.0.tar.gz.
File metadata
- Download URL: llama_index_graph_stores_synapcores-0.1.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b32137cc6b59799872622b55110dfe357bc4cb38d03d7364cb7b0a1e943700fe
|
|
| MD5 |
e692d49db761d08cde1eef83c1ee029a
|
|
| BLAKE2b-256 |
9b80c0e269f79336b2242efbb70574c2be378142c47c4c47eac013cae092aebb
|
File details
Details for the file llama_index_graph_stores_synapcores-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_graph_stores_synapcores-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fb594e00dd349ac0f1559f5663058344c5ef5f2d0190ab5eb3195b982b25e25
|
|
| MD5 |
e77ea2c402a57b0304e391467fdcb130
|
|
| BLAKE2b-256 |
5cefa7c9654bbe7f7ce2ea5bd0475470b0d87f93057709577d7a66c1c152235e
|