Skip to content
Become a partner
Research · Expert system

An expert system built from a plain-language description

Expert systems long required months of modelling. In VVL, it is enough to describe the domain, the standard profiles and the decision rule, as you would explain them to a new colleague. The system derives an ontology, profiles and rules from it, then creates a new instruction in the language that decides on each case.

How it is built

Two calls to build, rules to decide

Construction happens once, in two calls to the language model. The first produces the domain ontology: the main class, its attributes and the standard profiles, represented as abstract objects that encode their characteristic properties. The second translates the decision rule into inference rules: each case receives the label of the profile it best matches, according to a degree of satisfaction.

  1. 01Description in plain language
  2. 02Ontology and profiles
  3. 03Decision rules
  4. 04New instruction

After that, every case submitted as free text always follows the same path: the language model extracts its fields, the facts are recorded in the ontology, then the rules decide. When the extracted values match the profiles exactly, the decision requires no further call; otherwise, comparisons of meaning are settled by Jev or by the language model, and cached. The expert can be saved, reloaded in another session, and consulted automatically by the universal solver.

Business examples

One expert, readable decisions

Credit: assessing a customer application

Three risk profiles and a decision rule, described in a few lines. The expert created is called Scoring and is used like any other instruction.

Documented results: approved, to review, refused.

Aliceapprouvehigh score · long tenure
Boba_etudieraverage score · medium tenure
Carolrefuselow score · recent tenure
ScoringVVL
[expert "
  Domaine evaluation risque credit. Dossier client avec nom, revenu,
  score_credit (eleve/moyen/faible), anciennete (longue/moyenne/recente),
  decision. Profils BonRisque (score_credit eleve, anciennete longue),
  RisqueModere (score_credit moyen, anciennete moyenne),
  RisqueEleve (score_credit faible, anciennete recente).
  decision : 'approuve' si BonRisque, 'a_etudier' si RisqueModere,
  'refuse' si RisqueEleve, sinon 'a_etudier'.
" "Scoring"]

[Scoring "Alice, revenu 4500, score eleve, anciennete longue"]   # approuve
[Scoring "Bob, revenu 2800, score moyen, anciennete moyenne"]    # a_etudier
[Scoring "Carol, revenu 1800, score faible, anciennete recente"] # refuse

Customer support: a ticket's priority and category

A single expert can produce several decisions. Here, each ticket receives a priority and a category.

TicketTriagerVVL
[expert "
  Domaine support SaaS. Ticket avec titre, description, type_probleme
  (panne_majeure/bug/question), impact_utilisateurs (eleve/moyen/faible),
  urgence_business (critique/haute/basse), priorite, categorie.
  Profils Critique (panne_majeure, impact eleve, urgence critique),
  Important (bug, impact moyen), Routine (question), Mineur (impact faible).
  La priorite est : 'P0' si Critique, 'P1' si Important, 'P2' si Routine,
  'P3' si Mineur, sinon 'P2'.
  La categorie est : 'incident' si Critique ou Important, 'demande'
  si Routine, 'low_prio' si Mineur, sinon 'demande'.
" "TicketTriager"]

[TicketTriager "Production en panne complete, panne_majeure, impact eleve, urgence critique"]
# Ticket[priorite="P0", categorie="incident"]

Accounting: classifying cash flows

A chartered accountant describes how to place each bank transaction in the cash flow statement: operating, investing, financing. The expert then classifies real transactions, including a compound transaction that produces two lines.

Documented case study: twelve real transactions classified; one ambiguous case, corporation tax, is flagged for review.

FluxTresoVVL
$_desc = "Classification d un flux de tresorerie d entreprise ...
Attribut de sortie:
- cycle (exploitation/investissement/capitaux_propres/endettement/placement_financier): ...
Regles:
Vente comptant ou encaissement client = cycle exploitation, ligne recette_exploitation, agregat ETE.
Acquisition machine, immobilisation, brevet = cycle investissement, ligne investissement, agregat FTD.
..."
[expert $_desc "FluxTreso"]
[FluxTreso "Acquisition presse hydraulique 145 000 EUR"]   # investissement / investissement / FTD
Reusing the expert

Saving, and consultation by the solver

The expert is saved in the workspace and reloaded in another session. Once registered, the universal solver passes it the questions that fall within its domain.

expert:save · expert:loadVVL
[workspace go demo]
[expert:save "Scoring"]
# dans une nouvelle session :
[workspace go demo]
[expert:load "Scoring"]
[Scoring "Eve, revenu 5000, score_credit eleve, anciennete longue"]
$r = [§§? "Évalue le dossier de Alice Dubois, revenu 4500, score élevé, ancienneté longue"]
$r.value           # {..., 'decision': 'approuve'}
Guarantees

What it guarantees, and its limits

  • The decision is made by written, readable rules that can be reviewed, modified and saved.
  • Each case is first transcribed into an ontology: the extracted fields are visible and can be checked.
  • Each case costs one call to the language model for extraction; building the expert costs two.
  • An expert covers one main class, and each expected decision must be named in the description.
Putting it into practice

Apply this work to your processes?

These tools are instructions of the VVL language: our partners implement them for their clients, on the ProSuite platforms.