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
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
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 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
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 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
.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
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
In figure 4, the administrator has clicked on the edit action and the .cphrase tree editor is brought up
world configuration. This is where you build and edit a
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
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:
<configuration-name>.cphrasefile is where you specify which tables and views of the underlying database can be accessed and with what phrases. A detailed description of the
.cphrasefile format is presented The Format Manual.
.corpusfile represents question sets that may be presented as examples to users. Corpus files can either be edited directly or tree edited. A detailed description of the
.corpusformat is presented The Format Manual.
.logfiles are XML-based logs of user sessions over the NLI. When opened, the full log in all its detail is shown. You can then run various in-built XQuery routines to better view and analyse these logs. These XQuery routines have self-explanatory names.
<configuration-name>.pyfile is a special initialization files that C-Phrase executes when an NLI is launched. This sets configuration specific runtime parameters .
config.jsonfile is where you may fix user name/password authentication to control which users have access to launched NLIs. One also specifies the default port and proxies of a given NLI as well as the number of simultaneous users (threads) the NLI can support.
.dbfiles are binary files are SQLite databases that are used in stand-alone configurations . After building up a
.cphrasefile, administrators create these SQLite database (.db file) directly.
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
The documentation page always points to the latest version of the documentation hosted at https://c-phrase.com/documentation