Introduction

AllegroGraph has long used the AGWebView interface, described in the Traditional WebView document. AllegroGraph 8.2.0 introduces a new implementation with a new look and feel, described in this document.

New WebView is what is displayed when AllegroGraph starts up. If you would rather use Traditional WebView, you can switch to it in the Login dialog displayed below. If you are already logged in, you can open a Traditional WebView tab by clicking on the Traditional WebView choice in the menu on the left side of the New WebView page.

Getting to Traditional WebView from New WebView

If you are using Traditional WebView, you get the new version by clicking New WebView on the right in the banner of the traditional WebView page:

New WebView button

Login dialog

When New WebView is started you are presented with a login window:

Login Form

Supply your AllegroGraph username and password (or token). WebView will log you out if you are idle too long (30 minutes), but check the Stay logged in checkbox if desired to allow 30 days until being logged out.

If you prefer Traditional WebView, go there directly (without logging in) with the Traditional WebView link near the bottom.

Initial Display

Here is the New WebView page when it starts up (the first time there will be no repositories shown but this image comes after some use):

New WebView Initial Page

The exact contents depend on how New WebView was initiated and characteristics and permissions of the user. Always displayed are the banner at the top and a menu list to the left. When first displayed, the main field in the center displays the repositories in the current catalog and some action buttons. Note that what works and sometimes what is displayed depends on the permissions of the current user. If the current user does not have permission to perform a certain action, that fact may be reported on the page or when the users attempts the action. Most pictures are taked when the user had superuser permission, so most illustrations in the document do not show restrictions.

The Banner

The banner, at the top of a New WebView page, is always displayed. It has three active items:

As you navigate among the various New WebView pages, you can always get back to the catalog/repo initial page by clicking on the AllegroGraph logo on the left in the banner.

The repository page

As said, New WebView typically opens to a page listing repositories in the current catalog (usually the root catalog). Along the top to the right are button for creating a new repository in the current catalog and a button for creating an Large Language Model playground (which also creates a new repo). See the llm document for information on the llm playground.

A search widget appears on the upper right, useful when there are very many repos.

The Menus

On the left are a list of applicable menus. The list depends on the permissions of the user. For example, if the user is a superuser, one of the choices will be Admin. The arrowhead next to the menu name points down if the menu is closed and up if open. Clicking on the menu name or arrowhead changes the state.

How to use the various menu items is usually clear once the menu is displayed so we will not go into too much detail in the document.

The catalog list

Catalogs are listed under the file folder icon to the left just under the AllegroGraph icon. There is always a root and a fedshard catalog. Other catalogs must be defined by you (our your administrator) and listed in a agraph.cfg configuration file (see the Server Configuration and Control document). Clicking on a catalog name displays the repositories (also called repos) in the catalog.

The Repository Menu

The Repository menu is only active when a repo is open. Click on an existing repo listed on the page or the Create Repository box to create a new one. (Its drop down menu also allows restoring a repo from a backup file.)

Once a repo is open and the menu is live, you will see these items:

The add, delete, import data page

Whn you click on the Add, delete, & import data item in the Repository menu, this page is displayed:

Add, delete, import data page

The choices include:

The Admin menu

This menu is only visible to superusers. It has the following items:

The Utilities menu

Available to all users

Other items

More on the Query page

The query page looks like this when displayed:

The Query page

Recent queries are listed along the top, saved ones by name. (Unsaved queries have titles relating to the query type, with 'Untitled' labeling to SPARQL, Prolog, and GraphQL queries, while text search and chat stream, and chat bot queries are labeled with their type. Unsaved queries are persistent across reloads but their dummy names (Untitled-1, Untitled-2, etc) may be changed. Users can save queries to assign persistent names.) Saved queries are also listed to the right.

The New Query box displays a menu when the arrow to the right is clicked, as displayed in the picture. (Just clicking on New Query is the same as choosing SPARQL from the menu.) The query types are:

Once a query has been entered, if you hover over the Execute Button, two additional choices appear: Plan and Log. Click on Plan to see the query plan (what the system intends to do when executing the query). The plan will also display warnings if there are any. Log will cause the query to be logged.

Adding the PREFIX

PREFIX franzOption_logQuery: <franz:yes>

will cause information about the query, including the query plan, to be printed to the log. Debug information will be included if the query fails.

This related PREFIX

PREFIX franzOption_logQuery: <franz:onFailure>

will log query information only if the query fails. This information is very useful when debugging query problems. If you ask Franz Inc. about a query, be sure to send the query plan and also any debug information in the log recorded using this PREFIX.

On the right there are several menus with Query and Display options. Most are self-explanatory. The Display Option Full IRIs in results is useful if you want to see the IRIs but is off by default because full IRIs clutter the results.

Miscellaneous Tasks (managing query options, exporting or backing up triples from a repo, backing up everything)

You can do most everything necessary with some command somewhere in New WebView, but it may not always be easy to find the right menu or the right choice. In this section we show how to accomplish certain common tasks. Even if the task you are looking for is not here, showing how commands for these tasks are found may assist in finding what you are looking for.

Managing Query options

The predefined query options are listed in SPARQL Query Options section of the SPARQL Reference document. A query option is enabled with a PREFIX to the query of the following form:

PREFIX franzOption_optionName: <franz:optionValue> 

where optionName names the option and optionValue specifies the option value. For example, the PREFIX, with optionName logQuery and optionValue onFailure specifies that query execution details should be logged only when the query fails:

PREFIX franzOption_logQuery: <franz:onFailure> 

You can view and manage currently enabled query options for a repo on the Query execution options page. This page is displayed by that option on the Repository control menu displayed by clicking Repository control on the Repository menu displayed on the left of the screen and searching for Query in the search box which is displayed.

Repository control menu

That displays a page that displays existing options (there are none in our illustration) and allows adding new ones. Clicking on New query options displays a from to add an option. The Name field has a drop down menu (as shown) with defined options:

Query execution options

And when a name is chosen, the Value field also has a menu of choices (if relevant -- sometimes you must specify the choice):

Query execution option values

You can also specify the scope: for you, the user; for this repo; or for all queries.

Once the values are chosen, clicking SAVE QUERY OPTIONS adds the option.

Query execution option is set

Exporting or backing up triples from a repo

Exporting data from a repo means writing a single file of a specified format (such as Ntriples or Nquads, and serval others) suitable for loading in any version of AllegroGraph or indeed any RDF database program. Backing up data means writing all data associated with a repo to a specialized file or files suitable to be read into AllegroGraph (or the same or later version than the one backed up).

Exporting data to a file

Display the Repository control menu and enter export in the search box.

Search for exporting data

Choose Export repository. This actually takes you to the Archiving choice, with the portion for downloading data displayed.

Archiving

There is a drop down menu for specifying the file type (we have chosen N-Triples) and a DOWNLOAD ALL DATA button. Clicking it displays a file dialog allowing you to specify a filename and location.

Backing up a repo

Searching for back-up displays the portion of the Archiving page that applies to backing a repo up. You have to specify a new name (not already used) for the back-up files and click "BACK-UP" (the location is part of the AllegroGraph directory).

Backing up

Backing up everything

There is no WebView command to back up all repos at once. To do that, use agtool, as described in Repository Backup and Restore.

LLM support

As said above, WebView supports creating LLM Playgrounds repositories. These repos have suitable prefixes applied to every query, such as one containing the openaiApiKey query option. This tool is described in the LLM document. However, LLM tools and magic predicates are available in any repository. Playgrounds just provide some prefixes automatically.

Other tools specify embeddings used in LLM work. The following subsections describe the relevant tools in New WebView.

LLM embedding specification

LLM embedding is described in the LLM Embed Specification document. Such specifications are used when a vector dababase is created. The specification can be defined using a .def file (as is done with the the historical figures example and the Chomsky47 example). They can also be defined directly with the Create LLM Embedding dialog in New AGWebView, as we describe in this section.

Let's start with the .def file used in the historical figures example (the api-key is not valid).

embed  
 embedder openai   
 if-exists supersede   
 api-key "sk-U43SY1234567NSGmxlYbT3BlbkFJjyQVFiP5hAR7jKLMnopq"  
 vector-database-name ":10700/historicalFigures-vec"  
 if-exists supersede  
 limit 1000000   
 splitter list   
 include-predicates <http://www.w3.org/2000/01/rdf-schema\#label> 

and let us see how to provide this same information using the Create LLM Embedding dialog in New AGWebView, displayed when Create LLM Embedding is selected in the Repository Control menu displayed when a suitable database is open.

Create LLM Embedding dialog

Here are the fields, many of which are optional. Note that a field may become required depending on values of other fields.

The next line (Fill "Embedder", "Model", and "API key" only if you want to create the Vector Database:) is only relevant if a new database is being created, either because the named database does not exist or is being superseded.

The last entries allows specifying predicates and types you wish to include. The include fields default to <*>/*, meaning all predicates/types and the exclude fields default to none. You can specify exactly what to include and exclude with the right combination of include and exclude specifications, using wildcards where convenient.