Skip to main content

Graph Generation

Graph generation creates a knowledge graph from your uploaded documents and a defined schema in whyhow. It involves extracting entities, relationships, and properties from the document chunks and structuring them according to the schema.

Prerequisites

Before generating a graph, ensure that you have the following:

  1. Uploaded Documents: You should have uploaded the relevant documents containing the data you want to include in your knowledge graph. These documents can be in various formats, such as CSV, PDF, or unstructured text.

  2. Defined Schema: You should have created a schema that defines the structure and relationships of your knowledge graph. The schema specifies the entity types, relationship types, and their properties.

Schema

Graph Generation Process

To generate a knowledge graph in whyhow, follow these steps:

  1. Select Documents: Select the documents you want to use for graph generation from your workspace. You can choose multiple documents at once.

Graph Generation One

  1. Choose schema: Select the schema you want to apply to the selected documents. The schema will guide extracting and structuring entities and relationships from the document chunks.

Graph Generation Two

  1. Start Generation: Click the "Generate Graph" button to initiate the graph generation process. Whyhow will process the selected documents, extract entities and relationships, and structure them according to the defined schema.

Graph Generation Three

  1. Monitor progress: You can monitor the progress of the graph generation process in real time. Whyhow provides a progress bar and status updates to inform you about the current generation stage.

Graph Generation Four

  1. View graph: Once the graph generation is complete, you can view the generated knowledge graph in the Graph Visualization interface. You can explore the nodes, edges, and their properties interactively.

Graph Generation Done

Merge Nodes

If you can see the LLM has generated similar entities, or you would like two entities to be merged, you can use the merge graph functionality:

Merge Nodes

Node merging criteria can be saved as rules to be applied to future graphs:

Merging Nodes Rules

Best Practices

To ensure optimal graph generation results, consider the following best practices:

  1. Data Quality: Ensure that your uploaded documents are of good quality and contain relevant information. If necessary, preprocess and clean the data to remove any noise or inconsistencies.

  2. Schema Design: Design your schema carefully to accurately represent your domain's entities, relationships, and properties. A well-defined schema leads to more accurate and meaningful graph generation.

  3. Incremental Generation: Consider generating the graph incrementally if you have a large dataset. You can start with a subset of documents and gradually add more to the graph over time. This approach helps manage the complexity and resource requirements of graph generation.

  4. Entity Linking: Configure entity linking rules to disambiguate and resolve entities accurately. Entity linking ensures that similar entities are merged and linked correctly in the generated graph.

Visualizing these best practices, whyhow's graph generation capabilities allow you to create comprehensive and accurate knowledge graphs from your documents.