Graph Maintenance
The graph improves over time, but changes in models and content can create gaps.
What this page covers
Section titled “What this page covers”How to identify weak graph areas and re-run extraction safely.
Core workflow
Section titled “Core workflow”- Find likely extraction gaps:
pgm-admin sql "SELECT id, char_length(content) AS charsFROM entitiesWHERE type = 'document' AND extraction_status = 'completed' AND NOT EXISTS ( SELECT 1 FROM edges WHERE source_id = id AND source = 'llm-extraction' )ORDER BY chars DESCLIMIT 20"- Targeted refresh:
pgm-admin reextract --type document --no-edges-only- Full refresh with cleanup:
pgm-admin reextract --all --clean-edges- Quality and edge hygiene:
prune-edges --below <threshold>validate-edges --limit 200
reextractclears extraction state but keeps non-LLM edges intact.improve-graphcan rerun with alternate model/provider per batch.- Validate before production rollouts; use
--dry-runon risky commands.