Adding Fact Triplets
Manually specify fact/node triplets to add structured relationships to your graph
Overview
You can add manually specified fact/node triplets to the graph. You need only specify the fact, the target node name, and the source node name. Zep will then create a new corresponding edge and nodes, or use an existing edge/nodes if they exist and seem to represent the same nodes or edge you send as input. And if this new fact invalidates an existing fact, it will mark the existing fact as invalid and add the new fact triplet.
The add_fact_triple method returns a task_id that can be used to track the processing status of the operation. See the Check Data Ingestion Status recipe for how to poll task status.
Adding a Fact Triplet
Advanced Options
Setting Node and Edge Attributes
You can attach custom scalar attributes to nodes and edges when creating fact triplets. This allows you to store additional metadata that can later be used for filtering in graph searches.
Attribute values must be scalar types: string, number, boolean, or null. Nested objects and arrays are not supported.
Specifying Node UUIDs
You can also specify existing node UUIDs and other temporal metadata. See the associated SDK reference for complete details on all available parameters.
When passing source_node_uuid or target_node_uuid, the specified nodes must already exist in the graph. Providing UUIDs for non-existent nodes will result in an error.