retrico.build_graph_from_pdf() works for some PDFs but fails for others during graph_writer when using FalkorDB.
After additional debugging, the issue does not appear to be limited to a specific text payload field. The failures occur across multiple writer methods and consistently point to parameterized Cypher placeholders like $id / $entity_id.
This looks more like a FalkorDB parameterized-query compatibility issue than a pure PDF parsing issue.
### Environment
- Python 3.12
- `retrico` installed in conda environment
- backend: `store_type="falkordb_lite"`
- tested on April 1, 2026
- GPU/CPU setting does not seem to change the failure mode
### Minimal code
```python
import retrico
from pathlib import Path
PDF_PATHS = [str(p) for p in Path("pdf_folder").glob("*.pdf")]
ENTITY_LABELS = [
"person",
"organization",
"location",
"asset",
"money",
]
RELATION_LABELS = [
"works_for",
"owns",
"located_in",
"part_of",
"family",
"has_value",
]
retrico.build_graph_from_pdf(
pdf_paths=PDF_PATHS,
entity_labels=ENTITY_LABELS,
relation_labels=RELATION_LABELS,
extract_text=True,
extract_tables=False,
device="cuda",
store_type="falkordb_lite",
)
What I observed
I tested PDFs one-by-one.
Total PDFs tested: 28
Succeeded: 17
Failed: 11
Example errors
RuntimeError: Node 'graph_writer' failed: errMsg: Invalid input at end of input: expected '=' ... errCtx: CYPHER id
redis.exceptions.ResponseError: errMsg: Invalid input at end of input: expected '=' ... errCtx: CYPHER entity_id
can i know whats the issue?
retrico.build_graph_from_pdf()works for some PDFs but fails for others duringgraph_writerwhen using FalkorDB.After additional debugging, the issue does not appear to be limited to a specific text payload field. The failures occur across multiple writer methods and consistently point to parameterized Cypher placeholders like
$id/$entity_id.This looks more like a FalkorDB parameterized-query compatibility issue than a pure PDF parsing issue.
What I observed
I tested PDFs one-by-one.
Total PDFs tested: 28
Succeeded: 17
Failed: 11
Example errors
RuntimeError: Node 'graph_writer' failed: errMsg: Invalid input at end of input: expected '=' ... errCtx: CYPHER id
redis.exceptions.ResponseError: errMsg: Invalid input at end of input: expected '=' ... errCtx: CYPHER entity_id
can i know whats the issue?