Elamur Research

Making Grammar-Based Generation Easier to Deploy in Dialogue Systems

Paper · 2008 · David DeVault, David Traum and Ron Artstein

Summary

A dialogue system may know what it wants to say and still lack a suitable sentence to say it. A line written for that exact meaning is frequently a good choice, but someone has to anticipate the request and supply the wording. A grammar can assemble a new sentence from reusable pieces, but it takes work to teach the grammar which pieces express the meanings that the system actually uses. The authors address this problem with a way to build a grammar-based generator from examples. The developer writes or collects suitable lines, then marks which stretches of each line express which parts of its meaning. The generator learns from those examples and takes requests in the dialogue manager’s existing format. The study asks what this extra annotation buys in working dialogue systems.

The case study concerns Doctor Perez, a virtual character who takes part in spoken negotiation exercises. A request to speak comes as a frame, a collection of key–value pairs that can describe the intended speech act, its content and features such as polarity. Authors link those pairs to contiguous stretches of a sample utterance. A stretch can include several words, so the author can use the meanings the application already represents without defining a separate meaning for every word. The pipeline combines the links with sentence parses to extract a reusable grammar. It also learns how to prioritize promising grammatical expansions under the character’s 200ms response deadline. Both the grammar-based generator and a baseline that retrieves existing lines ran within that deadline.

The evaluation used 220 frame–utterance examples from earlier dialogues, with 198 for training and 22 for testing. Judges familiar with Doctor Perez rated successful outputs for overall suitability, taking accuracy and fluency into account together. Across training and test examples, human-written lines for the requested frames averaged 4.4 on the rating scale, compared with 4.0 for retrieved lines and 3.8 for generated ones. The human-written lines scored significantly higher than either automatic approach, and the comparison between the automatic approaches was inconclusive. On the test examples, the grammar-based generator returned output for 80% of requests and the retriever for 90%. The ratings for successful test outputs suggested a different tradeoff. The grammar-based outputs were less prone to very low ratings, while retrieval could return a fluent line with a serious error in meaning. The test ratings did not establish a statistically significant difference.

The study also examined whether specialists needed to repair the automatic parses before training. The authors found no significant rating benefit from that repair on these examples. With automatic parses, the extra manual task was linking stretches of the existing lines to parts of their frames. A system builder did that for the 220 examples in about 6 hours. The study therefore demonstrates a workable way to acquire a domain-specific grammar and fit it to an existing request interface. Its most useful comparison is between different kinds of coverage. Direct authoring gave the strongest rated wording where a line had already been supplied, retrieval returned lines for more held-out requests, and grammar-based generation could compose alternatives while requiring a complete match to the requested frame.

Deep dive: Making Grammar-Based Generation Easier to Deploy in Dialogue Systems

An example-based method learns to turn a dialogue system’s own meaning frames into sentences, trading extra authoring for more flexible output. · about 35 minutes to read

The problem and its context

A dialogue manager has a meaning to express

The paper starts from an application in which deciding what to convey and putting it into words are separate jobs. Doctor Perez reasons about the conversation using an internal state that includes beliefs, goals, plans and emotions. When the dialogue manager wants the character to speak, it sends a representation of the intended utterance to the generator. That request can specify an assertion, a question or another contribution to the conversation. The generator’s job is to find wording for the request. A fluent sentence can still fail at that job if it makes the wrong assertion or asks about the wrong thing. A short fragment can succeed because it serves an ordinary conversational purpose, such as asking for clarification. It is a practical problem of text generation.

Doctor Perez is part of a research effort on virtual humans for social training. The characters combine speech with behaviors such as directing their gaze, making gestures, and using facial expressions. In the exercise described in the paper, the human participant plays a U.S. Army captain named Captain Kirk. The doctor is designed to help the participant practice negotiation in a setting with multiple parties who need not share the same goals. His speaking repertoire therefore needs more than a collection of simple statements. It includes questions with different answer forms, expressions for hypothetical actions and plans, and shorter contributions that help participants take turns, establish what has been understood or repair misunderstandings. The generation problem is confined to finding the doctor’s wording, within a broader system for speech and spoken language.

The authors give roughly 200ms on modern hardware as the time available to find an utterance for Doctor Perez. That target matters whenever the generator has choices to explore. A grammar may license a large range of sentences, but the dialogue manager needs an answer promptly enough for the interaction to continue. The system also needs suitable coverage for the requests it actually makes. For this character, there is room for a degree of disfluency because he is designed to speak as a non-native speaker. The acceptable style is consequently defined partly by the character, while a statement with the wrong polarity can change what the character communicates. What sounds appropriate depends on the way the application uses English.

That distinction helps explain the paper’s broad conception of coverage. A system builder may care whether every request gets an answer, how closely the answer matches its meaning, whether the wording sounds appropriate, and whether the generator can produce more than one suitable version. The priorities can differ from one system to another. A generator that produces a fallback line on many requests is providing something different from one that generates only when it can account for the entire request. Likewise, the ability to produce several phrasings has practical value only if the available phrasings are acceptable for the character’s role. Those questions shape both the generator’s design and the study used to evaluate it.

Why the input format matters

The dialogue manager’s request starts from an attribute–value matrix. An attribute names a property and its value can be another structure or a terminal value. The resulting hierarchy lets the system group together related information. An utterance can include speech acts and other dialogue acts. The content of a speech act can describe a proposition, pose a question or specify a feature of the content, such as polarity or modality. Polarity distinguishes affirmation from negation. Modality can help characterize how the requested utterance presents an action or state, as in talk about a hypothetical plan. These are distinctions the generator must preserve when selecting its wording. The request puts linguistic decisions in contact with the system’s knowledge representation and reasoning.

Doctor Perez’s system already has a way to exchange such information between processes. It flattens the nested structure by recording, for each terminal value, the path of attributes from the root down to that value. The path serves as the key. The original nested attributes remain recoverable from the paths, while the request is available as a collection of pairs for processing. The paper calls this flat form a frame. Its example about the absence of medical supplies at the market shows why the representation needs both what the utterance is about and how the character presents it. A phrase can contribute the topic of supplies, while other wording gives the utterance its force as a negative assertion. That connection is the part of semantics the authoring task makes explicit.

The challenge grows as developers change the character’s reasoning. In the paper’s account, they add capabilities and reorganize existing ones, so the exact frames reaching the generator change frequently. Doctor Perez uses about 200 distinct output utterances in dialogue, and only hundreds of frames had occurred in actual conversations. The authors describe the space of possible frames as orders of magnitude larger than the observed set. The developer can review a sample of requests and give those requests good wording. Predicting which other requests will appear is a separate problem. A system that can compose wording from familiar ingredients has a reason to be useful even for a character with an existing repertoire.

There is also an integration cost when the generator uses a representation of its own. The dialogue manager already knows how to form a request in the application’s terms. A general-purpose realizer may expect the developer to express that request using its own categories and structure. The resulting translation needs knowledge of the application and the linguistic information required by the realizer. It also creates a place where changes to the application’s semantics can require corresponding maintenance. The authors report from experience that implementing such a translation can be comparable in effort to developing a small custom generator.

What the existing alternatives ask developers to supply

Canned text provides a straightforward response to these engineering pressures. A developer can write a line for a known request and decide in advance whether its words suit the intended meaning and character. A template permits some reuse by leaving parts of a line to be filled in. In the authors’ account, the relative simplicity of these alternatives makes them attractive when deploying a system is already expensive. For Doctor Perez, however, the repertoire of hand-written lines has to account for the changing requests of the dialogue manager. The paper treats the quality of such lines and the work of extending their coverage as distinct properties.

A grammar written for the application offers a different way to reuse work. It can encode pieces that combine across requests, creating productive coverage and opportunities for variation. The authors report that building this kind of grammar by hand requires a developer who understands the language and the domain. The work includes deciding how individual words and syntactic constructions correspond to the flat meanings available in the system. Even a carefully built application grammar has limited coverage. The paper places this experience alongside earlier generation work for virtual humans and earlier accounts of the difficulty of acquiring knowledge for generation. The underlying design problem concerns syntax and grammar formalisms.

A wide-coverage realizer gives developers grammatical resources they can start from. The paper cites FUF/SURGE and other attempts to make realization applicable across domains. It identifies several practical costs in this route. The general resource may take too long for interactive use, and the application still has to produce inputs in the required form. A resource designed for broad use can also take effort to adapt to the specific wording and style a character needs. The authors situate their proposal alongside work on generation using corpus-based statistical knowledge and on coverage and correctness in a general-purpose sentence generator.

Doctor Perez’s project had also tried shallow statistical generation. The version used for comparison in the paper chooses an existing line based on its relevance to the requested frame. It can reuse a sentence for a request other than the one it was originally written for, which makes it more flexible than an exact lookup. The character’s team used it in part because it could handle some changes in representation and some gaps in its training examples. Its range of possible wording is still determined by the lines someone has already written. Grammar induction changes the unit of reuse. The examples continue to define the desired domain and style, while pieces of their linguistic structure can take part in new combinations.

The authors’ proposed authoring task follows from these alternatives. The content author works with the kind of evidence that is already valuable to the application team, namely a line that a character could plausibly speak and a request that line can express. The added task is to indicate how the meaning is distributed over the line. Grammatical analysis and extraction supply much of the linguistic structure that would otherwise have to be specified by hand. The interface to the dialogue manager remains the native frame. The design thus addresses the acquisition of a grammar and the integration of that grammar into a dialogue system through the same set of examples.

The method, step by step

Start with wording someone wants the character to use

A training example begins with an utterance and the meaning it is meant to express. The author also needs a syntactic analysis of the utterance and a set of links that show where parts of the meaning appear in the text. The syntactic analysis identifies the structure of the sentence. The links assign meaning to stretches of the sentence. Once the examples have both kinds of information, automatic processing can identify reusable fragments of syntax and associate them with the meanings that justify using them. A separate learning stage prepares the generator to find complete combinations quickly during dialogue.

The paper illustrates the task with an utterance about the lack of medical supplies. The doctor speaks in the first person plural, denies having the supplies at the location under discussion, and addresses the captain. The intended meaning uses 8 key–value pairs from the frame. The author does not need to draw a syntactic tree to say that the opening subject and negated auxiliary together express aspects of the intended negative assertion. The author chooses that stretch and assigns the relevant pairs to it. The rest of the line also receives semantic links so that each piece the generator may need has a connection to the frame. This is a tractable form of linguistic annotation.

The particular example clarifies what the links are supposed to capture. A phrase about medical supplies contains material that a reader can recognize as part of the topic. The negative opening conveys something about the type and polarity of the assertion. Those contributions can be associated with different spans even if the span boundaries are best understood in different ways by a syntactician. The grammar learner later uses the parse to identify structural pieces. The human author works from the application’s available meanings and the words the character would use. The two sources of information meet over the same sequence of tokens.

From authored utterances to responses in dialogue

The steps in order.

From authored utterances to responses in dialogueStep 1: Pair a suitable utterance with its native frame1. Pair a suitable utterance with its native frameStep 2: Parse the utterance into a syntactic tree2. Parse the utterance into a syntactic treeStep 3: Link contiguous token spans to frame meanings3. Link contiguous token spans to frame meaningsStep 4: Induce reusable grammar fragments from the examples4. Induce reusable grammar fragments from the examplesStep 5: Learn which expansions to prioritize in search5. Learn which expansions to prioritize in searchStep 6: Expand the grammar to express a requested frame6. Expand the grammar to express a requested frameStep 7: Rank complete responses found before the deadline7. Rank complete responses found before the deadline

Specify the example and its units precisely

The paper represents a training example as an ordered triple.

(u, syntax(u), semantics(u))

Here u is the utterance string, syntax(u) is its syntactic analysis, and semantics(u) is the annotation that connects surface spans to the application’s meanings. Parentheses around the entire expression delimit the triple, whose entries are separated by commas. In syntax(u) and semantics(u), the parentheses indicate the utterance to which the analysis or annotation applies.

The sentence analyses use the Penn Treebank format, which lets the utterance be represented as a tree with the words or other tokens at its ends. For the study, initial trees came from the Charniak parser. The example drawn in the paper uses a version whose parse was repaired by hand. Another version of the training set uses the parser’s output as it stands. Thus the tree format and the source of the initial analysis stay the same while the study varies whether a person corrects the analyses. The paper draws on earlier work on the Penn Treebank and on Charniak’s approach to parsing.

The meaning side of the example presupposes a set of possible semantic representations supplied by the application. The authors write that set as follows.

M = {m₁, …, mⱼ}

M denotes the inventory available for expressing utterance meanings. Each m with a subscript denotes a member of the inventory, and j indexes the final member. The ellipsis stands for the intervening members, the braces mark a set, and the equality sign defines M by its members. In Doctor Perez’s application, this inventory comprises the 232 distinct key–value pairs appearing across the relevant frames. A particular utterance is associated with a subset of that inventory.

The representation lets the system reuse a key–value pair across utterances. The same pair can matter in different requests, while each request supplies its own combination of pairs. The inventory is therefore different from a catalogue of completed frames, which would list combinations the dialogue manager had already requested. It is also different from a list of output strings. Its members describe what the application intends to communicate. The alignment task supplies evidence about how utterances, taken from the character’s own domain, express those members.

Before the links can be represented, the parser’s terminals need to be read in their surface order.

t(u) = ⟨t₁, …, tₙ⟩

t(u) denotes the token sequence at the terminals of the analysis of utterance u. Each indexed t is a terminal in that sequence, and n indexes the last terminal. The ellipsis covers the intervening terminals, the angle brackets mark an ordered sequence, and the equality sign gives its definition. The order is the order in which the tokens occur in the utterance. The choice of units comes from the syntactic analysis. For instance, the negative contraction in the medical-supplies utterance is segmented so the auxiliary and the negative material are separate tokens. The semantic span can include both along with the subject. This is where the two annotations must agree on tokenization.

The semantic annotation contains the spans and their associated sets of application meanings.

semantics(u) = {(s₁, M₁), …, (sₖ, Mₖ)}

semantics(u) names the annotation for utterance u. Each s with a subscript denotes a contiguous span of tokens, and each correspondingly indexed M denotes the set of meanings assigned to that span. The subscript k indexes the final pair, and the ellipsis stands for the intervening pairs. Parentheses enclose each pairing, braces enclose the resulting set, and the equality sign defines the annotation. The subscripts connect the pairs to the sequence of stretches in the utterance. The constraints on these stretches give the annotation its structure.

t(u) = s₁ @ ··· @ sₖ

t(u) is again the ordered terminal sequence of utterance u. The indexed s terms are the spans from the annotation, with k indexing the last span. The @ sign means concatenation. The middle dots stand for the corresponding joins through the intervening spans. The equality sign states that placing the spans end to end in order recreates the terminal sequence. In ordinary terms, the annotation cuts the utterance into contiguous segments that together cover it. A span can begin or end within a syntactic constituent as long as its boundaries are compatible with the terminals.

Mᵢ ⊆ M  for all  i ∈ 1..k

Mᵢ is the set of meaning elements for the span at index i, and M is the application’s full inventory. The symbol ⊆ permits only elements from that inventory in Mᵢ. The symbol ∈ says that the index belongs to the indicated range, and 1..k denotes the indices from the initial span through the span indexed by k. This restriction ensures that annotations use representations the application can supply to the generator. The paper gives the semantic annotation as a set of these associations subject to the requirement that the ordered spans cover the utterance.

There are two practical consequences. The first is that the author can make a link to a whole expression without deciding which token accounts for which feature. Applications can represent meaning at a coarser level than an item-by-item analysis of the utterance would require. An expression that carries the desired contribution as a group can therefore receive a link at that level. The second consequence is that the author has to account for the whole line, including material whose individual contribution is difficult to identify in the frame. Grouping words with the appropriate semantic span gives the later search a reason to include the complete expression. It also preserves at least some of the contextual wording that makes the character’s lines usable.

The syntax and meaning annotations are independent in a particular sense. Changing the tree’s constituent analysis does not require the author to choose different semantic spans when the underlying terminals stay compatible. The tree can group words one way while the content author organizes them according to the application’s meanings. The independence does not remove every connection between the annotations. The parse supplies a terminal sequence, and the span annotation has to cover that sequence. This is the division of responsibilities that made it possible to compare corrected and uncorrected trees while retaining the same semantic links.

Extract a grammar from the examples

Once examples are in this form, the first automatic stage induces a probabilistic tree-adjoining grammar. A tree-adjoining grammar uses pieces of syntactic trees as reusable units. Grammatical operations combine those pieces to produce larger trees. The tree structure matters because a fragment can preserve relationships between words and phrases even when it participates in a new utterance. The probabilistic part associates estimates with the grammatical operations, allowing complete grammatical constructions to be assessed by how they were derived.

The induction procedure follows the approach the paper attributes to Chiang. It uses heuristic rules to infer a derivation for each analyzed training utterance. A derivation is an account of the elementary pieces and combination operations that can produce the larger tree. The training parse gives the full syntactic structure, while the inferred derivation tells the learner how to divide that structure into material it can reuse. The procedure progressively detaches subtrees in accordance with those inferred derivations. It yields grammatical resources and the statistical information used to compute operation probabilities during generation. The appendix illustrates the resources inferred from the medical-supplies example.

Inducing the grammar is what gives the approach productive capacity. The stored evidence began as complete lines, but the grammar can use their components in constructions beyond the training set. Whether a particular new request can be expressed still depends on which pieces the examples have supplied and which combinations the grammar licenses. The semantic annotations help determine when a piece is relevant to the goal. They provide a connection between an utterance fragment and the same vocabulary of meanings that appears in a request. The parser’s contribution is to provide structure for combining pieces once their semantic relevance is established.

The paper outlines the order of extraction and its use of prior grammar induction work. It refers readers to the authors’ companion paper, Practical grammar-based NLG from examples, for more detail on the automatic processing. The description here establishes where the grammatical knowledge comes from and how it enters generation. It leaves the detailed extraction heuristics and probability calculations to that companion account.

Learn a search policy and generate under a deadline

The generator treats each request as a goal for search. It receives a desired set of meaning elements from the native frame and tries to construct an utterance using the induced grammar. The paper writes the semantic requirement as follows.

M′ ⊆ M

M′ denotes the desired set of meaning elements for the current request. The prime marks this request-specific set, M is the inventory supplied by the application, and ⊆ indicates that all requested elements come from that inventory. The utterance u sought by the generator must express the requested M′. In the reported evaluation, a response counted as an output of the grammar-based system only when it covered the whole requested frame.

During search, a partial construction can often be extended in several grammatical ways. Following all those possibilities would be too expensive for the intended use. The paper uses beam search, which ranks competing expansions and concentrates continued search on the more promising alternatives. Features describe aspects of the alternatives that the algorithm can use in ranking. Their weights determine how much each feature contributes to the preference among expansions. The grammatical resources define the possible constructions, while the learned preferences help decide which ones to try before time runs out.

The weights are learned from training examples. The paper draws on Daumé and Marcu’s search optimization approach, in which mistakes made while searching training problems trigger changes to the feature weights. It also uses boosting, a fitting procedure that in this application helps select features and determine useful weights. The paper associates that part of the approach with the work of Collins and Koo on discriminative reranking for natural language parsing. The training examples therefore contribute both the linguistic pieces the system can assemble and evidence about how it should navigate the resulting choices.

Search continues up to a specified time limit and accumulates completed solutions as it finds them. The authors call this anytime search because the generator can use the solutions found within the available time. In Doctor Perez, the time limit is 200ms. Completed utterances are ranked by their derivation probabilities, which concern the grammatical operations used to construct them. The ranking of partial expansions during search and the ordering of completed responses serve separate purposes. The search policy helps the generator reach promising parts of the space in time. Derivation probability orders the solutions that it has actually reached. In the main evaluation, the generator supplies its highest-ranked utterance for each request it successfully handles.

This design also explains why a search failure is informative but ambiguous. If the allotted time ends before a complete response is found, the generator supplies no utterance for that request in the study. The outcome could arise because the grammar lacks a useful piece or combination, or because a viable construction was outside the part of the search space explored in time. What the deployment procedure observes is the absence of a completed solution under its operating rules. A quality rating, by contrast, is possible only once the procedure has found something for the judges to assess.

Experiments and results

Recorded requests and systems for comparison

The authors sampled 220 instances of frames previously sent by Doctor Perez’s dialogue manager during conversations with users. The sample could contain the same frame more than once because the unit of collection was an instance of a request. Each sampled frame was paired with a hand-authored utterance. Some lines originated in role plays involving Doctor Perez, some came from a script writer, and others were written by system builders to cover particular frames. A system builder reviewed all the lines for their suitability to the corresponding meaning. This supplied both material from which the automatic methods could learn and human wording to include in the rating study.

The examples were randomly divided into 198 training examples and 22 test examples. The automatic systems used the same split. For the grammar-based system, the authors prepared a version with automatically parsed syntax and a version in which people corrected the parses. They trained a generator on the 198 training examples for each version. Each generator then attempted to produce a single top-ranked utterance for the requests in the training and test sets. The semantic links were identical between versions. The comparison therefore tests the effect of using repaired parse trees on the generated outputs while holding the supplied meanings, wording and alignments fixed.

The statistical baseline, called sentence retriever, also learned from the 198 training examples. It treats the requested frame as a query and the available utterances as the items to retrieve. It uses a relative entropy metric to rank the items. In this experiment its answer is the highest-ranking training utterance selected for the request. The method needs the frame–utterance pairs and uses no hierarchical syntactic analysis or span-level meaning links. Its use of whole sentences provides a comparison between two ways of exploiting the same examples. Sentence retrieval can select a line with suitable wording when the training material contains a good match. The grammar-based system can build a line from pieces when it finds a supported combination. The baseline frames generation as information retrieval.

Hand-authored utterances enter the comparison in a different role. A person had supplied each of these lines for the corresponding request. The rating study can use them to assess the quality of a line written for that frame, including on items assigned to the test split for the automatic systems. The split asks whether a trained system handles a request instance without training on that instance. The hand-authored rating condition measures the quality available when a suitable line has already been provided. The authors’ comparison with canned text also includes the resulting difference in authoring: dedicating a line to a meaning supplies wording for that case, with coverage depending on what has been authored.

Response time and the chance of getting an output

Both automatic approaches operated within Doctor Perez’s 200ms window. The grammar-based generator’s use of the window is particularly important for interpreting its reported success. Its search only delivers an utterance if it finds a construction expressing the entire requested frame by the cutoff. The reported success rate is 95% on training examples and 80% on test examples. Sentence retriever’s corresponding rates are 96% and 90%. These figures describe whether the method produced an output counted as successful in the evaluation. The judges separately assessed the appropriateness of the utterances that were returned.

Output success rate on Doctor Perez test examples

Sentence retriever returned an output for more held-out requests.

Output success rate on Doctor Perez test examplesSentence retriever: 90Sentence retriever90Grammar-based generation (this paper): 80Grammar-based generation (this paper)80
The numbers
System or settingsuccess %
Sentence retriever90
Grammar-based generation (this paper)80

These coverage figures are useful alongside the time limit because a fast decision can be a decision that no full realization was found. A developer considering the grammar-based method needs to know how often that happens. The test results show higher coverage for the retriever under the study’s rules. The retriever can place a high-ranking line before the judges even when the line has a serious mismatch with the frame. The grammar-based method screens candidate solutions through its requirement of complete semantic coverage, as represented in the grammar and its links. Human judgment is still needed to assess whether the resulting wording actually serves the request well.

How the judgments were collected

The rating study included 494 different utterances from the human-authored, grammar-based and retrieval conditions. The 5 judges assessed each utterance against the particular frame it was proposed to express. They used a scale from 1 to 5, with the low end indicating very poor quality and the high end indicating very good quality. They were asked to combine accuracy and fluency in their overall assessment. The choice suited the case study because a completely fluent utterance was not always necessary for Doctor Perez to be believable, while a sentence that conveyed the wrong content could be a serious failure.

Judges needed enough familiarity with Doctor Perez to interpret raw semantic frames. The authors therefore recruited people with deep knowledge of the system. The first author, who was the principal developer of the new generator, did not act as a judge. The rating interface displayed a frame with 1 to 6 candidate utterances. The ordering of candidates within a frame was randomized, and the ordering of frames was randomized for each judge. Judges were kept unaware of which conditions had produced the lines. They could inspect the relation between a candidate and the same frame used to request it without being told whether the wording was written, retrieved or constructed.

On these quality judgments, the paper reports an overall Krippendorff’s alpha of 0.708. Alpha is used here to assess agreement among judges while accounting for agreement expected by chance. The authors take that level of agreement to support tentative conclusions. The reported alpha was 0.802 for the pair whose judgments agreed most and 0.593 for the pair whose judgments agreed least. The pair results indicate that agreement varied with the judges involved. The figure summarizes how closely people familiar with the character and the system’s representations of meaning agreed in their quality judgments under the given instructions.

The authors also examined whether differing judgments altered the comparison among the ways of producing lines. An analysis of variance, or ANOVA, found a main effect of production condition, with an F statistic of 55 on 2 and 3107 degrees of freedom and a p-value below 0.001. There was a main effect of judge, with F of 17 on 4 and 3107 degrees of freedom and a p-value below 0.001. The condition-by-judge interaction was not significant, with F of 0.55 on 8 and 3107 degrees of freedom and a p-value above 0.8. The authors took this result to support presenting the remaining comparisons using the mean rating for each utterance. The main effect of judge shows why it was worth checking the interaction before averaging. Judges could differ in their general use of the scale even if the relative assessments of production conditions were similar.

Ratings across all examples

For the ratings covering training and test examples together, the authors found a significant difference across the three production conditions. The reported ANOVA had F of 16 on 2 and 622 degrees of freedom, with a p-value below 0.001. To examine where the difference lay, they made planned comparisons. The distribution of ratings over utterances was not normal, so they checked the t-tests with Wilcoxon rank sum tests. The authors report that the significance levels from the two procedures were in the same general range. The means describe the scale of the observed ratings, while the planned comparisons help show which observed differences the study supports.

Mean quality ratings across Doctor Perez training and test examples

Lines written for their frames had the highest mean rating.

Mean quality ratings across Doctor Perez training and test examplesHand-authored utterances: 4.4Hand-authored utterances4.4Sentence retriever: 4.0Sentence retriever4.0Grammar-based generation (this paper): 3.8Grammar-based generation (this paper)3.8
The numbers
System or settingmean rating
Hand-authored utterances4.4
Sentence retriever4.0
Grammar-based generation (this paper)3.8

The hand-authored lines had a mean rating of 4.4 and significantly outscored the retrieved lines, whose mean was 4.0. The comparison had a t statistic of 3.7 on 376 degrees of freedom and a p-value below 0.001. Hand-authored lines also scored significantly higher than the generated lines, whose mean was 3.8. That comparison had a t statistic of 5.9 on 388 degrees of freedom and a p-value below 0.001. For generated versus retrieved utterances, the t statistic was 1.6 on 385 degrees of freedom and the p-value was above 0.1. The evidence in the pooled ratings supports the quality advantage of having a person supply wording for the frame. The observed ordering of the means for the automatic approaches did not establish a reliable advantage for either.

Ratings on the test examples

For test examples, the paper presents a separate comparison of sentence retrieval and grammar-based generation with uncorrected syntax. The mean was 3.6 for generated utterances and 3.0 for retrieved ones. The numerical ordering on these items differs from the pooled comparison. The authors report that the test data do not show a significant difference. These averages concern returned utterances. The coverage results are needed alongside them because systems can leave different requests unanswered.

Mean quality ratings for returned Doctor Perez test utterances

Generation with uncorrected syntax had the higher observed test mean.

Mean quality ratings for returned Doctor Perez test utterancesSentence retriever: 3.0Sentence retriever3.0Grammar-based generation with uncorrected syntax (this paper): 3.6Grammar-based generation withuncorrected syntax (this paper)3.6
The numbers
System or settingmean rating
Sentence retriever3.0
Grammar-based generation with uncorrected syntax (this paper)3.6

The rating frequencies reveal something the averages obscure. The authors describe the retriever’s successful outputs as often receiving ratings at either extreme. Its candidate lines come from human authors, which helps explain why they can sound fluent. Their suitability can change sharply when applied to a different frame. In the appendix’s example, the target frame had occurred in the test set and was absent from the training set. The retriever returned an utterance with the opposite polarity to the one requested. It found usable wording in the sense of a fluent line someone had supplied, while transferring that line to the new request changed the content the character would communicate.

The ratings for generated test utterances were more graded in the authors’ description. Very good quality was the most frequent outcome, and lower qualities were progressively less common. The authors suggest that a developer who has little tolerance for very bad responses might favor that pattern. The figure records what happened in this sample. It leaves the size and reliability of a difference between the methods open. It also leaves a deployment decision that depends on the behavior of the rest of the dialogue system. In this setup, the practical costs of having no complete response and of having a fluent response whose meaning is very wrong are distinct.

The study rated only the highest-ranked automatic output for each request. The authors nonetheless observed that grammar-based search frequently found several plausible utterances. They show some alternatives in the appendix for the same held-out frame used to illustrate the retriever’s polarity error. The alternative constructions illustrate how reusable grammar pieces can yield different wording for a request. The example provides a reason to investigate variation, while the quantitative quality results apply to the selected outputs that the judges actually assessed.

Work required from the developer

The authors compare the approaches on authoring effort as well as output. Canned text and sentence retriever require a frame and suitable utterance. Grammar-based generation adds a syntactic analysis and links between the utterance and its frame. Automatic parsing can supply the tree. In this experiment, the results did not show a significant quality improvement from hand correction. With uncorrected parses, the additional task for the content author was supplying the links. One system builder completed the links for the 220 examples in about 6 hours. This measures the linking work on an existing set of pairs. Creating or collecting those pairs was a contribution shared with the frame-based alternatives.

Both automatic methods accept the dialogue manager’s native frame. That result speaks to the cost of specifying requests. The grammar-based method can use detailed structure internally while letting the dialogue manager keep using its existing representation. The link author makes the connection between frame elements and observed wording during example preparation. Sentence retriever uses the same input format to choose a previously authored line. The study therefore shows how both approaches meet the interface constraint, while the ratings, coverage figures and annotation time describe the tradeoffs between them.

What the ablations show

Correcting the parse trees

The clearest controlled comparison varies the syntax supplied at training time. Both versions begin with the same utterances and frames. They use identical links between spans and meanings and the same split of examples. One version uses trees from the automatic parser directly, and the other uses trees a person has corrected. The authors introduced this comparison because they observed frequent parsing errors on this domain and were unsure how those errors would affect generation. Since induction uses the trees to infer reusable grammatical pieces, a change in their accuracy plausibly changes the structures the learner has available.

For the test items, the comparison of generated output under corrected and uncorrected syntax yielded a t statistic of 0.056 on 29 degrees of freedom and a p-value above 0.9. For all items together, it yielded a t statistic of −1.1 on 498 degrees of freedom and a p-value above 0.2. The study detected no significant quality difference in either comparison. The practical finding is about the evidence for spending time on tree correction in this setup. Though correcting the output of the parser takes considerable linguistic expertise, the judges’ ratings give no demonstrated benefit for doing it here.

The design isolates a real authoring decision. Keeping the semantic links fixed prevents changes in the content author’s analysis of meaning from entering the comparison. It also shows why the distinction between tree structure and span annotation matters. Had the author been required to put each semantic element on a particular constituent, repairing a tree might have required reconstructing the meaning annotation as well. Here the author’s span can stay in place if the token-level compatibility is preserved. The experiment thereby evaluates a shortcut the pipeline was explicitly designed to accommodate, using automatic syntax with manual semantic links.

The lack of a significant difference has a narrower interpretation than a demonstration of equivalent syntax. The study rates the final utterances reached by search and selected for evaluation. A corrected parse might change which fragments are induced or affect some individual requests without producing a detectable change in the reported comparison. The paper gives aggregate output success figures for the grammar-based generator alongside the rating comparison. It does not give separate coverage estimates for the corrected and uncorrected settings in that comparison. The supported conclusion concerns measured ratings of successful outputs in this case study, where the authors held the meaning annotations fixed.

What the system comparisons can explain

The retrieval comparison changes several design choices together. The retriever operates on whole utterances, ranks them as candidates for the frame and uses no syntax tree. Grammar-based generation learns structured pieces, uses span-level semantic links and searches for a combination that covers the frame. The comparison therefore evaluates a working package of choices. It does not by itself measure the isolated contribution of the grammar formalism, the semantic links, the learned search policy or the complete-coverage rule. The paper reports no experiment that removes those individual parts while preserving the rest of the generator.

The observed low ratings for some retrieved lines are consistent with the qualitative example of wrong polarity. A whole-sentence match can be plausible on some details while retaining information from the frame that originally motivated the sentence. The example shows how this can arise even when fluency is good. The graded distribution for grammar-based output gives a different view of how the resulting lines fared with judges. In combination with the coverage figures, these analyses suggest reasons to care about the distribution of errors. A comparison of mean quality alone would provide less information about whether a method tends to return something that needs minor repair or something that communicates the wrong content entirely.

The authors also vary the evaluation slice by examining all examples together and then looking at test examples separately. The pooled results establish the advantage of wording written directly for the frame. The test comparison brings the behavior on held-out requests into focus and reveals the apparent difference in rating distributions. The appendix’s example narrows that analysis to a frame explicitly absent from training. It shows the grammar-based generator returning alternatives where reusing a whole line led to an error. Because the additional alternatives were not rated, the example demonstrates that the system can find varied realizations in a particular unseen case. It leaves the quality and frequency of such variation across requests uncertain.

The requirement that grammar-based generation cover the whole frame is another important condition of these results. It was fixed in the study. The authors discuss relaxing it because a usable partial expression might be available when a complete one cannot be found in time. They also recognize that such a relaxation could lower quality. Since the experiment did not vary that requirement, the observed tradeoff between coverage and quality provides a starting point for the question. It does not estimate what would happen if partial outputs were admitted.

Limitations

Limits the authors state

The authors describe the work as a case study in a pre-existing dialogue system and identify evaluation in the complete, running Doctor Perez agent as future work. The reported experiments test requests recorded from earlier dialogue and judge possible utterances against those requests. They do not measure how trainees would respond to the generated lines in a live interaction. Outcomes such as whether a response makes a conversation easier to continue, affects how the trainee interprets the character, or supports the negotiation exercise remain unmeasured. The evaluation of response time concerns the generation component under the available time window.

The authors also reserve closer analysis of the generator’s weaknesses and disfluencies for future work. Overall ratings tell them how suitable judges found an utterance, given the frame and the character. Such a score does not identify which feature of the wording caused a low rating or why a borderline line sounded acceptable. For Doctor Perez the authors deliberately combined fluency and accuracy, since a degree of disfluency can suit the character. That decision gives the score a clear purpose within the study and limits what the score can say about the two aspects individually. The observed polarity example identifies a particular semantic error in retrieval, while the paper does not give a systematic breakdown of generated errors.

The paper proposes studying how results change as the training set grows. The main evaluation uses the stated split, so it supplies no comparison of performance at different data sizes. A developer can see the labor that one person spent linking the examples in this case. The study leaves open how the return on that work changes as more lines and frames are added. This matters when comparing generation approaches that reuse examples in different ways. More examples can provide more whole sentences to retrieve, while a larger collection of paired and annotated lines can give the grammar learner reusable evidence for additional constructions. The paper does not measure those effects.

Other boundaries are built into the reported task. The authors evaluated only top-ranked automatic responses, although search could return alternatives. The paper treats variation as a potential advantage and illustrates it with an example. It stops short of a systematic quality assessment of the alternatives. Similarly, the proposed allowance for partial frame coverage is an untested extension. The reported coverage and ratings apply to a generator that required complete coverage. They leave open the practical threshold at which an incomplete utterance might still be preferable to a search failure.

Limits implied by the evaluation design

The frame sample contains repeated instances, and the random division was made over examples. The test set should therefore be understood as held-out request instances. The overall test figures do not establish that every tested frame was structurally different from all training frames. The appendix identifies a genuinely unseen frame for its qualitative example. The paper does not report separate success or quality figures for repeated frames and frames that occur only in the test set. That distinction matters when interpreting productive coverage. Expressing a request instance held out during training and assembling a response for a previously unseen combination of meaning elements are related achievements, but the aggregate test rates do not identify how frequently the latter occurs.

Quality is also conditional on a response being returned. Sentence retriever and the generator report different success rates, so their rated outputs may cover different groups of requests. A comparison of mean ratings concerns the utterances that made it to the judges. The paper does not give an overall measure that assigns a value to failures as well as returned answers. That omission has a concrete consequence for deployment decisions. A character may need a carefully chosen fallback after a failure, and an incorrect line may incur a different cost from an interruption or request for clarification. The study keeps these effects visible by reporting coverage and ratings separately, but it cannot give a combined answer without assumptions about those costs.

The report establishes that both automatic approaches run inside the 200ms window. It gives no timing distribution showing when the first solution usually appeared, how the time varied across requests, or where the search consumed its allowance. The deadline makes the experiment relevant to interactive use. It does not characterize how behavior would change under a different deadline or once the grammar had grown. Likewise, a failed grammar search can be observed at the end of the window, but the aggregate success rates cannot tell whether its cause was missing linguistic coverage or a search that did not reach a possible solution in time.

The judges’ expertise improves the relevance of their judgments against the raw frames. It also defines whose judgment the scores represent. The study recruited people deeply familiar with Doctor Perez and asked for suitability to that character. A training participant encounters the character through the conversation and does not see the raw frame. The two roles offer different grounds for judgment. The experiment provides evidence from expert readers about whether the line fits the intended meaning and style, with agreement that the authors consider sufficient for tentative conclusions. It leaves the reception of the same utterances by trainees to the proposed interactive evaluation.

Finally, the annotation time describes the experience of a system builder working with an existing set of reviewed lines and their meanings. The study gives no separate measurement of agreement between people making the semantic links, and it does not time the work of adapting those links after a change in the dialogue manager’s representation. The example format is designed to reduce the linguistic expertise needed for this task, and the parse comparison suggests that specialists’ tree correction can be skipped in this case. Evidence about the cost of developing and maintaining the full resource across applications would require measurements beyond the linking session reported here.

What came after

The paper’s subsequent research impact is undocumented here. The companion account that the authors cite belongs to the same research effort and provides further detail on the generation procedure. The paper identifies evaluation with the running character, experiments with larger training sets and closer analysis of disfluencies as work still to be done at its conclusion.

Cite

Cite as David DeVault, David Traum and Ron Artstein. 2008. Making Grammar-Based Generation Easier to Deploy in Dialogue Systems. Proceedings of the 9th SIGdial Workshop on Discourse and Dialogue.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{devault2008making,
  title = {{Making Grammar-Based Generation Easier to Deploy in Dialogue Systems}},
  author = {David DeVault, David Traum and Ron Artstein},
  booktitle = {Proceedings of the 9th SIGdial Workshop on Discourse and Dialogue},
  year = {2008},
  doi = {10.3115/1622064.1622102},
  url = {https://doi.org/10.3115/1622064.1622102}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/devault-2008-making-grammar-based-generation-easier/