![Page 1: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/1.jpg)
Best Practices for Building Legal Knowledge BasesMichael Poulshock
Wolfram Data SummitSeptember 4-5, 2014
![Page 2: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/2.jpg)
<lighthearted_introductory_banter/>
![Page 3: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/3.jpg)
About me
oLegal knowledge engineeroLawyer + programmeroWork at Exeter GroupoBuild systems that
automate law and policy
![Page 4: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/4.jpg)
Automating the law?
oEncoding legal rulesoApplying the rules to fact
patternsoGetting legal conclusions or
“determinations”oEmbedding this functionality
in a larger system
![Page 5: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/5.jpg)
Vocab
o Expert systemso Business rule engineso Knowledge baseo Knowledge engineeringo Policy automation / modelingo Decision support systemso Calculatorso Computational law
![Page 6: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/6.jpg)
Examples
![Page 7: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/7.jpg)
![Page 8: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/8.jpg)
![Page 9: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/9.jpg)
![Page 10: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/10.jpg)
![Page 11: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/11.jpg)
![Page 12: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/12.jpg)
![Page 13: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/13.jpg)
irs.gov/ita
![Page 14: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/14.jpg)
![Page 15: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/15.jpg)
![Page 16: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/16.jpg)
![Page 17: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/17.jpg)
![Page 18: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/18.jpg)
![Page 19: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/19.jpg)
![Page 20: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/20.jpg)
Benefits of automation
oConsistencyoSpeedoCost-effectivenessoAuditabilityoBreadth of knowledgeoUpdated as the law changes
![Page 21: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/21.jpg)
Best Practices
![Page 22: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/22.jpg)
“An expert is a person who has made all the mistakes that can be made in a very narrow field.”
Niels Bohr
![Page 23: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/23.jpg)
1. Declarative paradigm
oProcedural (step-by-step)oDeclarative (if-then)oPolicy rules tend to be
expressed declarativelyoProcedural representations
(such as flowcharts) do not scale well
![Page 24: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/24.jpg)
1. Declarative paradigm
procedural declarative
the transaction is in compliance ifthe amount < $10,000 orthe date > 2014-12-31 orthe type = “Intracompany”
compliesQ[t_] :=amount[t] < 10000 ||date[t] > {2014, 12, 31} ||type[t] == “Intracompany”
![Page 25: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/25.jpg)
2. Isomorphism
oCode should be structured similarly to the policy rules
oCorrespondence / traceability
oRule verificationoMaintenance
![Page 26: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/26.jpg)
2. Isomorphism
the waiver of inadmissability is valid under 8 CFR 1207.3(b) if
the basis = “Humanitarian grounds” orthe basis = “Family unity” orthe basis = “Public interest”
![Page 27: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/27.jpg)
2. Isomorphism - techniquesoUse domain vocabularyoFollow document structureo Include citationsoAdd code comments
documenting assumptions, etc.
![Page 28: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/28.jpg)
3. Cross-trained developersoProgrammers lawyersoLawyers programmersoCenter of Excellence approachoHandling changes in the lawoFundamentally, this is
programming
![Page 29: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/29.jpg)
Tree-like structure of legal rulesthe person is liable for the tax if
the person’s income >= $12,000 and
the person is not a tax dependent
the person’s income = ...
the person is a tax dependent if...
![Page 30: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/30.jpg)
Tree-like structure of legal rules
![Page 31: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/31.jpg)
Tree-like structure of legal rules
![Page 32: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/32.jpg)
Tree-like structure of legal rules
![Page 33: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/33.jpg)
4. Tool that can analyze the treeo Fundamental challenge:
oHow do you know what the inputs are for a particular goal?
oHow do you know which are relevant?
o Need a tool that can collect data in automated wayoDebuggingoDynamic interviews
![Page 34: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/34.jpg)
5. Separation of policy rules
oFundamental tension between declarative rules and interview behavior
oDon’t want to hard code interview sequences
oBut we want a humane and empathetic user experience
![Page 35: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/35.jpg)
5. Separation of policy rules
o Best practice is to separate policy logic from other types of rules, such as:o Interview sequenceo Interview messages and visibilityoData transformationoData validation
![Page 36: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/36.jpg)
6. Time
Why time is complicated:
1. Laws change
2. Facts change
3. The way facts change matters
4. Points of reference change
![Page 37: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/37.jpg)
6. Time
oHandling time can easily make a mess of your code
oNeed to address time early onoBackdrop of absolute timeoNeed functions and data
structures for handling time
![Page 38: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/38.jpg)
7. Knowledge of ignorance
oNot all law is worth automating
oGranularityoModels are always
approximateo Systems need to know
what they don’t know and route those cases to humans
![Page 39: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/39.jpg)
8. Sufficiently expressive languageoMany tools out thereoSome geared to business usersoMany not expressive enoughoMany not extendable
o Functional programming is preferable
o Conservation of complexity
![Page 40: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/40.jpg)
9. General software best practices
a) Functional programming
b) Unit testing
c) Refactoring
![Page 41: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014](https://reader036.vdocument.in/reader036/viewer/2022072012/56649e395503460f94b2aa25/html5/thumbnails/41.jpg)
Closing thoughts
o Law is inherently complexo Legal logic is fractal-esqueo Law is more computational than
it may first appearoWrapper / interface around the
law’s complexityoMaking the law more accessible