Dialogue Acts and Conversation Structure › Worked Example: Booking a Study Room
Language AI HandbookAll chapters We now turn to the running example. The dialogue involves three speakers: A (Ana), B (Ben), and C (Cleo). Ana wants to book a study room. Ben is helping her. Cleo interjects with a question about the same room.
The study-room example uses three participants and two threads. Ben's clarification lets Ana specify a room size. Cleo's separate question tests whether a tracker can keep replies in the right thread. Ben's later correction tests whether the state can replace a candidate.
The dialogue has ten turns:
- A: "Can I book a study room for Thursday at 3pm?" (request)
- B: "Do you need a small room or a large room?" (clarify)
- A: "The first one, please." (inform)
- B: "Room 204 is free then." (offer)
- A: "Great, book it." (accept)
- C: "Sorry, is 204 free at 4pm too?" (question)
- B: "No, 204 is booked at 4." (answer)
- B: "Actually, 204 is taken at 3. How about 205?" (repair)
- A: "That works, thanks." (accept)
- B: "Booked." (acknowledge)
The dialogue exhibits several phenomena:
- Clarification subdialogue. Ben names two sizes in turn 2. Ana's reply in turn 3 refers to the order of those options.
- Acceptance and confirmation. Ana accepts the offer in turn 5. Ben reports the booking in turn 10.
- Repair. Ben retracts the earlier offer and proposes room 205 in turn 8.
- Interleaved question. Cleo asks Ben about the room in turn 6. Ben answers Cleo in turn 7. These turns advance a separate inquiry.
The task is to track the state of the booking conversation: day, time, size, and room. The gold state after turn 10 is:
day: Thursdaytime: 3pmsize: smallroom: 205
The reference is an interpretation of the booking thread. The initial offer mentions 204, and that number also appears in a separate availability inquiry. Ben later retracts the initial offer and Ana accepts the alternative. The final booking time remains 3pm.
We will compare two trackers: a context-free baseline that processes each turn in isolation, and a context-aware tracker that uses reply links and act labels.
Segmentation
Segmentation divides a conversation into turns or other declared units. Each line is one turn in this example. A chat platform can supply message boundaries directly. Finding turn or act boundaries in a continuous speech signal may require an additional model and an annotation policy.
Speech segmentation needs an annotation policy for short feedback, overlaps, and pauses. For example, a listener's "mm-hmm" can occur during another person's turn. A diarization track can represent both speakers at the same time. An annotation scheme also needs to decide which stretches count as communicative units and whether boundaries align to words or times.
Act labeling
Act labeling assigns functions to annotated units, which can be turns or smaller segments. The fixture supplies one label per message from this inventory: request, clarify, inform, offer, accept, question, answer, repair, acknowledge.
The same short utterance can fill several functions. "3pm" could answer a question, confirm a suggested time, or propose a new time. An online act labeler can use the preceding turn, an available reply link, and the current task state. Evaluation should specify which of those inputs are supplied.
Response linkage
Response linkage identifies the earlier turn a reply addresses. This example supplies the links. A chat platform may record some links explicitly and leave others to be inferred. The dialogue uses the following links.
- Turn 2 replies to turn 1 (clarification of the request).
- Turn 3 replies to turn 2 (answer to the clarification).
- Turn 4 replies to turn 1 (offer in response to the request).
- Turn 5 replies to turn 4 (acceptance of the offer).
- Turn 6 replies to turn 4 (question about the offered room).
- Turn 7 replies to turn 6 (answer to Cleo's question).
- Turn 8 replies to turn 4 (repair of the offer).
- Turn 9 replies to turn 8 (acceptance of the repaired offer).
- Turn 10 replies to turn 9 (acknowledgement of the booking).
The annotated repair illustrates a reply beyond the most recent turn. Turn 8 reaches back to turn 4 across turns 5 to 7. A baseline that always links to the preceding turn misses this edge. A comparison can score exact target accuracy when each reply has one gold target, or link-level precision and recall when turns can have several targets.
Conversation membership
Conversation membership is the task of determining which turns belong to the same conversation. In our example, the booking conversation is the A-B thread. Cleo's question (turn 6) and Ben's answer (turn 7) form a side thread that does not belong to the booking conversation.
The toy rule admits a root from an eligible booking participant. It admits a later reply if that speaker is eligible and the reply’s parent was admitted. Turn 6 has speaker C and is excluded. Turn 7 has speaker B, but its parent is turn 6, so it is also excluded.
Both threads discuss room 204. The fixture contains one eligible booking root. The helper would also admit another root from A or B and combine its admitted replies with the booking. For concurrent bookings by the same pair, select the root ID for the booking you want to track and pass only that root and its reply descendants to the tracker. The speaker and admitted-parent checks still apply within that branch.
Context-free tracking
The context-free tracker processes each turn in isolation. It extracts slots from the text using pattern matching and applies them to the state, overwriting previous values. It does not use reply links, act labels, or conversation membership.
The baseline writes matching fields from each message in order. For a longer evaluation, define a copy-forward baseline explicitly. Reusing the previous annotated state measures reference stability. Reusing the tracker’s own prediction can propagate its errors.
Three incorrect values remain at the end.
- The clarification question contains both sizes. The extractor tests small, medium, and large in that order. It keeps renewing the slot as it finds a match, so it retains large. It cannot resolve Ana's ordinal reply.
- Cleo's question contains 4pm, which overwrites 3pm. Ben's reply repeats 204, but its bare '4' matches no time pattern, so the wrong 4pm is carried forward.
- Ben's repair contains both 204 and 205. The baseline keeps the first match, 204.
Context-aware tracking
The context-aware tracker uses reply links and act labels. It applies three rules:
- Conversation membership. The tracker considers updates only on admitted turns.
- Reply-to routing. An answer labeled
informcan select a size by its position in the linked question. The clarification question itself leaves the state unchanged. - Repair replacement. The toy parser takes the last room number in a repair turn, corresponding to the replacement candidate in this fixture.
The rules use the supplied reply links and act labels differently. Membership controls which turns can write to the booking. The reply target supplies the two options for Ana's short answer. The repair label activates a distinct rule for which room number to extract.
The context-aware tracker derives 'small' from the linked question, preserves 3pm across Cleo's side inquiry, and changes the candidate to room 205 when Ben repairs his offer.
Evaluation
We evaluate the final state after turn 10, for the booking conversation only, on the four slots day, time, size, and room. The gold state is specified independently by hand. We report two metrics:
- Joint-state match: 1 if all four slots match the gold state, 0 otherwise.
- Slot matches. Record a binary match for each slot. The fraction across the four indicators summarizes how many slots agree in this case.
A joint-state match requires every field in this task's four-slot representation to agree. A slot-level report shows where the errors are. For many evaluation cases, average the per-case exact matches and report the slot reference policy, including whether absent slots count. A tracker can recover these four values and still need separate checks before taking an external action.
The summary metrics concern the booking state immediately after turn 10. The state timeline uses separately annotated prefix states to show where each tracker's errors begin. The next-speaker demonstration uses the actual next post in the whole channel as its target.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!