Knowledge Graph Parsing

Updated at:

The Knowledge Graph Parsing operator uses a large model to parse entities and relationships from unstructured data and writes them to a specified knowledge graph space. This topic explains how to configure this operator.

Prerequisites

  • To use the knowledge graph operator, you must first purchase Unstructured Data - Enterprise Edition for the current instance.

  • You have created a workflow. For detailed steps, see Create and manage workflows.

  • You have created a knowledge graph space and defined its schema. For detailed steps, see Create and manage knowledge graph spaces.

Background information

The Knowledge Graph Parsing operator automatically handles document parsing and chunking strategies, requiring no configuration. If you need more granular control over parsing or chunking, you can preprocess the data by using other operators, such as document parsing and text chunking, before this operator. You can then pass the processed results as a text field to this operator.

Limitations

The Knowledge Graph Parsing operator is supported only in offline workflows.

Permissions

In Basic projects, project administrators, developers, analysts, and custom project roles with the Dataset - Use permission can use all datasets within the project as the operator's input and output.

Procedure

  1. In the top navigation bar of the Dataphin homepage, choose R&D > Data Development.

  2. On the Development page, choose Project from the top navigation bar.

  3. In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list, click the target workflow to open its canvas. From the Operator Library on the left, drag the Knowledge Graph Parsing operator to the canvas, and then configure the following parameters in the Knowledge Graph Parsing pane on the right.

    Parameter

    Description

    Step name

    Enter a name for the operator. The name can be up to 64 characters long and contain any characters.

    Input configuration

    Dataset

    Select the dataset to process. You can choose a file dataset, hybrid dataset, or table dataset. After you select a dataset, you also need to select a Version. By default, the earliest version of the dataset is selected.

    When this operator is downstream from another operator, the selected dataset is typically the same as the output dataset from the upstream operator.

    Input field

    The source data for parsing. This parameter is required only for hybrid datasets and table datasets.

    • Hybrid dataset: You can select a field of the URL or text type. If you select a URL field, the system downloads the file from the URL and then parses it. If you select a text field, the system reads the field content directly as input.

    • Table dataset: You can only select a field of the text type.

    • File dataset: Only files in PDF, DOC, DOCX, XLSX, TXT, MD, and HTML formats are parsed. Other formats are skipped automatically. No input field configuration is required.

    Filter condition (Optional)

    Use SQL syntax. Enter only the filter condition, excluding the WHERE keyword. You can use system global variables, such as the business date ${bizdate}. Only hybrid datasets and table datasets support this configuration.

    Model configuration

    Model

    Specify the Model for this operator. You can only select models that are configured in Intelligent Application Management > Model Configuration, have a model type of Text or Vision, and are Enabled.

    Note

    Prompt (Optional)

    Provide additional business context or extraction guidelines to supplement the system's automatically generated prompt. Examples include domain-specific extraction guides, disambiguation rules, and attribute format constraints. The prompt cannot exceed 500 characters. The system automatically injects knowledge graph extraction rules, the description of the selected knowledge graph space, and the definitions of its entity and relationship types, so you do not need to add them here.

    Domain glossary (Optional)

    Upload a domain glossary file to improve extraction accuracy in specialized fields. The system injects these terms during parsing. Supported file formats are XLSX, XLS, TXT, and CSV. The maximum file size is 5 MB. You can hover over Template Format to view a template. Prepare your file according to the template and then upload it.

    After uploading the glossary, select an Injection mode:

    • top-K: The default injection mode. The system uses the vectorization model configured for the knowledge graph space to calculate the semantic similarity between terms and the text to be parsed. This top-K method injects only the most relevant terms. You must also set the Number of Injected Terms (the K-value) to an integer from 5 to 100. The default is 20. This mode is recommended for large glossaries.

    • All: Injects all terms from the glossary. This mode is suitable for small glossaries with 50 or fewer terms.

    Knowledge graph output

    Output knowledge graph space

    Select the knowledge graph space to write the parsed results to. You can choose any knowledge graph space that is created in the current instance and for which you have permissions. For spaces where you lack permissions, click Request Permissions to apply for access. The selected space also serves as the source for entity types, relationship types, and business identification rules. After you select a space, related configuration items are updated automatically.

    Output entity/relationship scope

    Limits the entity and relationship types that the large model recognizes. Results for types that are not selected are filtered out.

    • All entities/relationships: The default option. All entity types and relationship types from the selected knowledge graph space are included in the output. The latest changes to the graph schema are synchronized at the start of each task run.

    • Specify entities/relationships: Manually select the entity type and relationship type to include in the output. The relationship type is optional, but you must select at least one entity type. When you select a relationship type, the system automatically includes its source and target entity types, and you cannot deselect them.

    For more information, see Entity types and relationship types.

    Write mode

    • Overwrite: If a parsed result duplicates an existing entity or relationship, the system updates its attributes with non-empty values from the parsed result. Original values are preserved for attributes that are empty in the result.

    • Append-only: All parsed results are written to the graph as new entities and new relationships.

    • Full overwrite: Deletes all entities and relationships within the defined output scope and then writes the new parsed results. Use this mode with caution, as it is intended for scenarios where you are rebuilding the graph.

    Disambiguation settings

    Defines how to handle duplicate entities. This setting is required only when the Write mode is set to Overwrite and applies to all selected entity types.

    • Skip disambiguation: The default option. The system does not check for duplicates. All parsed results are written to the graph as new entities.

    • Perform disambiguation

      • Create directly: The system uses the business identification rules configured for the entity type to detect duplicates. It merges a parsed result with an existing entity only if it is highly confident that they are the same (and auto-merging is enabled for that entity type's business identification rule). In all other cases, new entities are created, and no candidates are generated for manual review. This option is suitable for high-quality data scenarios where you want to minimize manual review. When you select this option, the system uses all enabled business identification rules for the selected entity types but skips any rules that involve semantic similarity matching.

      • Submit for manual review (Recommended): The system automatically merges a parsed result with an existing entity when it is highly confident that they are the same (and auto-merging is enabled). For suspected duplicates, the system generates candidates for manual review on the Candidate Review page of the knowledge graph space. In all other cases, new entities are created. This option provides a balance between automation efficiency and preventing incorrect merges. The scope of rules used is the same as for the Create directly option.

    For more information, see Business identification rules.

    Note
    • The system controls the output schema of the Knowledge Graph Parsing operator. You cannot customize the output fields or their mappings.

    • If a selected type is deleted, the task's behavior changes: it fails if all selected types are deleted but runs if only some are deleted. In both cases, when you edit the operator again, a message indicates that an object has been deleted. You must modify the output scope before you can save the configuration.

  4. After you configure the operator, click Save in the toolbar at the top of the canvas.

    After configuring the operator, connect it to upstream or downstream operators to build a complete workflow.