The Admin GUI

Your actions to create, edit, launch and monitor natural language interfaces (NLIs) are via the Admin GUI. This interface consists of several pages, each accessible from the navbar at the top (see top of figure 1). On the navbar, from left to right, NLIs is where you launch natural language interfaces, Create is where you create new configurations and Edit is where you edit and extend existing configurations. There is a link to documentation and, on the far right is the C-Phrase logo which, if hovered over, shows the current version of C-Phrase. Finally, there is a logout button.

The NLIs page

Figure 1: The NLIs page

The NLIs page lets you launch natural language interfaces (NLIs) and shows those currently running. To launch an NLI, select configuration/examples/port combinations and click 'Launch'. In figure 1, the administrator has already launched six NLIs using six different configurations. These NLIs can be accessed through the browser via the given NLI link on the left of each table entry. Logs of user interactions can be accessed by clicking on corresponding log icons. In this case only the interfaces F1, crunchbase and geo are being logged. The home button will take you to the home of each configuration and the .cphrase file, examples, flask and parameters buttons will take you to the corresponding files for the given configuration. The check box on the far left gives is checked so that you can stop or restart a given NLI.

The Create page

Figure 2. The Create page

Figure 2 shows the Create page where you can create or upload new configurations. In the left half of the page you can create a configuration for a remote database by specifying the configuration name, database engine, connection parameters and some characterization of the size and complexity of the remote database. Here we see this being specified for the example World database. In the upper right portion of the page you can create empty stand-alone configurations that you can later extend via editing. Finally, in the bottom right portion of the page, you can upload earlier or backed-up configurations. You will need to do this when you upgrade to newer versions of C-Phrase.

The Edit page

Figure 3: The Edit page

Figure 3 shows the Edit page where you do the bulk of your work. On the left is the file navigator where you select configuration folders or individual files. In the screen above the world configuration has been selected and thus we are in its home where a set of nine action buttons are available for selection. By clicking the action button Edit, you can open the tree editor for the .cphrase file for world (see figure 4). The Copy,Rename and Remove actions apply to the entire directory of the current configuration. Launch NLI takes you to the NLIs page with the current configuration selected. Add Question Set lets you build up a set of example natural language questions to present to users. You can click Build DB from .cphrase and the tables and state within the .cphrase file will be added to the existing database (Note since the account on the remote database is readonly, this would fail for world). For stand-alone configurations, if it does not already exist, an SQLite database is built directly from the .cphrase configuration. A related operation is to Load DB into .cphrase. This updates the current .cphrase file with the state of the current database. This operation is dangerous for large databases because it literally will copy the entire contents of the database into the .cphrase file. The Download ZIP action downloads a .zip file containing the entire configuration directory. This operation lets administrators back-up their configurations as well as migrate configurations to newer versions of C-Phrase . Finally, in the zone at the bottom, administrators may upload specific files and sub-directories into the currently selected configuration directory. Normally this will be CSV files that the administrator is ingesting into the database.

Managing .cphrase files

Figure 4: Editing a .cphrase file

In figure 4, the administrator has clicked on the edit action and the .cphrase tree editor is brought up for the world configuration. This is where you build and edit a .cphrase file. The operations in this editor are fairly straightforward provided one has studied in detail the .cphrase file format. Once you have updated and saved a configuration, you must launch or restart an NLI for users to make use it.

Managing .corpus files

Figure 5: Editing a .corpus file

In figure 5 we see the tree editor for corpus files where we specify a set of pre-build example questions to present to users as examples or as fetch constants directives that can be used in the point-and-click construction of user questions.

In addition to providing examples, corpus files can be used in testing. New corpus files are obtained by opening a log file, clicking on Q and then running the corpus.xql routine. The result of this can then be cut and pasted into the XML that defines the corpus. One can build tests from corpus files and then later re-run such tests to test whether behaviour has changed. This is particularly useful for testing whether extensions to the configuration has broken any previously working questions.

Managing other files

In the above figures the contents of the world configuration directory are displayed in the file navigator. There are several distinct file types that are relevant:

Finally the config.json file at the root of file navigator is where you can change the administration user and password after which you must manually restart the Admin Server.

Documentation Page

The documentation page always points to the latest version of the documentation hosted at https://c-phrase.com/documentation