1. DataLex legal knowledge-base systems

AustLII's DataLex inferencing software allows the development of Internet-based applications combining knowledge-based inferencing, a limited form of example-based inferencing, and automated document assembly. Applications are in the form of a plain-text knowledge-base (KB), which is written in a quasi-natural language knowledge representation.

The DataLex legal knowledge-based system has the following principal components:

Components of DataLex platform

This Manual describes the development and use of AustLII's DataLex legal knowledge-base systems as at June 2019. [1]

1.1.1 The DataLex inferencing software - YSH

The DataLex inferencing software (inference engine) is also known as YSH (pronounced 'why-shell'), and is referred to as such in previous documentation. It uses a quasi-natural language knowledge representation. Knowledge may be represented as backward or forward chaining rules, or procedures, or any combinations of these, for the purposes of rule-based inferencing. Knowledge may also be represented as clusters of fact descriptions, 'cases', for the purposes of example-based inferencing using nearest-neighbour discriminant analysis. Facts are shared by the rule-based and example-based inferencing mechanisms, and by the document generator. YSH was developed with the creation of applications to law in mind, but is equally applicable to the creation of other automated interview style applications.

Andrew Mowbray is the author of the DataLex inferencing software / YSH. The version covered in this Manual is DataLex/YSH Ver. 1.2.1.

1.1.2 The DataLex knowledge-base development tools

Development of DataLex applications primarily takes place within the DataLex section of the AustLII Communities environment.[2] The development environment is that of a closed wiki which preserves the correct formatting of the knowledge-base, and provides a number of tools for checking and correcting syntax. Automated hypertext links between knowledge-base texts and the source texts on AustLII and other LIIs also make it easier to check rules etc against the sources on which they are based, during development. There is also a development environment located outside AustLII Communities which is used for teaching and development of test knowledge-bases.[3] Their use is covered later in this Chapter.

1.1.3 The DataLex user interface

The user interface to the DataLex inferencing software provides an easy-to-use environment in which end-users conduct a question-and-answer dialogue with the application in order to provide information ('facts') to it in order for the system to draw conclusions, and to conclude a user session by producing a report (and in some cases a document). The interface allows users to ask Why questions are being asked and How conclusions have been reaching, as well as to Forget facts previously provided, and to test hypothetical facts through a What-if facility. The user interface also uses AustLII's automated hypertext markup and free text retrieval facilities to provide automated hypertext links from dialogues, conclusions and reports to the relevant legal sources on AustLII or on other LIIs. This integration between the inferencing components and the legal sources located on LIIs is one of the principal distinctive features of the DataLex approach.

The User Manual for the current[4] DataLex user interface is in Chapter 8 of this Manual. The purposes of features of the software, as described in this Developer's Manual, are sometimes best understood by reference to the User's Manual. The current interface[5] to the DataLex inferencing software (2019) has been developed by Philip Chung, Andrew Mowbray and AustLII consultants.

1.2 Conventions used in this Manual

The following conventions are used in this Manual to explain commands or file names:

string Words or symbols in bold indicate the actual words or symbols used;

string Words or symbols in italics indicate that their content is variable;

| A vertical bar is used to divide a range of options - don't type it.

1.3 Theoretical foundations of the DataLex approach

There are a number of articles explaining and justifying the approach taken by the DataLex project. The main articles, and bibliography, are as follows:
  • A Mowbray, P Chung and G Greenleaf, 'Utilising AI in the Legal Assistance Sector - Testing a Role for Legal Information Institutes' (29 April 2019), presented at LegalAIIA 2019, co-located with ICAIL 2019, 17 June 2019, Montreal, Quebec, Canada <https://ssrn.com/abstract=3379441>
  • G Greenleaf, A Mowbray, and P Chung, 'Building Sustainable Free Legal Advisory Systems: Experiences from the History of AI & Law' (2018) 34(1) Computer Law & Security Review 314 <https://ssrn.com/abstract=3021452>
  • G Greenleaf, A Mowbray, and P Chung, 'The Datalex Project: History and Bibliography' (3 January 2018). [2018] UNSWLRS 4 or <https://ssrn.com/abstract=3095897>
  • G Greenleaf, A Mowbray, and P van Dijk, 'Representing and using legal knowledge in integrated decision support systems - DataLex WorkStations' Artificial Intelligence & Law, Vol 3, 1995, Kluwer, 97-142 <https://papers.ssrn.com/abstract_id=2183481>

1.4 Creating a new knowledge-base in the DataLex Community

The DataLex Community (part of the AustLII Communities) is a collaborative closed wiki-like platform used in the DataLex system for creating and editing knowledge-bases or rule-bases.

Log into the DataLex Community site <http://austlii.community/wiki/DataLex/> by clicking on the 'Log in' button on the top right hand corner.

DataLex Community log in process

Once the login process is verified, an extra row of buttons for editing and creating new rule-bases will appear on the page.

Editing existing rule-base in DataLex Community.

Click on 'Edit' to edit existing rule-bases.

To start a new rule-base (or topic), click on the 'New' button. Do so from the DataLex page, or it will be a sub-page from wherever you start. The following window will appear:

Creating new rule-base (or topic) in DataLex Community.

Enter the 'Title' of the rule-base to be constructed. The example here is 'PrivacyKB' for a privacy law knowledge-base. (For easy identifiability, it is useful to give knowledge-bases the suffix 'KB'.) In the 'Template' section, select 'DataLexKBTemplate' (not 'Default'). Then, click on 'Submit'.

In the editing screen for the rule-base (with heading 'Title of knowledge-base'), start editing your rule-base by deleting 'ADD RULES HERE'. One way to start a rule base is to paste in a legislative section, and start editing it to create rules.

To find your rule-base after you have logged back in, search for the first few letters of the name of your rule-base (eg search for 'FOI' to find FOIDocumentOfAnAgencyKB).

1.5 Creating a new knowledge-base using the Development Tools

If you do not yet have an account in AustLII Communities, go to http://www.datalex.org/dev/import/ (the DataLex knowledge-base Development Tools page - 'KB Tools page'). No login is necessary. This page enables creation and test-runs of small applications using the DataLex software. However, it does not allow test apps to be saved.

DataLex knowledge-base development tools: Importing and Editing rules

There are two ways to start writing an app:

(i) Simply start writing in the 'Edit DataLex knowledge-base' editing screen, following the instructions in this Manual.

(ii) If you know what section of an Australian Act you would like to start with, go to the 'Import legislative section (available on AustLII)' and enter the Act name, jurisdiction and section, then start editing as in (i) above.

DataLex knowledgebase development tools: Running Consultation and Checking rule-base.

Select the 'Run Consultation' button when you are ready to test your KB. Please note:
  • After running your app (successfully or unsuccessfully) you can use your browser to come back to the KB Tools page to make further edits to your KB.
  • If your app does not run as intended, use the 'Check Fact Cross References' and 'Check Fact Translations' buttons to run diagnostics (see 5 below) to identify problems. Edit and run again.
  • If you have spent any significant time developing a test KB, you might want to save a copy in a word processor or other file, in case the browser malfunctions, or if you want to use the KB again after you have quit the browser.
  • To add another section of an Act from AustLII to an existing KB, use the 'Import and Append' button after specifying the additional section.
  • To over-write and erase an existing KB with a new section from AustLII, use the 'Import and Replace' button.
  • To clear an existing KB and start again, use 'Clear knowledge-base'.

[1] Parts are derived from A. Mowbray, G. Greenleaf, G. King & S. Cant Wysh Developer's Manuals, AustLII, June 1997.

[2] DataLex section of the AustLII Communities <http://austlii.community/wiki/DataLex/> [3] DataLex knowledge-base Development Tools <http://www.datalex.org/dev/import/> [4] A previous user manual, referred to in some documentation, was A Mowbray, G Greenleaf, G King & S Cant Wysh User's Manual - 1997.

[5] The earliest web interface to YSH (S. Cant and G. King, 1997) was called Wysh ('web-ysh'), a Common Gateway Interface (CGI) to YSH written in Perl and C. It associated each user session with a session identifier and connects subsequent requests to the appropriate session, or process, by means of UNIX sockets. It is referred to in previous documentation.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding AustLII Communities? Send feedback