Skip to Content

JEFF (Java Explanation Facility Framework)

Posted in

JEFF is an explanation facility framework written in Java. Explanation facilities date from the era of expert systems (ES) where they were used in order to provide an explanation about the inference process. The explanation they provided was supposed to clarify how the ES reached its conclusions (the "HOW" explanation) or why it asked some question during fact acquisition (the "WHY" explanation).

Some authors suggest that there is a third type of explanation that unveils the strategic decisions that affected the inference process (the “STRATEGY” explanation). Nowadays, traditional ES development environments ("shells") are replaced by rule engines (RE) and business rule management systems (BRMS) which seem to lack explanation facility functionality. JEFF was created in order to remedy this.

Goals and audience

The main goal of JEFF project is to provide an open-source and free (for all types of use, development and distribution) explanation facility framework in Java. It should be:

  • Simple to use
  • Able to provide explanations in "natural-language-like" sentences making them easy to read and comprehend
  • Able to enrich explanations with data, images and possibly other media
  • Easy to integrate and use with various existing ES, RE and BRMS written in Java
  • Able to provide explanations in different languages with no modification to the framework itself (internationalization)
  • Able to provide explanations in the form of reports in various output formats
  • Extendable - easy to add new features without major modifications to the existing elements 

It is important to note that JEFF is, at this point, intended to provide the "HOW" and “STRATEGY” explanations but not the “WHY” explanation. The first one is a step-by-step explanation on how the ES reached its conclusions during the inference process. The second one is inteded to clarify strategic decisions that affected the inference process. Also, it is important to know that REs and BRMSs rarely query the user directly by asking questions. In most cases, they gather facts from databases, live business processes etc. so there is no need for a "WHY" explanation.

The intended audience for this project is from the realm of scientific and educational, but is by no means limited to them. Developers and other business users are most welcome to exploit JEFF in their projects.

Basic algorithm

The basic algorithm for JEFF usage can be described in four major steps:

  1. Choose language and country
  2. Create explanation
  3. Choose report format
  4. Create report

The first step is to choose a language in which the explanation should be written. When choosing a language it is also important to define the country for which it is intended because of various dialects one language can have (i.e. American English and British English). This step is optional and should be used only if there is a need to be able to provide explanations in various languages. If omitted, a default language and country are chosen and internationalization as a feature is turned off.

The second step is more important as it involves interaction with the ES, RE or BRMS. When the inferencing process starts, and rules get executed, little pieces of explanation (explanation chunks) get created and inserted into the explanation. The idea is to form the complete explanation step by step and to explain all important conclusions as they appear. The connection between the ES, RE or BRMS and JEFF is made in the rules themselves. When a rule gets executed, it is supposed to call a JEFF method for inserting an explanation chunk into the explanation. Most modern RE and BRMS written in Java have the option of using Java objects and calling Java methods within the rules themselves and this is why this approach was chosen.

When the explanation is created, it can be transformed into a report. The third step is to choose a report format such as plain text, XML or PDF. At this moment, only these three are supported, but additional formats can be introduced if necessary.

The final step is to create the report (in the desired format) based on the explanation. Generally, this involves transforming the explanation into a text file, XML file or PDF file. Optionally, an output stream or writer can be passed to JEFF so the report (text, XML or PDF) can be served to the standard output stream ("console"), browser (via servlet or JSP) etc.


This is a basic project overview page. JEFF is now hosted on SourceForge under the LGPL v3 license. All relevant materials including source code, documentation and binaries can be found here.

Project team

Bojan Tomic - creator and developer

Boris Horvat - developer

Nemanja Jovanovic - developer