Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data...

42
Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014

Transcript of Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data...

Page 1: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.

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.

<lighthearted_introductory_banter/>

Page 3: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.

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.

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.

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.

Examples

Page 7: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 8: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 9: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 10: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 11: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 12: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 13: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.

irs.gov/ita

Page 14: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 15: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 16: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 17: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 18: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 19: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.
Page 20: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.

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.

Best Practices

Page 22: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.

“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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

Page 42: Michael Poulshock Best Practices for Building Legal Knowledge Bases Michael Poulshock Wolfram Data Summit September 4-5, 2014.

Michael [email protected]/in/mpoulshock

Thank you!