diff --git a/assets/images/timeline/evidence-trail.png b/assets/images/timeline/evidence-trail.png new file mode 100644 index 0000000..7877181 Binary files /dev/null and b/assets/images/timeline/evidence-trail.png differ diff --git a/assets/images/timeline/form-top.png b/assets/images/timeline/form-top.png new file mode 100644 index 0000000..f471a04 Binary files /dev/null and b/assets/images/timeline/form-top.png differ diff --git a/assets/images/timeline/hero-guide.png b/assets/images/timeline/hero-guide.png new file mode 100644 index 0000000..1611a25 Binary files /dev/null and b/assets/images/timeline/hero-guide.png differ diff --git a/assets/images/timeline/hero-marketing.png b/assets/images/timeline/hero-marketing.png new file mode 100644 index 0000000..970682f Binary files /dev/null and b/assets/images/timeline/hero-marketing.png differ diff --git a/assets/images/timeline/hero-tech.png b/assets/images/timeline/hero-tech.png new file mode 100644 index 0000000..810ae65 Binary files /dev/null and b/assets/images/timeline/hero-tech.png differ diff --git a/assets/images/timeline/output-detail.png b/assets/images/timeline/output-detail.png new file mode 100644 index 0000000..d324b9a Binary files /dev/null and b/assets/images/timeline/output-detail.png differ diff --git a/assets/images/timeline/output-timeline.png b/assets/images/timeline/output-timeline.png new file mode 100644 index 0000000..f0af30d Binary files /dev/null and b/assets/images/timeline/output-timeline.png differ diff --git a/preview.php b/preview.php index 70a8ef0..d46f05b 100644 --- a/preview.php +++ b/preview.php @@ -574,6 +574,14 @@ $sample = $samples[$slug]; · How it works + +
+ About Timeline + · + User guide + · + How it works +
diff --git a/timeline-about.php b/timeline-about.php new file mode 100644 index 0000000..4e754ea --- /dev/null +++ b/timeline-about.php @@ -0,0 +1,259 @@ + + + + + + + Timeline — Every date in your case, instantly mapped · Do Better Norge Tools + + + + + + + + + + + + + + +
+ + + + + + Legal Tools + +
+ + + Open Timeline → + + Sign in + +
+
+ + + + +
+
+

Events · Deadlines · Milestones

+

Every date in your case, instantly mapped.

+

Timeline reads Norwegian case notes, court decisions, and correspondence — then extracts every temporal reference into a sortable, confidence-scored chronology. Know what happened, when, and what comes next.

+ +
+
+ 12+ + date formats recognised +
+
+ 5 + event types classified +
+
+ 4 + focus filter modes +
+
+ 3 + confidence levels +
+
+ + +
+
+ + +
+
+

What you get

+

Three things that change how you read a case.

+
+
+ 📅 +

AI date extraction

+

Timeline recognises 12+ Norwegian date formats — from 30.07.2015 to tre uker etter vedtaket to hver mandag. Every temporal reference in your document is surfaced, not just the obvious calendar dates.

+
+
+ 🎯 +

Confidence scoring per event

+

Every extracted event is tagged HIGH, MEDIUM, or LOW confidence based on how explicitly the date appears in the source. Use the confidence filter to hide uncertain events when you need a clean, defensible timeline.

+
+
+ 🔍 +

Evidence trail & next step

+

Below every timeline: a full Evidence Trail listing every source document, a What Remains Uncertain list for dates the AI couldn't resolve, and a single Next Practical Step recommendation for your case.

+
+
+
+
+ + +
+

How it works

+

Upload → extract → review. In under a minute.

+

Three steps from raw case documents to a complete, sortable timeline.

+ +
+
+ 1 +

Upload documents or paste text

+

Upload up to 5 files (PDF, DOCX, TXT) or paste up to 128,000 characters of case text. Add optional context notes to help the AI interpret abbreviations, actor names, or document-specific date conventions.

+

E.g. “D refers to the defendant throughout. All dates are in 2024 unless stated otherwise.”

+
+ +
+ 2 +

AI extracts & classifies

+

The engine reads every sentence, recognising Norwegian date formats and classifying each event by type (absolute, relative, recurring, conditional, period) and assigning a confidence score. Focus filters scope the extraction to what matters most for your case.

+

Returns structured output: date · type · confidence · actor · description · source excerpt

+
+ +
+ 3 +

Review the sortable timeline

+

Events appear in document order or sorted chronologically. Search by keyword, filter by confidence, and review each event's source excerpt. The evidence trail and next step recommendation appear below the timeline.

+

Sort: document order ↔ chronological · Search any keyword · Filter by confidence

+
+
+
+ + +
+
+

Screenshots

+

See it in action.

+ +
+
+ + +
+

Under the hood

+

Powered by a purpose-built legal LLM.

+
+
+ Fine-tuned model +

dbn-legal-agent

+

A QLoRA fine-tune trained on Norwegian child-welfare and administrative law text — case notes, court decisions, and Barnevernet correspondence. Unlike a general-purpose LLM, dbn-legal-agent understands the temporal patterns of Norwegian legal proceedings: when an appeal window closes, what akutt means procedurally, how Fylkesnemnda milestones are sequenced. It runs on the GPU/cuttlefish engine as the local extraction backbone.

+
+
+
+ QLoRA + fine-tune method +
+
+ 12+ + date formats +
+
+ 5 + event types +
+
+ GPU + local engine +
+
+
+
+ + +
+
+

Focus filters

+

Extract only what your case needs.

+

Four modes scope the extraction pipeline to the events that matter most for your situation.

+
+
+ 📅 +

All events ★

+

Default. Extracts every temporal reference in the document — background dates, operational events, deadlines, and narrative context. Best for building a complete picture from scratch.

+
+
+ ⚖️ +

Legal deadlines

+

Scopes extraction to filing deadlines, appeal windows, and statutory time limits. Filters out narrative and background dates. Use when you need to know exactly what dates you must act on.

+
+
+ 🏛️ +

Court hearings

+

Focuses on tribunal sessions, mediation dates, and court appearances. Ideal for preparing for a hearing or reconstructing the full history of proceedings.

+
+
+ 👤 +

CPS milestones

+

Targets Barnevernet interventions, akuttplassering dates, tiltaksplan milestones, and Fylkesnemnda proceedings. The most targeted mode for child welfare cases.

+
+
+
+
+ + +
+

Ready to map your case?

+

Free for Do Better Norge members. No credit card required.

+ +
+ + + + + diff --git a/timeline-guide.php b/timeline-guide.php new file mode 100644 index 0000000..6e572c7 --- /dev/null +++ b/timeline-guide.php @@ -0,0 +1,343 @@ + + + + + + + Timeline User Guide — How to extract dates from Norwegian legal documents + + + + + + + + + + + + + +
+ + + + + + Legal Tools + +
+ + + Open Timeline → + + Sign in + +
+
+ + + + +
+
+

User Guide · Timeline

+

How to use Timeline.

+

A step-by-step walkthrough of every control — from choosing your engine and focus filter to reading the output and understanding the evidence trail.

+
+
+ + +
+ + + + +
+
+ 1 +

Choose your engine

+
+
+

The engine controls the AI model used for extraction. Azure engines use your BNL Azure credits. The GPU engine runs the LiteLLM proxy on the local cuttlefish server with the dbn-legal-agent fine-tuned model.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
EngineSpeedBest for
Azure gpt-4o-mini ★Fast (~15 s)Default. Everyday extractions, long documents, first pass.
Azure gpt-4oBest quality (~45 s)Complex documents, overlapping events, ambiguous or poorly formatted source text.
GPU / cuttlefishLocal (~25 s)Maximum privacy. Runs entirely on local GPU with dbn-legal-agent fine-tuned model. Requires cuttlefish server online.
+
+ + +
+
+ 2 +

Focus filter

+
+
+

The focus filter scopes what kinds of events the AI looks for. Found in the Advanced settings panel (click to expand).

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ModeWhat it extractsWhen to use
All events ★Every temporal reference in the document — background, operational, deadlines, narrativeBuilding a complete chronology from scratch
Legal deadlinesFiling deadlines, appeal windows, statutory time limitsChecking whether you've missed a deadline or when you must act next
Court hearingsTribunal sessions, mediation dates, court appearancesPreparing for a hearing or reconstructing hearing history
CPS milestonesBarnevernet interventions, akuttplassering, tiltaksplan milestones, Fylkesnemnda proceedingsChild welfare cases needing a CPS-specific chronology
+
+ + +
+
+ 3 +

Confidence filter

+
+
+

Controls whether uncertain events appear in the output. Also in the Advanced settings panel.

+
+ + + + + + + + + + + + + + + + + +
SettingWhat it does
Show all events ★Returns all extracted events including LOW-confidence ones (shown in grey). Use for a complete picture — decide yourself what to trust.
Hide low-confidenceSuppresses any event the model isn't reasonably certain about. Use when you need a clean, defensible timeline for court or legal filing.
+
+

LOW-confidence events are typically those where the date is implied rather than stated, relative to an unclear reference point, or extracted from a degraded or ambiguous section of the source.

+
+
+ + +
+
+ 4 +

Background events

+
+
+

Default: ON (checked). When checked, historical context dates are included — dates like “born 30.07.2015”, “met around 2011/2012”, “married in 2009”. These establish the narrative and biographical context of a case.

+

When to uncheck: if you only want operational events and decisions — not biographical background. Unchecking substantially reduces event count in case notes that mix history with current proceedings. Useful when you're building a deadline tracker or action list rather than a full chronology.

+
+
+ + +
+
+ 5 +

Date types

+
+
+

Default: ON (checked). When checked, relative references (“tre uker etter vedtaket”), recurring patterns (“each Monday”, “every 6 months”), and conditional dates (“if no response within 14 days”) are included alongside absolute dates.

+

When to uncheck: if you need only exact calendar dates — for example when exporting to a calendar app, a deadline tracker, or a court submission that requires hard dates only. Unchecking removes all events without a resolvable absolute date.

+
+
+ + +
+
+ 6 +

Upload files

+
+
+ Timeline form showing engine selection, advanced settings panel, and file upload zone +
+
+

Drag files onto the upload zone or click browse. A file list appears below with a Clear button to remove files.

+

Supported formats: PDF, DOCX, TXT. Up to 5 files per run.

+

Files are extracted to text in memory. Nothing is written to disk. Nothing is retained after the session ends.

+

Upload and pasted text can be combined — the AI reads all sources together as a single input. If a case spans multiple documents, upload them all and let the tool assemble one unified timeline.

+
+
+ + +
+
+ 7 +

Pasted text & context notes

+
+
+

Paste up to 128,000 characters of text into the main text area — approximately 90–100 pages of A4. This can include case notes, decision letters, correspondence, or any document containing dates.

+

Context notes (optional, up to 2,000 characters): use this field to guide the AI on ambiguities in your document. These notes are passed directly into the extraction prompt and are not stored. Good examples:

+
    +
  • “All dates are in 2024 unless stated otherwise.”
  • +
  • “D refers to the defendant, M is the mother, BV is Barnevernet.”
  • +
  • “The document is a summary of events, not in chronological order.”
  • +
  • “'Vedtaket' always refers to the omsorgsovertakelse decision of 12.03.2024.”
  • +
  • “Focus on the father's actions. Ignore events relating to the sister.”
  • +
+
+
+ + +
+
+ 8 +

Reading the timeline

+
+
+ Timeline output showing date cards with ABSOLUTE badge, HIGH confidence, actor names, event descriptions, and source excerpts +
+
+

Each event card in the timeline contains:

+
    +
  • Date: the resolved date. Absolute events show a formatted date (e.g. 2025-04-09). Relative events show the expressed reference (e.g. “three weeks after the decision”). Periods show start–end.
  • +
  • Date type badge: one of ABSOLUTE / RELATIVE / RECURRING / CONDITIONAL / PERIOD. Tells you how the date was expressed in the source.
  • +
  • Confidence badge: HIGH (green — clearly stated), MEDIUM (amber — inferred), LOW (grey — ambiguous). LOW events appear greyed out when "Show all" is selected.
  • +
  • Actor: the person, institution, or body the event is attributed to (named or by role).
  • +
  • Event description: a concise one-sentence summary of what happened on that date.
  • +
  • Source excerpt: the exact text from your document that produced this event.
  • +
+

Sorting: use the sort toggle above the timeline to switch between Document order (the order events appear in your source) and Chronological (oldest to newest).

+

Search: type any keyword to filter events. The search matches against date, actor, description, and source excerpt simultaneously.

+
+
+ Detailed timeline events with Barnevernet social workers Judith and Trude, meetings in April and May 2025 +
+
+ + +
+
+ 9 +

Evidence trail, uncertainty & next step

+
+
+ Evidence Trail section with three source documents listed, What Remains Uncertain bullet list, and Next Practical Step recommendation +
+
+

Three sub-sections appear below every timeline:

+
    +
  • Evidence Trail: lists every source document (or paste) that contributed events, with a title and excerpt identifying the source. Use this to verify that all your documents were processed and to trace any event back to its origin.
  • +
  • What Remains Uncertain: a bulleted list of dates the AI could not fully resolve — undated events, events with ambiguous years, relative dates with no resolvable anchor. This is what you still need to verify or obtain manually.
  • +
  • Next Practical Step: a single AI-generated recommended action based on the overall timeline — for example: “Verify whether the 6-week appeal window from the 12.03.2024 omsorgsovertakelse has elapsed and document any missed deadline formally.”
  • +
+

The disclaimer at the bottom confirms that Timeline provides preparation support, not legal advice.

+
+
+ + +
+
+ 10 +

Tips & gotchas

+
+
+
Use context notes for abbreviations. If your document uses internal abbreviations (D, M, BV, BH, the father, the case worker) consistently, naming them in the context notes dramatically improves actor attribution across all events.
+
Combine upload and paste for best coverage. Upload the main decision letter and paste related case notes into the text area. The AI reads all sources together and produces one unified timeline.
+
Run All events first, then re-run with focus. Start with the default "All events" mode to see the full picture. Then re-run with a specific focus mode (e.g. Legal deadlines) if you need a filtered view for a submission.
+
Date types off for clean deadline lists. If you're exporting to a calendar or deadline tracker, uncheck "Date types" to return only resolved calendar dates — no relative or recurring entries to sort through.
+
GPU engine for maximum privacy. The cuttlefish engine processes entirely locally using dbn-legal-agent — nothing leaves your network. Use it for the most sensitive case material.
+
LOW confidence isn't wrong — it's uncertain. A LOW confidence event may still be correct and important. Read the source excerpt for each LOW event before dismissing it — the AI may have found a real date that was just expressed ambiguously.
+
+
+ +
+ + +
+

Ready to try it?

+

Free for Do Better Norge members.

+ +
+ + + + + diff --git a/timeline-tech.php b/timeline-tech.php new file mode 100644 index 0000000..5694205 --- /dev/null +++ b/timeline-tech.php @@ -0,0 +1,419 @@ + + + + + + + How Timeline works — 3-pass extraction, Norwegian date recognition, fine-tuned LLM + + + + + + + + + + + + + +
+ + + + + + Legal Tools + +
+ + + Open Timeline → + + Sign in + +
+
+ + + + +
+
+

Technical Showcase · How the AI reads time

+

How Timeline knows when things happened.

+

A full walkthrough of the 3-pass extraction pipeline, Norwegian date format recognition, event classification schema, multi-engine architecture, and the fine-tuned dbn-legal-agent model.

+ +
+
+ 12+ + date formats +
+
+ 5 + event types +
+
+ 3 + pipeline passes +
+
+ 3 + engine options +
+
+
+
+ + +
+

Architecture

+

Three passes. Each with a distinct job.

+

The pipeline is intentionally sequential — Pass 1 is rule-based and near-instant; Pass 2 is the LLM extraction; Pass 3 post-processes and scores the output.

+ +
+
+ Pass 1 · PHP / regex +

Detect & normalise known formats

+

A deterministic pattern-matching pass runs before any LLM call. It scans the full input for dates matching 12+ Norwegian formats and normalises them to ISO 8601:

+
    +
  • dd.mm.yyyyYYYY-MM-DD
  • +
  • d. månedsnavn yyyy → resolved calendar date
  • +
  • Diary-format lines (starting with a date + colon) → auto-tagged as events
  • +
  • Two-digit years → always interpreted as 20YY
  • +
+

Normalised anchors are injected into the LLM prompt to reduce hallucinated or misread dates.

+
+ +
+ Pass 2 · gpt-4o-mini / gpt-4o / dbn-legal-agent +

Extract, classify & score

+

The LLM reads the full document alongside the pre-pass anchors. For every temporal reference it returns a structured JSON event object:

+
    +
  • date — resolved ISO date, or verbatim string if unresolvable
  • +
  • date_typeabsolute | relative | recurring | conditional | period
  • +
  • confidencehigh | medium | low
  • +
  • actor — attributed entity (from source text, not inferred)
  • +
  • description — one-sentence event summary
  • +
  • source_excerpt — verbatim text fragment (max 200 chars)
  • +
+

The prompt explicitly instructs the model not to invent dates or actors not present in the source. Temperature is set to 0.1 for deterministic output.

+
+ +
+ Pass 3 · PHP post-processor +

Filter, sort & assemble

+

PHP applies all active filters before returning the result:

+
    +
  • Focus filter — strips events not matching the requested focus mode (deadlines / hearings / CPS)
  • +
  • Confidence filter — removes LOW-confidence events if requested
  • +
  • Background filter — strips background/narrative events if unchecked
  • +
  • Date-type filter — strips relative/recurring events if unchecked
  • +
+

The post-processor then assembles the what_remains_uncertain list and the next_practical_step recommendation.

+
+
+
+ + +
+
+

Date recognition

+

12+ Norwegian date formats, all recognised.

+

Norwegian legal documents use a wide variety of date notations. The Pass 1 pre-pass recognises all of these deterministically; the LLM handles the rest in Pass 2.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FormatExampleNotes
dd.mm.yyyy30.07.2015Standard Norwegian numeric
dd.mm.yy09.04.25Two-digit year → always 20YY
d. månedsnavn yyyy3. mars 2024Written month in bokmål/nynorsk
d. månedsnavn15. januarYear inferred by proximity scanning
yyyy-mm-dd2024-03-12ISO 8601
månedsnavn yyyymars 2024Month + year only
yyyy2024Year-only reference
Season + yearhøsten 2023Seasonal reference → Q3/Q4
Diary-format line18.09.2025: Møte avholdtDate + colon → auto-tagged as event
Relative referencetre uker etter vedtaketAnchored to nearest resolved event
Recurring patternhver mandagClassified as recurring
Period / rangefra mars til juni 2024Yields start_date + end_date
+
+
+ + +
+

Classification schema

+

Five event types. Three confidence levels.

+ +

date_type values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
date_typeDefinitionExample
absoluteA specific, resolvable calendar date30.07.2015 → 2015-07-30
relativeA date expressed relative to another eventtre uker etter vedtaket
recurringA pattern that repeats on a scheduleeach Monday, every 6 months
conditionalA date contingent on a condition being metif no response within 14 days
periodA date range or duration with start and endfra mars til juni 2024
+ +

confidence levels

+ + + + + + + + + + + + + + + + + + + + + + + + + +
confidenceMeaningVisual in timeline
highDate is explicitly and unambiguously stated in the source textGreen badge
mediumDate is inferred, approximate, or stated with slight ambiguityAmber badge
lowDate is implied, undated, or extracted from a degraded/ambiguous passageGrey badge
+ +

Actor attribution rules

+ + + + + + + + + + + + + + + + + + + + + + + + + +
RuleExample
Named entity in the same sentence“Trude [saksbehandler] ringte 14. mars” → actor: Trude
Role label without a name“Barnevernet fattet vedtak” → actor: Barnevernet
No clear attribution in sentenceactor: [unattributed]
Document-level defaultIf no per-event actor, defaults to the document sender/issuing body
+
+ + +
+
+

Engines

+

Three engines, one structured output.

+

All engines return the same JSON schema — the post-processor handles all three identically. Engine choice affects speed, quality, and privacy only.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EngineModelLatencyBest for
Azure gpt-4o-mini ★gpt-4o-mini (Azure West Europe)~15 sDefault. Fast, cost-efficient, handles most legal documents well.
Azure gpt-4ogpt-4o (Azure West Europe)~45 sComplex documents, overlapping events, poor-quality or dense source text.
GPU / cuttlefishdbn-legal-agent via LiteLLM proxy~25 sMaximum privacy. Entirely local. Fine-tuned on Norwegian legal corpus.
+
+
+ + +
+

Fine-tuned model

+

dbn-legal-agent: trained on Norwegian legal text.

+ +
+ QLoRA fine-tune +

dbn-legal-agent

+

A QLoRA (Quantized Low-Rank Adaptation) fine-tune trained on Norwegian child-welfare and administrative law text — case notes, court decisions, Barnevernet correspondence, Fylkesnemnda decisions, and Statsforvalter rulings. The model has internalised the temporal patterns of Norwegian legal proceedings: the procedural sequence of an omsorgsovertakelse, the typical timeline of a tiltaksplan review cycle, what akutt means as a temporal signal, how Fylkesnemnda milestones are ordered.

+

In the Timeline GPU engine, dbn-legal-agent runs as the primary extraction model via the LiteLLM proxy on cuttlefish. The structured JSON output schema is identical to the Azure engines — the same post-processing pipeline applies regardless of which engine produced the extraction. No Azure API calls are made when the GPU engine is selected.

+
+ QLoRA + Norwegian legal corpus + case notes + court decisions + Barnevernet + Fylkesnemnda + LiteLLM proxy +
+
+
+ + +
+
+

Privacy & security

+

Your documents never leave your session.

+ +
+

Privacy by design

+
    +
  • All uploaded files are extracted to text in memory using PHP's in-process file handlers. The raw binary is never written to disk on the server.
  • +
  • Session context (pasted text, uploaded content, extracted timeline events) is scoped to your authenticated session and discarded when the session ends.
  • +
  • Azure OpenAI (gpt-4o, gpt-4o-mini) is configured on the West Europe region. Data processed via Azure OpenAI is not used for model training under the default enterprise agreement.
  • +
  • The GPU/cuttlefish engine processes entirely locally — no data leaves your network. The LiteLLM proxy on cuttlefish receives your document text and returns structured JSON; nothing is forwarded to an external API.
  • +
  • Telemetry logged: tool name, engine, focus mode, event count, latency. No document text, case references, actor names, or extracted events are logged.
  • +
+
+
+
+ + +
+

See it work on your case.

+

Free for Do Better Norge members. All engines available to every member.

+ +
+ + + + + diff --git a/timeline.php b/timeline.php index 0b3f802..54c6abb 100644 --- a/timeline.php +++ b/timeline.php @@ -15,6 +15,14 @@ require_once __DIR__ . '/includes/layout.php';
+ +
Engine