Skip to content

feat: add ExtractionPostProcessor protocol#4

Merged
cdel1 merged 2 commits intomainfrom
feat/post-processor
Apr 22, 2026
Merged

feat: add ExtractionPostProcessor protocol#4
cdel1 merged 2 commits intomainfrom
feat/post-processor

Conversation

@cdel1
Copy link
Copy Markdown
Owner

@cdel1 cdel1 commented Apr 22, 2026

Summary

  • Adds ExtractionPostProcessor as a @runtime_checkable Protocol in interfaces.py
  • Protocol exposes a single async method: process(result, existing_entities) -> ExtractionResult
  • Exported from graphrag_core public API (import + __all__)

Test plan

  • TestExtractionPostProcessor::test_protocol_has_process_method — protocol has process attribute
  • TestExtractionPostProcessor::test_custom_post_processor_satisfies_protocol — duck-typed class satisfies isinstance check
  • Full suite: 203 passed, 19 skipped

cdel1 added 2 commits April 20, 2026 12:37
ChunkExtractionResult contains dict[str, Any] properties which are
incompatible with OpenAI's strict structured output mode. Pydantic
validates the response client-side instead.
Adds a runtime-checkable Protocol for optional post-processing between
extraction and storage. Lacuna (Layer 2) will implement this with
ClaimNormalizer for entity resolution and claim deduplication.
@cdel1 cdel1 merged commit 2b26883 into main Apr 22, 2026
1 check passed
@cdel1 cdel1 deleted the feat/post-processor branch April 22, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant