Inquire is the Teneo Platform's integrated suite of services for accessing, exploring, analyzing, and manipulating conversational log data produced by the conversational AI applications.
It can be used as a data mining and data extraction tool or function as a backend component for report and dashboard generation.
The custom Teneo Query Language (TQL) provides capabilities for retrieving, counting and filtering on combinations of log data event properties such as user inputs, flows, system responses and internal variable values.
Queries are performed directly in Teneo Studio, by accessing the Log Data (Solution tab > Optimization > Log Data), and here the user is able to create and share queries, see queries history as well as view session data.
Log Data Sources in Studio
To see the list of all Log Data Sources (LDSs) available for querying in the server, after login to Teneo Studio (and without opening a solution), simply select Log Data in the left-side menu.
Access from a solution
To access the list of available Log Data sources from any open solution, simply follow the below steps:
- Click the Solution tab to go to the Teneo Studio's backstage
- Select Optimization in the left-side menu
- In the top menu, click Log Data
By default, the system will only display the LDSs linked to the currently open solution. To see all LDSs in the current Studio instance, toggle the Showing only linked sources button to Showing all sources in the top right corner of the window.
Teneo Studio now displays all the Log Data Sources available, also those which are not linked to the currently open solution, which is signaled with an informative message.
To return to the previous view, simply toggle the button from Showing all sources back to Showing only linked sources.
Log Data Sources overview
In the Log Data view, all available LDSs are listed.
For each Log Data Source, Teneo Studio informs of:
- the number of sessions in the Log Data Source
- the amount of weeks covered by the sessions
- the status of the LDS, which indicates whether the LDS has been uploaded correctly into Teneo Studio.
It is possible to navigate through the different weeks in the Log Data Source and obtain information about the amount of sessions and the period represented by each week.
Reload the Log Data Source view
When a new Log Data Source is available, or when an existing Log Data Source has been modified by the data manager, it is necessary to refresh the screen in Teneo Studio to update the displayed information.
To do so, simply click the Reload button in the top right corner of the Log Data Sources screen, as this will reload the current Log Data Sources and import new ones.
Open a Log Data Source
To access a specific Log Data Source, follow these steps:
- Click the Manage Source button
- In the menu, select Open
Reload a Log Data Source
It is possible to reload a single Log Data Source by clicking Manage Source and selecting Reload in the context menu. This is useful when an LDS already on display has new data and needs to be updated.
It is also possible to reload all available Log Data Sources in the environment by clicking Reload in the upper right corner.
Linking a Log Data Source and a solution
It is possible to link (or unlink) the selected Log Data Source to the currently open solution. To do so, simply click Manage Source and select Link/Unlink.
Note that the possibility to Link and Unlink depends on the user permissions of the current user.
Log Data Source window
The Log Data Source window is Teneo Studio's querying center (to learn how to open a Log Data Source, click here).
In this window it is possible to:
- perform queries
- see the query history and export query results
- share queries
- view Session data
- manage solutions to perform queries with Engine matching.
The Log Data Source window hosts the querying and result management features, as well as the Session Data Viewer, and the Recent Queries and Shared Queries panels.
The window contains two tabs (Log Data Source and Home). The Home tab provides the following sections:
- Top ribbon containing:
- The Source and Tabs areas offer buttons to close the window, save queries and cancel
- The Query area offers buttons to create, share and save queries
- The Result area allows to export query results in .csv or .json formats
- The Session Viewer area to create a new Session Data tab
- The Query command bar, or TQL editor, to type in the Teneo Query Language queries
- The Queries panel displays:
- Shared Queries and
- Recent Queries performed while the LDS is open, along with the summary of the query results and other execution information.
The window, before running any queries, also contains a summary of the Basic Query Commands.
Log Data Source tab
This tab consists of a menu with the following options:
- Summary which outlines the number of sessions, amounts of weeks covered by the session, and the LDS status
- Solutions which provides information related to the queryable solutions available, see more here.
Query Log Data
To run a query, follow the below steps:
- Go to the Log Data Source main screen
- Enter a TQL command in the TQL editor (for information on how to write TQL command please see the Teneo Query Language section)
- Click the Run Query button, or alternatively, press the key combination Control+Enter.
Query results make take a few seconds in appearing, the system will display an execution message in the meantime. It is possible to cancel the query at any time by clicking the Cancel button to the right.
Once the query has finished, the results will be displayed.
The TQL editor is designed to highlight keywords, operators and strings; typing at the start of the TQL editor will provide auto-completion for the basic query commands and invalid commands will be highlighted.
Use Ctrl+F to find specific text in the editor. Tab and Shift+Tab allows to indent and outdent lines in the query.
The user can use either the New button in the top ribbon, or the small icon on the right of existing queries to create a new tab for querying.
If an incorrect query is attempted, the system will display an error message.
Navigating from query results
When the query results contain properties with Ids (such as Flow Ids or Intent Trigger Ids), it is possible to see information regarding the element by hoovering over the Id. To access and see the element directly in the solution, simply double-click the Id.
Exporting query results
Export of query results is available in .csv and .json file formats.
To export the query results, use the Export as CSV/JSON buttons available in the top ribbon.
When query results are exported in the .json format, they can later be reimported by using the Log Data Manager (or the Inquire Client) and used for querying. This is not possible if the results are exported as a .csv file.
Teneo Inquire users can access the REST API directly or use the java/Groovy Inquire Client library. It is distributed as a Java jar file which can be embedded into Java applications or used by JVM-based scripting languages, such as Groovy.
Saving queries using TQL
Whenever a query is saved using the TQL command
save, it will be stored in the system as a user-generated data. The user may access them from Teneo Studio using the Teneo Query Language.
However, if the user wishes to see a full list of the saved queries, the user may do so from the Teneo Inquire Log Data Manager Frontend. It the user does not have access to this module, please contact the data manager.
Recent Queries panel
The Recent Queries panel displays the list of the queries performed while the LDS is open, along with a summary of the query results and other execution information.
The user can access any of the recent queries by double-clicking the one to open.
Shared Queries panel
The Share queries feature allows to save queries in Teneo Query Language and share them with other users. Note that queries are shared at LDS level, so only users with access to the specific LDS will be able to see them.
To create a new shared query, after typing in the query, click on the Share button in the top ribbon. Alternatively, click Share first to open the dialogue window to create a shared query.
A dialogue window will open in order to create the shared query.
Add the following information:
- Name of the shared query, note that the name needs to be unique
- Description of the shared query
- The TQL Query string to be shared (if it hadn't been introduced already).
The query to share is marked with a star, until the user clicks Save.
Once created, a Shared Query can be run, edited or removed at any time by any user using the buttons at the top of the Shared Queries panel.
A Shared Query can also be accessed by double-clicking.
Shared Queries history and restoration
It is possible to see the history of Shared Queries by clicking the History button on the right side of the query dashboard. Note that the History button only appear when more than one version of the query have been saved.
The user can also restore an older version of a query by using the Restore button located at the right end of the older version. The system will prompt the user to confirm the operation.
Publishing Shared Queries
Shared queries can also be published into Inquire; the TQL query string is then stored in Inquire along with its name. That way Inquire clients, such as dashboards, can use queries' name to run TQL queries more easily. Note that published queries can only be inspected from Teneo Studio.
In order to publish a query, simply click the Publish button.
Teneo Studio opens a dialogue window for the user to type the desired publishing name. Note that neither blank spaces nor any other special character is allowed. Click Publish again below the query to publish into Inquire.
An Unpublish button also appears when the publication has been performed.
Shared Queries access and rights
While a shared query is being edited or published, it will be locked to prevent other users from modifying it meanwhile. A small lock on the right side will indicate this.
A shared query is visible to all users with access to the Log Data Source, and any user with access to the Log Data Source can run a shared query.
- Global users may edit (i.e. add, delete, change) any shared query on any Log Data Source as long as they have the permission to open the Log Data Source query window
- Non-global users may edit any shared query when they are the solution owner of the solution linked to the open Log Data Source.
Different users can modify the same Log Data Source and common elements such as shared queries, and as these changes impact the rest of the users, to draw their attention to this, whenever users has a Log Data Source open, they will receive notifications when any of the shared queries are modified by other users.
Session Data Viewer
From the Log Data Source's homepage, it is possible to access relevant session data - such as session, transaction and event properties, variables or metadata - in a visual, user-friendly view using the Session Data Viewer.
To open the Session Data Viewer, simply click the New Session Viewer Tab in the top ribbon of the Log Data Source. A new Session Viewer tab will open.
Order By and Limit
Use the Order By menu on the right to select how the results are displayed; choose between:
- Query Order
- Transaction Count
- Start Date
- End Date
- Event Count
- Session Id
The user may also set the results by Ascending or Descending order, and Limit the number of results per page.
Optionally, the user may enter TQL constraints in the command box to narrow the search.
Once the parameters are set, click the Run Query button. The system will prompt the user to select one of the sessions from the Log Data Source to proceed.
Lastly, the user will be presented with the information related to the selected session.
Find and Filter
It is possible to refine the display data by using the Find and Filter buttons:
- Find keeps all events visible, navigates the user to view the next instance of the selection
- Filter removes all events not selected in the property list, navigates the user to the first occurrence.
Queries can be run against the Engine using existing solutions, which allows to add an extra layer of Natural Language Processing (NLP) to the query by matching the searches with user inputs, Language Objects, etc.
To manage queryable solutions, go to the Log Data Source window's backstage (Log Data Source > Solutions).
Solutions for Engine matching for this specific Log Data Source are displayed in this view.
The user may import, delete or reload solutions for Engine matching using the buttons in the top right corner. Remember that only solutions from the same Platform version are allowed.
Please note that the user needs user permissions to perform certain operations such as importing or deleting queryable solutions. Contact the data manager or system administrator for further information or to request access rights.
Import of WAR file
It is possible to perform analyses on Log Data making use of solution .WAR files; as for the export of the solution and its associated lexical resources which are to be used for log data analysis, the user should first create a web archive (.WAR) file of the solution and its associated lexical resources; find details on how to publish as web archive here.
Next, follow the below steps:
- Go to the Log Data panel (Solution tab > Optimization > Log Data)
- Open the log data collection to be analyzed
- Now, import the previously generated .WAR file of the solution:
- Click the Log Data Source tab in the top of the Log Data window
- Select Solutions in the left-side panel
- Click Import Solution
- Browse to the .WAR file to upload it
Now, everything is set up to enable the log data analysis using lexical resources from a solution.