Carrier Log in
← All tutorials

Update a belief map live with AI processing

A belief map next to a chat. An AI-processed variable reads the map and the conversation every 15 seconds and updates the map.

  1. Map beliefs before the chat

    A task segment runs the belief-map app, docs/examples/belief-structure-customapp.html, with starter beliefs for this question. Participants drag, name and connect beliefs. An OUT binding saves the map as initial_belief_structure.

    The study also has two alias variables:

    • belief_structure: the live map.
    • chat_history: the transcript of the conversation.
    Carrier saves the starting map as initial_belief_structure.
  2. Dock the map beside the chat

    A second copy of the app is in a task segment after the chat. Set it to Display Mode Embedded, with the Split layout. The map fills the main area, and the chat moves to the side. The chat ends when the participant continues from the map.

    This copy reads the starting map, so participants continue from their last map.

    Map your beliefs becomes a split panel next to the chat.
  3. The AI-processed variable

    output_belief_structure reads two sources: the live map and the transcript. Its user prompt gives both to the model. Set these items:

    • Format JSON: Carrier parses the reply. If the reply is not valid JSON, Carrier tries one more time.
    • Scope Chatroom: the variable runs one time for the room.
    • Capture scope: the map segment only.
    • Update trigger Periodic, every 15 000 ms: the variable runs while the map segment is open.

    The variable runs only if the chat has new messages since the last run. Thus a quiet conversation costs nothing. The prompt tells the model to keep all the data it gets, and add only the new data from the conversation.

    Two sources, a prompt, JSON output and an update every 15 seconds, for the map segment only.
  4. Feed the result back into the map

    An IN binding sends output_belief_structure to the app as beliefStructure. The OUT binding of the app updates belief_structure when the participant edits the map. Thus each update starts from the current map. Then deploy the study.

    IN beliefStructure ← output_belief_structure, then deploy.
  5. What the participant sees

    The participant makes a belief map. Then they talk with an AI discussion partner next to their map.

    When the participant says something new, the map shows a proposed update within one cycle. Here, the new item is a concern that AI help removes the need to think. The map does not change without the participant's decision:

    • Apply adds the new belief and its link.
    • Keep mine refuses the update.

    The beliefs that the participant accepts become their map.

    The demonstration study also has a guided onboarding in the chat before the discussion. This tutorial does not show it, so that it can show only the processing.

    A concern from the chat comes back as a new belief, linked to the map, when the participant applies it.