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 + +
+ Events · Deadlines · Milestones
+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.
+ +What you get
+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.
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.
+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
+Three steps from raw case documents to a complete, sortable timeline.
+ +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.”
+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
+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
+
+ The form: choose engine, focus filter, confidence, background events, and date type settings.
+
+ Timeline output: each event shows date, type badge, confidence badge, actor, description, and source excerpt.
+
+ Detailed events from a Barnevernet case, with named actors and verified source excerpts.
+
+ Evidence Trail, What Remains Uncertain, and Next Practical Step appear below every timeline.
+Under the hood
+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.
+Focus filters
+Four modes scope the extraction pipeline to the events that matter most for your situation.
+Default. Extracts every temporal reference in the document — background dates, operational events, deadlines, and narrative context. Best for building a complete picture from scratch.
+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.
+Focuses on tribunal sessions, mediation dates, and court appearances. Ideal for preparing for a hearing or reconstructing the full history of proceedings.
+Targets Barnevernet interventions, akuttplassering dates, tiltaksplan milestones, and Fylkesnemnda proceedings. The most targeted mode for child welfare cases.
+Free for Do Better Norge members. No credit card required.
+ +
+ User Guide · 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.
+In this guide
+ +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.
+| Engine | +Speed | +Best for | +
|---|---|---|
| Azure gpt-4o-mini ★ | +Fast (~15 s) | +Default. Everyday extractions, long documents, first pass. | +
| Azure gpt-4o | +Best quality (~45 s) | +Complex documents, overlapping events, ambiguous or poorly formatted source text. | +
| GPU / cuttlefish | +Local (~25 s) | +Maximum privacy. Runs entirely on local GPU with dbn-legal-agent fine-tuned model. Requires cuttlefish server online. | +
The focus filter scopes what kinds of events the AI looks for. Found in the Advanced settings panel (click to expand).
+| Mode | +What it extracts | +When to use | +
|---|---|---|
| All events ★ | +Every temporal reference in the document — background, operational, deadlines, narrative | +Building a complete chronology from scratch | +
| Legal deadlines | +Filing deadlines, appeal windows, statutory time limits | +Checking whether you've missed a deadline or when you must act next | +
| Court hearings | +Tribunal sessions, mediation dates, court appearances | +Preparing for a hearing or reconstructing hearing history | +
| CPS milestones | +Barnevernet interventions, akuttplassering, tiltaksplan milestones, Fylkesnemnda proceedings | +Child welfare cases needing a CPS-specific chronology | +
Controls whether uncertain events appear in the output. Also in the Advanced settings panel.
+| Setting | +What 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-confidence | +Suppresses 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.
+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.
+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.
+
+ 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.
+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:
+
+ Each event card in the timeline contains:
+ABSOLUTE / RELATIVE / RECURRING / CONDITIONAL / PERIOD. Tells you how the date was expressed in the source.HIGH (green — clearly stated), MEDIUM (amber — inferred), LOW (grey — ambiguous). LOW events appear greyed out when "Show all" is selected.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.
+
+
+ Three sub-sections appear below every timeline:
+The disclaimer at the bottom confirms that Timeline provides preparation support, not legal advice.
+Free for Do Better Norge members.
+ +
+ Technical Showcase · How the AI reads time
+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.
+ +Architecture
+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.
+ +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.yyyy → YYYY-MM-DDd. månedsnavn yyyy → resolved calendar date20YYNormalised anchors are injected into the LLM prompt to reduce hallucinated or misread dates.
+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 unresolvabledate_type — absolute | relative | recurring | conditional | periodconfidence — high | medium | lowactor — attributed entity (from source text, not inferred)description — one-sentence event summarysource_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.
+PHP applies all active filters before returning the result:
+The post-processor then assembles the what_remains_uncertain list and the next_practical_step recommendation.
Date recognition
+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.
+ +| Format | +Example | +Notes | +
|---|---|---|
dd.mm.yyyy |
+ 30.07.2015 | +Standard Norwegian numeric | +
dd.mm.yy |
+ 09.04.25 | +Two-digit year → always 20YY | +
d. månedsnavn yyyy |
+ 3. mars 2024 | +Written month in bokmål/nynorsk | +
d. månedsnavn |
+ 15. januar | +Year inferred by proximity scanning | +
yyyy-mm-dd |
+ 2024-03-12 | +ISO 8601 | +
månedsnavn yyyy |
+ mars 2024 | +Month + year only | +
yyyy |
+ 2024 | +Year-only reference | +
| Season + year | +høsten 2023 | +Seasonal reference → Q3/Q4 | +
| Diary-format line | +18.09.2025: Møte avholdt | +Date + colon → auto-tagged as event | +
| Relative reference | +tre uker etter vedtaket | +Anchored to nearest resolved event | +
| Recurring pattern | +hver mandag | +Classified as recurring |
+
| Period / range | +fra mars til juni 2024 | +Yields start_date + end_date |
+
Classification schema
+| date_type | +Definition | +Example | +
|---|---|---|
absolute |
+ A specific, resolvable calendar date | +30.07.2015 → 2015-07-30 | +
relative |
+ A date expressed relative to another event | +tre uker etter vedtaket | +
recurring |
+ A pattern that repeats on a schedule | +each Monday, every 6 months | +
conditional |
+ A date contingent on a condition being met | +if no response within 14 days | +
period |
+ A date range or duration with start and end | +fra mars til juni 2024 | +
| confidence | +Meaning | +Visual in timeline | +
|---|---|---|
high |
+ Date is explicitly and unambiguously stated in the source text | +Green badge | +
medium |
+ Date is inferred, approximate, or stated with slight ambiguity | +Amber badge | +
low |
+ Date is implied, undated, or extracted from a degraded/ambiguous passage | +Grey badge | +
| Rule | +Example | +
|---|---|
| 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 sentence | +actor: [unattributed] |
+
| Document-level default | +If no per-event actor, defaults to the document sender/issuing body | +
Engines
+All engines return the same JSON schema — the post-processor handles all three identically. Engine choice affects speed, quality, and privacy only.
+ +| Engine | +Model | +Latency | +Best for | +
|---|---|---|---|
| Azure gpt-4o-mini ★ | +gpt-4o-mini (Azure West Europe) |
+ ~15 s | +Default. Fast, cost-efficient, handles most legal documents well. | +
| Azure gpt-4o | +gpt-4o (Azure West Europe) |
+ ~45 s | +Complex documents, overlapping events, poor-quality or dense source text. | +
| GPU / cuttlefish | +dbn-legal-agent via LiteLLM proxy |
+ ~25 s | +Maximum privacy. Entirely local. Fine-tuned on Norwegian legal corpus. | +
Fine-tuned model
+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.
+Privacy & security
+Privacy by design
+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.Free for Do Better Norge members. All engines available to every member.
+ +