Where Did This Maintenance Claim Come From?
Represent claims and their sources, retain contradictions and apply explicit time boundaries before using graph evidence.
13 sections · 4 questions · 1 coding challenge
The arrow keys move between sections too.
Derived Results Needed a Traceable History
BOTIE
Our maintenance claims have the same need on a smaller scale. A recorded source helps us inspect a disagreement or withdraw a superseded claim. Provenance explains how information arrived; it is not a certificate of truth.
Sources for this history
The Graph Contains Two Conflicting Answers
One document says P7 is overdue for inspection. A later log says the inspection is current. If Botie stores one unqualified status on the asset, whichever import runs last can erase the disagreement.
Keep the claims and their supporting records visible. We can then ask who supplied a claim, when it became usable and whether it still applies. Choosing evidence for review is different from declaring one source correct.
Invented maintenance records. Python exercises and workshop components expose the mechanism locally. Source-linked Cypher or SPARQL examples require the stated external database setup.
Step 1 of 1
Keep each assertion attached to its evidence
Two statements concern P7 without being collapsed into one status property.
Nodes and properties (5)
- C1 · Overdue
- manual-A · Source document
- P7 · Asset
- C2 · Current
- log-B · Inspection log
- C1 to manual-A: WAS_DERIVED_FROM
- C1 to P7: ABOUT
- C2 to log-B: WAS_DERIVED_FROM
- C2 to P7: ABOUT
Select the evidence available for this decision
Source and time filters select eligible claim evidence without erasing conflicting statements or asserting that the surviving sources must be correct.
Select the evidence available for this decision
The claims include conflicting, expired, future and unapproved records.
BOTIE
Result for these records
- 0C1
- 1C2
Follow the operations
1. Claim and provenance records
[ { "id": "C1", "subject": "P7", "statement": "inspection overdue", "source": "manual-A", "observed_at": 2, "valid_until": 8 }, { "id": "C2", "subject": "P7", "statement": "inspection current", "source": "log-B", "observed_at": 4, "valid_until": null }, { "id": "C3", "subject": "P7", "statement": "inspection current", "source": "manual-A", "observed_at": 9, "valid_until": null }, { "id": "C4", "subject": "P7", "statement": "inspection overdue", "source": "unknown", "observed_at": 1, "valid_until": null } ]2. Permitted source IDs
- 0manual-A
- 1log-B
3. Keep claims from permitted sources
[ { "id": "C1", "subject": "P7", "statement": "inspection overdue", "source": "manual-A", "observed_at": 2, "valid_until": 8 }, { "id": "C2", "subject": "P7", "statement": "inspection current", "source": "log-B", "observed_at": 4, "valid_until": null }, { "id": "C3", "subject": "P7", "statement": "inspection current", "source": "manual-A", "observed_at": 9, "valid_until": null } ]4. Decision hour
6
5. Keep claims valid at the requested time
[ { "id": "C1", "subject": "P7", "statement": "inspection overdue", "source": "manual-A", "observed_at": 2, "valid_until": 8 }, { "id": "C2", "subject": "P7", "statement": "inspection current", "source": "log-B", "observed_at": 4, "valid_until": null } ]6. Collect distinct identifiers
- 0C1
- 1C2
7. Result
- 0C1
- 1C2
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher.
1. Make the assertion an identifiable record
A Claim node can contain its statement, subject and stable claim ID. Separate relationships connect it to the asset and source document. This lets several claims concern the same asset without overwriting each other.
Retain enough source detail to locate the supporting passage or inspection event. A document title alone is often insufficient when revisions change its contents. Prefer a stable document/version identifier plus a specific locator.
Claim identity keeps disagreement inspectable instead of turning import order into an evidence policy.
2. Distinguish source permission from source reliability
The requested reader may be allowed to use only particular source documents. That access check must happen before evidence is exposed. A separate quality policy decides which sources are acceptable for the task.
Our workshop receives a permitted-source list and retains only those claim records. Inclusion means the claim passes this supplied policy, not that its statement is verified. Real source permissions belong in the server-side access boundary.
The browser fixture demonstrates selection over invented data and is not an access-control system.
3. Draw the interval during which a claim applies
For this exercise, observed_at is the hour the claim became available to this decision process. valid_until is the first hour at which we stop treating it as applicable; null means no stated end. All values use one invented integer-hour clock.
At hour eight, a claim with valid_until eight has expired. A claim first available at hour nine cannot justify an hour-six decision. In real systems, keep event time, ingestion time and validity intervals separate when those meanings differ.
We require availability at or before the requested time and an end strictly after it, when an end exists.
Inspect an exclusive end boundary
The claim was available at hour two and expires at eight.
observed_at=2
valid_until=8
for at in [7,8]:
print(observed_at <= at and at < valid_until)True
FalseThe exact end hour belongs to the next state, preventing overlapping interpretations at the boundary.
Check yourself
Questions on Parts 1 to 3
Question 1 of 2
Which claim passes this time policy?
Use the information below.
C1 is available from hour 2 until hour 8, with the end excluded. C2 becomes available at hour 9. The requested hour is 8.4. Retrieve evidence without hiding a disagreement
Apply the source and time predicates to claim records, then return their identities and source links. If two surviving claims contradict each other, return both for the defined review process. Do not let a dictionary keyed only by asset discard one.
A later stage may resolve conflicts using an approved policy, but that decision should leave an audit trail. A confidence score alone is not proof that an unsupported claim beats a documented one.
The query below uses a property-graph claim model inspired by provenance practice; it is not a PROV-O RDF serialisation.
Run in your own environment
List current permitted claims about P7
All fixture times are integer hours, so the boundaries can be checked by hand.
In an empty test database run CREATE (a:Asset {id:'P7'}),(d:Document {id:'manual-A'}),(e:Document {id:'log-B'}),(c:Claim {id:'C1',statement:'inspection overdue',observed_at:2,valid_until:8}),(f:Claim {id:'C2',statement:'inspection current',observed_at:4}),(c)-[:ABOUT]->(a),(c)-[:WAS_DERIVED_FROM]->(d),(f)-[:ABOUT]->(a),(f)-[:WAS_DERIVED_FROM]->(e).
Bind asset P7, allowed_sources [manual-A, log-B] and at 6 as driver parameters. Enforce access to every matched entity and relationship according to the service policy.
MATCH (c:Claim)-[:ABOUT]->(a:Asset {id:$asset}),
(c)-[:WAS_DERIVED_FROM]->(d:Document)
WHERE d.id IN $allowed_sources
AND c.observed_at <= $at
AND (c.valid_until IS NULL OR $at < c.valid_until)
RETURN c.id, c.statement, d.id
ORDER BY c.idBoth C1 and C2 survive. The query reports current permitted evidence, including its disagreement.
Official documentation. Documentation checked .
5. Retain derivation when a model extracts the claim
An extraction model can misread a sentence or associate it with the wrong asset. Record the source span, extraction version and review status so the graph statement can be checked against the original. A citation pointing to an entire unrelated manual is weak evidence.
When a source is withdrawn, investigate derived claims and downstream summaries that used it. Preserve the minimum audit evidence needed under the retention policy rather than copying sensitive source text into every log.
Provenance gives a route for correction, provided downstream results retain their dependencies.
6. Keep uncertainty visible to the answerer
A graph can contain stale, contradictory or incomplete evidence. The response may need to say that available records disagree, or request inspection rather than assert a status. That behaviour can be tested using deliberately conflicting fixtures.
The coding task stops at eligible claim IDs. It does not infer truth, apply natural-language contradiction detection or call a language model.
A narrow evidence-selection result is useful because its meaning can be inspected and tested.
Check yourself
Questions on Parts 1 to 6
Question 1 of 2
What should the evidence-selection stage return?
Use the information below.
At hour 6, permitted C1 says overdue and permitted C2 says current. Both are within their stated validity periods.Try it with Botie
Build with Botie
Write and run Python