Intelligent Interaction Between the User and Online Legal Content
C.A.Royles and T.J.M.Bench-Capon
LIAL - Legal Informatics at Liverpool
Department of Computer Science
The University of Liverpool
Liverpool, England
The government is currently using the Internet to publish Social Security and Benefit information online, the volume of this information is vast. The core of this research is to improve the presentation of legal information available across the Internet using Artificial Intelligence techniques. By identifying unique user characteristics and undertaking intelligent interaction with the user, online information can be tailored specifically to the user’s requirements. The underlying concepts, practical issues and implementation of a prototype system will be discussed in this paper.
1. Introduction.
The Internet is a vast source of information but a lot of this information is not directly relevant to an individual user. These relevancy issues bridge Internet sites, collections of pages, documents and even paragraphs. It is expected that the user can browse through the information they are presented, identifying and interpreting the information they read. The user is expected to extract the relevant information to solve their specific problem. This is very typical when reading paper based mediums where little can be done with the text once printed. The use of computers and digital formats now provide a mechanism to support the identification and interpretation of information in an automated manner. A good example where such a technique would be useful is the Social Security Benefit information [1] available online from the Government Internet site. Public advice leaflets are written to provide information to a very wide range of readers. In generalising for this wide audience, the length and complexity of the document increases. Due to the large generality, large sections of document are not relevant to the individual. In order to reduce this complexity, compromises can result in the omission of information for a small group of individuals. Problems with advice leaflets are discussed in more detail in [2]. By interacting with the user, unique characteristics relevant to the user can be determined as in [3]. By linking this interaction with the specific information being accessed prior to visual representation some of the problems can be alleviated.
There are expert/knowledge based system solutions already available over the Internet, which fall into three main categories.
The approach described here has a number of elements that in this combination are not found in other systems.
A prototype, QERIS has been created that provides a simple example of how such a system may be deployed and used.
2. The ConceptsHTML documents contain mark-up information in the form of tags, additional information can be provided about the document within the <META> tag. In order to provide greater control over the document, three additional tags are proposed:
<EFFECT ID = "effect id"
CONDITION = "rule1 and rule2"
PLUGIN = "insertFile"
TRUE = "http://www.csc.liv.ac.uk/~royles/Demo/true.html"
FALSE = "http://www.csc.liv.ac.uk/~royles/Demo/true.html">
The effect tag is located within the document, its position determines where the alteration to the document will take place. Effects are activated if their condition can be satisfied, if activated, its plug-in is called and the corresponding action applied to the document. A document can have any number of effects that can add, remove, modify or include HTML mark-up at the effect location. The above example will trigger if "rule1 and rule2" can be satisfied. If activated then the "inserFile" plug-in is called that use the TRUE and FALSE options to determine which file to include if the effect is active or inactive.
<QUERY ID = "question id"
QUESTION = "This is the query string"
ANSWER = "yes,no">
The query provides a template for questions that can be asked of the user. A question and a list of possible responses are provided. If the application is located on the clients machine then the query is presented as a dialog box, else the query is generated as a form within the browser allowing Internet communication as in [7]. The query above will ask the user the question string and provide a choice between answering yes or no. If no answers are provided then an open question will be asked allowing the user to input a string or number.
<RULE ID = "rule id"
CONDITION = "testrule1 is yes and testrule3"
CONCLUSION = "testrule4">
The rules are used to link the effects with the queries. By creating a chain of inferences, a question to determine if a person is married could be linked to an effect that is activated if the person is a husband, wife, widowed or divorced based on additional questions. The example rule above will be satisfied if testrule1 is yes and testrule3 has been satisfied, the result of the rule is to satisfy testrule4.
These tags are not part of the HTML standard but they are generally ignored by the browser and produce no adverse effects. The proxy server also removes the tags when it is active thus only standard HTML is passed to the browser. The recent introduction of XML also provides exciting potential for the development of these and similar tags. The tag set has already been defined in XML and further work will investigate the development of a parser. This will allow the system to work with HTML, or XML depending on the document file types.
3. System OverviewThe prototype system QERIS (Query Effect Rule Intelligent Server) consists of four main modules:
Proxy server – The proxy server allows the application to reside on either the client or the server side of the network. The browser accesses to proxy server which forwards the requests to the WWW server. The proxy can then interrogate the responses from the WWW server. If the application is located on the client’s machine, questions are asked via dialogs. This approach is very fast and responses are instantaneous. If the application is located on the WWW server, questions are asked as forms within the browser with the added Internet delay.
Knowledge base and expert system – The knowledge base stores all of the rules, queries and effects that have been identified within accessed documents. The expert system is a very simple backward chaining rule based engine that is responsible for determining which effects within documents to activate and which questions to ask the user.
HTML processor – The HTML parser extracts the special tags needed by the expert system, they also modify the final outgoing response before it reaches the browser. It would be possible to replace this module with a parser specific to another format such as XML or SGML. Although the processor takes in content containing <RULE>, <QUERY> and <EFFECT> tags, these tags are removed by the system before the document is forwarded to the browser.
GUI – The GUI provides a visual indication of status and allows limited control of the proxy and expert system. A visual representation of the rule base is also provided allowing the user to trace the rules being fired and also answer queries directly by clicking on them.

Figure 1 The system in action
Under normal conditions, the application runs alongside the Internet browser. The prototype has a limited interface designed to indicate action and provide limited control over the knowledge base. The browser needs to have its proxy preferences changing to "localhost:8080" to allow the browser and the proxy to talk to each other. Any request for a document is then passed through the proxy server. This interaction allows all the responses from the server to be processed by the proxy server. Standard WWW documents are tunnelled directly through to the browser with no alteration or processing, the delay is kept to a minimum. If any special tags are identified within an HTML document then these tags are processed and stored within the knowledge base. The next stage is the invocation of the expert system, the goals of inference being the effects present in the HTML document.
From the user’s point of view, they would request an HTML document using their WWW browser by entering a URL or clicking on a hyperlink. The document would be downloaded from the server and the first thing displayed could be a question. The answer to this question would then determine the following questions asked and also the final representation of the HTML document. Once all of the questions related to the document have been asked, the browser would display the document tailored specifically to the user. In this way, many different representations of the same document can be generated simply based on the user response. Once the user answers a question, their response is stored as a fact or characteristic that can be recalled at a later date. If the user indicates their age then this can be used in several locations within a single document and a wider collection of independent documents as long as the same identification is used for the fact in all cases.
4. Example
The following example is a simple representation of how a single section of the housing benefit advice leaflet provided by social security benefits may be represented. On the left is the original text of the online version and on the right is a processed version where the user met all conditions.
The user is asked a sequence of questions to determine if they meet the requirements listed in the document in order to claim housing benefit. The requirements to claim have been included in the original and processed document so it is still useful if the system is not running. The processed document has a number of additional lines that have been included dynamically depending on the user’s responses. The final sentence also indicates the overall conclusion of the rule base, providing relevant links to progress the interaction.
The appearance of the page and the style of interaction are applied by the author of the original document by using the QERIS mark-up language. The system does not alter the information directly it modifies the HTML mark-up that controls the placement and appearance of the information. The knowledge mark-up is flexible just in the same way as the HTML it controls.
The questions and their association to the effects within the document are shown below

This document has five effects, each are separate conclusions each acts independently activating or not activating based on the inference of the expert system. The effects can be linked by rules, in the case of effect 5 it combines rule1 – rule4 in order to reach a conclusion. For this interaction, a minimum of five questions will be asked to determine if the person is valid to claim housing benefit.
Depending on the design of the knowledge base, the thread of inference can take different paths, as in the case of conventional expert systems not all questions need to be asked in order to reach a conclusion. The QERIS system can be considered an HTML pre processor and an intelligent query engine only asking the questions required to meet the conclusions in each document.
5. ConclusionThis paper has described the concepts behind a new system for presenting tailored documents through interaction with the reader. The implementation of a prototype provides a foundation for developing the underlying concepts further. The system allows authors to interact with the recipient of the document, provide better targeting and help in the interpretation of online information. The system provides the reader with a more interactive and specialised representation of the information they are accessing.
The system is well suited to legal advice where information is provided to the public and further advice can be provided via intelligent querying. The ability to tailor entire documents is a new step beyond generating personalised bookmark lists. The ideas discussed here can be integrated with browser technology, work alongside current search and agent based technologies and integrates well with current HTML mark-up. The prototype has been implemented entirely in Java providing a platform independent, and browser independent implementation. The implementation now requires rigorous testing and evaluation to determine its suitability in real life situations. It is envisaged that as the project develops, this technique of tailoring documents dynamically will become a practical application in the domain of legal online presentation.
This project has been funded by CONNECT, the Internet centre for Merseyside businesses.
URLs
Christopher Royles: http://www.csc.liv.ac.uk/~royles
Trevor Bench-Capon: http://www.csc.liv.ac.uk/~tbc
References