Usage
Parameters
name
(str): Name of the graph to updateadditional_filters
(Dict[str, Any], optional): Optional additional metadata filters to determine which new documents to includeadditional_documents
(List[str], optional): Optional list of additional document IDs to includeprompt_overrides
(GraphPromptOverrides | Dict[str, Any], optional): Optional customizations for entity extraction and resolution prompts
Returns
A Graph object representing the updated knowledge graph.Description
This method processes additional documents matching the original or new filters, extracts entities and relationships, and updates the graph with new information. The graph update operation:- Retrieves additional documents based on filters and/or specific document IDs
- Extracts entities and relationships from these documents
- Intelligently merges new entities and relationships with the existing graph
- Returns the updated graph with all entities and relationships
Advanced Examples
With Entity Resolution Examples
With Entity Extraction Examples
Notes
- The graph name must match an existing graph that the user has access to.
- Either
additional_filters
oradditional_documents
(or both) should be provided; otherwise, no new content will be added to the graph. - When using
additional_filters
, these are applied in addition to any filters used during graph creation. - The
prompt_overrides
are applied only to this update operation and do not permanently change the configuration of the graph.