The Knowledge Graph is the reusable memory layer for facts, entities, and retrieval context that helps PromptPress write with better continuity over time.
Current Ownership Model
The current system separates KG into 2 distinct roles:
- Workflow-time retrieval and context injection
- Publish-time final article extraction and review
This means:
- workflows can consume KG context while they run
- publish owns final article KG extraction
- empty KG is a valid publish outcome
What Happens During Workflow Runs
When KG is enabled, workflow steps can receive:
kg_contextfactsentitiesknowledge_chunksseries_historyrag_context
This helps planning, research, writing, and editing with prior context.
Important:
- missing KG context does not fail the workflow
- workflow-time KG is helpful context, not a hard gate
- final canonical article KG is not owned by the workflow engine anymore
What Happens At Publish
Publish is the canonical final review stage for article-level KG and related summaries.
At publish time, PromptPress can perform:
- focused story entity selection
- final entity and fact extraction
- sentiment summary
- persona evaluation summary
- article metadata updates
Focused Entity Selection
Before final extraction, publish first tries to identify only the primary and important secondary story entities.
Current behavior is:
- strict focused selection first
- one broadened retry if the first result is a valid empty list
- if still empty, final entity/fact extraction is skipped
This is intentional. Not every article should create canonical graph entities.
Empty KG Is Valid
Some articles are valid even when they do not produce useful canonical entities or facts.
Examples:
- opinion/editorial pieces
- abstract commentary
- articles without stable story entities
When that happens:
- publish still succeeds
- entity/fact extraction is skipped
- the system should treat the result as
empty, not automatically as broken
Sentiment and Persona
Publish also owns final article-level:
metadata.sentiment_summarymetadata.persona_evaluation_summary
These are stored alongside publish processing metadata so the final article has a canonical review state.
Enforce KG
Enforce KG is a publish-time strictness flag, not a run blocker.
When enabled:
- publish checks the quality of primary NLP output
- if the primary output is weak or unavailable, one strict LLM fallback can produce minimal structured sentiment, entities, and facts
Important:
- this does not block the workflow run
- this does not require KG to always exist
- it is meant to improve final publish-time output quality
Scheduled Maintenance and Dedupe
KG maintenance still runs later for graph hygiene.
Current maintenance can:
- refresh entity profiles
- generate merge candidates
- support dedupe and consolidation over time
This is helpful when fallback or repeated article creation introduces partial overlap that should be reviewed and merged later.
Good Team Practices
- keep reusable facts short and atomic
- avoid speculative claims in canonical entries
- review merge candidates regularly
- treat source attribution and incidental mentions as graph noise unless they are truly part of the story
Common Anti-Patterns
- dumping long notes as if they are canonical facts
- treating every noun as an entity worth storing
- mixing temporary brainstorming notes with reusable knowledge
- expecting every article to produce graph-worthy facts