The Context Engine Studio is now open source.  View on GitHub →
Clinia

From Theory to Practice

Which graph types, VFS paths and REST operations sit behind Recorded Memory and Learned Memory.

Recorded Memory and Learned Memory are high-level concepts that describe the content of a patient graph, but they are not concrete API objects you interact with when using the Context Engine. The API returns facts, narratives, memories and the edges between them.

The patient graph: the nodes Recorded Memory and Learned Memory produce, and the edges between them

Four families of REST operations touch these objects.

FamilyOperationsWhat it returns
Graphlist-nodes, get-node, list-edges, get-edge and one query operation per node and edge type, shown as Query nodes and Query edges (technical preview)The nodes and edges themselves
VFSbrowse-vfs and read-vfsFolders and files rendered from the graph
Sessionsget-session and list-session-memoriesA session's metadata and its memories
Ingestioningest-fhir-r4, ingest-fhir-r5, ingest-cda-r2, ingest-sessions, list-ingestions and get-ingestionReceipts that track a submission and none of the objects it produces

Recorded Memory objects

Six node types make up Recorded Memory.

ObjectWhat it isVFS pathsREST operations
extracted_factThe state of a patient, as one source stated itNoneGraph operations, including query-extracted-fact-nodes
extracted_clinical_eventA point-in-time event such as an encounter, an observation, a procedure or an administered dose/timeline/Graph operations, including query-extracted-clinical-event-nodes
extracted_narrativeThe free-form text of a document/sources/Graph operations, including query-extracted-narrative-nodes
narrative_passageA sentence or paragraph of an extracted narrativeNoneGraph operations, including query-narrative-passage-nodes
factThe canonical state of a patient axis, merged from the extracted facts that describe itThe entity folders: /conditions/, /medications/, /labs/, /allergies/, /encounters/, /directives/, /insurance/, /family_history/ and /social_history/Graph operations, including query-fact-nodes, and read-vfs with structured format
narrativeA summary of narrative passages/conditions/{status}/{slug}/_narratives/Graph operations, including query-narrative-nodes

Four edge types record how the nodes were formed and what relates to them.

ObjectRuns betweenWhat it recordsVFS pathsREST operations
resolves_toAn extracted fact and its fact, and a narrative passage and its narrativeWhich canonical node an extracted node was merged intoNoneGraph operations, including query-resolves-to-edges
resolution_decisionTwo nodes of the same type that the engine comparedThe verdict (merge or reject), the rule that fired and the evidenceNoneGraph operations, including query-resolution-decision-edges
chunked_intoAn extracted narrative and its narrative passagesHow a text was split into passagesNoneGraph operations, including query-chunked-into-edges
relationshipA fact and a fact, a narrative and a fact, and a learned memory and a factA typed link, either a clinical link between facts or corroborates, enriches or conflicts for a narrative or a memoryA condition's _story.md and _narratives/, and the typed edges returned by read-vfs with structured formatGraph operations, including query-relationship-edges

The audit surfaces start with the graph operations

No VFS path shows a resolution edge, so tracing a fact back to its sources or reading why two nodes merged is done with the graph operations. Audit the Patient Graph walks through both.

Learned Memory objects

Three objects make up Learned Memory. Only the memory is a node in the patient graph.

ObjectWhat it isVFS pathsREST operations
SessionOne conversation with a patient, created by its first writeNoneget-session and ingest-sessions (technical preview), while create-session and upsert-session are deprecated
MessageOne turn of a sessionNoneNo operation returns messages, while append-messages is deprecated in favour of ingest-sessions
learned_memoryA statement kept from a session, of type symptom, adherence, concern or preference, stored as a short text passage/memory/{type}.md, plus the Patient-Reported section of a condition story and of a medication fileGraph operations, including query-learned-memory-nodes, and list-session-memories

A memory links back to a fact through the relationship edge described in Recorded Memory objects. The link follows three rules.

  • Only symptom memories, which link to conditions, and adherence memories, which link to medications, are linked to facts. concern and preference memories stay unlinked.
  • The link is typed corroborates, enriches or conflicts, depending on whether the memory agrees with the fact, adds context to it or contradicts it.
  • The link leaves the fact as it was. Memories are never merged or updated.

On this page