LRriver commented on issue #343: URL: https://github.com/apache/hugegraph-ai/issues/343#issuecomment-4621948584
> Hi, I would like to work on this issue. > > My plan is to: > > * Add a `split_type` parameter to `GraphExtractFlow.prepare()` and `build_flow()`, defaulting to `document` to preserve the current behavior. > * Pass the selected split type from the demo graph extraction UI through `extract_graph()` and `SchedulerSingleton`. > * Keep the accepted values aligned with the existing `ChunkSplit` operator: `document`, `paragraph`, and `sentence`. > * Add tests for default behavior, non-default split types, invalid split type handling, and helper forwarding. > > Please let me know if this direction looks good. Thanks! Thanks for offering to work on this. The overall direction looks good. Before starting the implementation, please also clarify the concrete document chunking strategy in the PR description/design, not only the exposed `split_type` names. In particular, please explain the chunk size, overlap strategy, separator behavior, and whether there is any document-oriented strategy that would be more suitable for graph extraction on long documents. A few implementation expectations: - Add `split_type` as an optional argument, defaulting to `document`, so existing callers keep the current behavior. - Pass `split_type` through `GraphExtractFlow.prepare()` / `build_flow()` and the demo `extract_graph()` helper, preferably by keyword. - Add a demo UI selector for the supported split strategies and forward the selected value to `SchedulerSingleton.schedule_flow(..., split_type=...)`. - Keep invalid values failing with a clear error message that lists the supported values. - Please avoid breaking the existing `vertices` / `edges` JSON contract used by “Load into GraphDB”. If exposing `chunk_count`, put it behind a debug/meta path or log it in a clearly testable way. - Since your previous PR #356 adds PDF-to-text support through the document upload path, please also consider compatibility between extracted PDF text and chunk splitting. For example, page boundaries, missing paragraph breaks, scanned/unreadable PDF handling, and long continuous text should not cause surprising graph extraction behavior. Suggested tests: - Default behavior remains `document`. - A non-default split type reaches `ChunkSplitNode` / `ChunkSplit`. - Invalid split type fails clearly. - The demo helper forwards the selected split type. - Suitable long document input produces multiple chunks according to the documented chunk size and overlap strategy. - PDF-extracted text, or representative text shaped like PDF extraction output, is covered or at least considered in the test/design notes. With these details covered, this should be a good first PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
