Skip to content

## Add Document Ingestion Support for Knowledge Graph - #8

Merged
haolpku merged 2 commits into
OpenDCAI:mainfrom
KeyCOrigin:develop
Sep 15, 2026
Merged

haolpku merged 2 commits into
OpenDCAI:mainfrom
KeyCOrigin:develop

Conversation

@KeyCOrigin

Copy link
Copy Markdown

Background

Graph path ingestion previously supported only plain-text formats such as TXT and Markdown. DOCX files could be ingested into KB/RAG, but were skipped during Graph
ingestion.

Changes

  • Reused the unified document extraction pipeline for Graph ingestion.
  • Added support for DOCX, PDF, PPTX, HTML, JSON, and other supported document formats.
  • Preserved direct reading for plain-text files.
  • Preserved source paths on generated graph triples.
  • Reported extraction failures through the skipped result.
  • Kept CSV and Excel files in the structured database ingestion path.
  • Added a DOCX Graph ingestion regression test.

Why This Is Necessary

KB/RAG and Graph ingestion previously used different file filtering and extraction logic. The same DOCX file could be stored in KB but could not be processed into
the knowledge graph.

This change aligns both ingestion paths and prevents supported documents from being silently skipped.

Verification

  • Tested with 10 DOCX documents.
  • Successfully processed all 10 documents.
  • Generated 280 graph triples.
  • Skipped 0 documents.
  • Graph tests: 13 passed.
  • Full test suite: 189 passed, 5 skipped.

@haolpku
haolpku merged commit d689c1c into OpenDCAI:main Sep 15, 2026
2 checks passed
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.

2 participants