English Query

Testing an English Query Model

Test the English Query model before compiling it into an application to make sure that the questions users are likely to ask are supported by the model and then modify it accordingly. After you are satisfied with the performance of the model, build it into a compiled English Query application (*.eqd file).

The Suggestion Wizard is available within the Model Test window and is useful during the testing phase. You can start by asking a question that users are likely to ask. Suggestion Wizard presents suggested entities and relationships needed to answer the question.

Model Test Window

The Model Test window in English Query enables you to test the English-to-SQL translation of your model and the execution of the resulting database query before compiling the application.

Note  For the data values to appear in the Entity list box in Question Builder, you must select Sample Data on the Data Connections tab before compiling the application.

In the Model Test window (available from the Start command on the Debug menu), you can use the Analysis feature to review the entities for functioning and for questions that return incorrect answers.

When testing a model, questions can be saved to a regression file with the Save Query command. A regression file is automatically created with each project. There can be multiple regression files, but questions are saved in the first regression file under the project in the Project Explorer window.

An output file can be added and then compared with the original file if the files have names that differ from one another. You can also promote an output file to the new regression file. Regression output is displayed in Extensible Markup Language (XML)-tagged format, which differentiates the questions, restatements, answers, and SQL statements for easier editing.

Suggestion Wizard

The Suggestion Wizard, which is also available from the Model Test window toolbar, suggests entities and relationships for answering ambiguous questions.

The Suggestion Wizard analyzes the question and looks for unknown or ambiguous entities. For each of these entities, it displays a sentence in the form "<word> refers to an <entity list>." You may select an existing entity from the entity list, or create a new one by using the new entity button.

For pronouns or ambiguous entity names, simply associating the word with an entity is enough. For undefined entities, the Suggestion Wizard asks you to clarify the definition in one of several ways:

After the entities have been added or clarified, you may have to define relationships among them. This is done by validating the correctness of the declarative sentences that the wizard generates from the question.

For relationships that are described as adjectives, the wizard displays a more complex set of sentences. If the sentence does make sense, you can define the meaning of the adjective relative to the base entity in one of the following ways:

When you complete the Suggestion Wizard, it updates your model with new entities and relationships based on your answers.

To save a regression file

Model Editor

Model Editor

To test an English Query model

Model Editor

Model Editor

To compare model test results

Add a Regression File

Regression File

View Differences Between Test Files

View Differences Between Test Files

View Output of a Regression File

View Output of a Regression File

See Also

Automatic Clarification of Questions

Compiling an English Query Application