lbb_commit
Write triplets, entity properties, and embeddings to a knowledge graph. Retract incorrect facts or label search result relevance, with idempotent deduplication and backfill timestamps.
Instructions
Write graph facts, retract them, or label search results. mode=facts writes triplets/embeddings/properties; mode=retract removes a wrongly-added fact (by edge or by entity) without a full reset; mode=search_feedback labels query/result relevance after lbb_search (Feedback grades: 3=ideal/good, 1=partial, 0=bad; include query, search_id when available, target, rank, score). Explicit idempotency_key wins; when omitted, MCP derives a stable content hash so content-identical retries dedupe. Facts mode defaults edge_idempotency to append; pass skip_unchanged for re-runnable backfills.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| graph | No | Graph to target; defaults to the connection's graph | |
| branch | No | Branch to target; defaults to the connection's branch | |
| triplets | No | ||
| observed_at | No | Backfill timestamp (RFC3339). Records this commit AS OF that instant: stamps transaction time and defaults each triplet's valid_time.start. Replay history in order with observed_at per commit so as-of reads by date work. Omit for live writes. | |
| retract_edges | No | mode=retract: specific edges to remove, matched by (source, relation, target). | |
| idempotency_key | No | ||
| search_feedback | No | ||
| edge_idempotency | No | Defaults to append in MCP. Use skip_unchanged for backfills; it skips exact current-edge duplicates and drops evidence-only repeats. | |
| retract_entities | No | mode=retract: entities whose every current edge is removed (a current-state tombstone; the record and its history are kept for as_of reads). | |
| entity_embeddings | No | ||
| entity_properties | No | Typed scalar attributes per entity. Each item is { type, name, properties }. `properties` is a flat map of field -> value, e.g. { "type": "PERSON", "name": "Ada Lovelace", "properties": { "h_index": 52, "title": "VP", "last_contact": "2026-06-26" } }. Values are coerced to each field's declared type, so a string like "2026-06-26" lands in a date_time field and "52" in an i64 field. (The verbose form [{ field, value: { i64: 52 } }] is also accepted.) Register a field first with lbb_configure evolve_ontology add_property; the commit response echoes written_properties so you can confirm what landed. |