All articles
AI and Law Kyriaki Bongard

Building a Traceable Citation Graph for Swiss Statutory Law

Building a Traceable Citation Graph for Swiss Statutory Law

The Systematische Rechtssammlung (SR) at admin.ch is a flat list of statutes. It is an excellent source for the current text of a provision. It is not a source for understanding how that provision connects to other provisions, how it has been interpreted by the Federal Tribunal, or how it sits within the broader structure of Swiss law. For that, practitioners have historically relied on legal commentaries, institutional knowledge, and experience-accumulated mental maps of how Swiss law fits together.

At Silex Legal, we have been working on a different approach: building a structured citation graph that maps the connections between statutory provisions, Federal Tribunal decisions, and cantonal precedent. This piece describes the problem we are solving, the technical choices we made, and where the limits of the current implementation are.

Why the Flat List is Insufficient

Swiss civil law is built around cross-references. The OR (SR 220) cross-references the ZGB (SR 210) extensively for foundational principles. Individual OR contract-type provisions (sale, work, services, lease) cross-reference the general provisions of obligation. The ZPO (SR 272) cross-references the BGG (SR 173.110) for appeal conditions. The SchKG (SR 281.1) cross-references the ZGB for property law principles.

A practitioner researching Art. 97 OR (non-performance liability) needs to understand that this provision operates within the general structure of obligations (Art. 1-40 OR), that it cross-references Art. 99 OR for degree of fault, and that Art. 99 Abs. 2 OR directs you to the ZGB rules on legal capacity when the debtor's capacity is in question. None of this structural context is visible in the flat SR text for Art. 97 OR. A researcher reading that provision in isolation may miss the full legal context.

The citation graph solves this by making connections explicit and machine-readable. An Art. 97 OR node in the graph has edges to: (a) provisions it expressly cross-references; (b) provisions that expressly cross-reference it; (c) BGE decisions that cite it as the primary provision; (d) BGE decisions that cite it alongside other provisions (compound citations); (e) cantonal decisions indexed under it. The graph is the context that the flat SR text cannot provide.

The Technical Construction Problem

Building a citation graph from legal text is a parsing problem before it is a reasoning problem. The citation strings in Swiss legal text are structured but not always consistent. A BGE decision may cite Art. 97 OR, or it may cite Art. 97 Abs. 1 OR, or it may refer to die Bestimmungen des OR uber Vertragsverletzungen without a specific article number. A complete citation graph must handle all these forms.

For statutory cross-references within the SR, the citation parsing is relatively well-defined. Swiss statutory drafting conventions use consistent abbreviation patterns (Art. X Abs. Y OR, Art. X lit. a ZGB), and the SR text at admin.ch is machine-readable HTML. We can extract cross-references from the SR with reasonable precision.

For BGE decisions at bger.ch, the parsing is more complex. BGE decisions are long-form legal text with citations embedded in reasoning sections. The citation density varies: some decisions cite 3-5 provisions; others cite 30 or more. Citation forms vary: the same provision may be cited in full form, abbreviated form, or by reference to a prior Erwagung in the same decision that established the citation. Parsing this reliably requires a combination of pattern matching and contextual inference.

For cantonal court decisions, the parsing challenge is compounded by format variation. PDF decisions require optical character recognition before text extraction. HTML summaries may omit provision citations that appear in the full decision. Our cantonal citation coverage is therefore shallower than our federal citation coverage, which reflects the underlying data quality rather than a choice we made about what to prioritize.

The Temporal Versioning Problem

Swiss statutes are amended. When an amendment renumbers provisions, the citation graph must track which decision cited which version of which provision. A BGE decision from 2005 that cites Art. 321e OR may be citing a provision that no longer exists under that number after a subsequent OR revision. If the graph treats all Art. 321e OR citations as pointing to the current provision at that number, it may map decisions to provisions they never actually addressed.

This is a version alignment problem: every edge in the citation graph that connects a decision to a provision needs a version timestamp indicating which statutory version was in force at the time of the decision. Without this, the graph conflates citations to different versions of the same provision, or incorrectly maps citations to provisions that were renumbered.

We handle this by maintaining version history for each SR provision with amendment dates, and by tagging edges in the citation graph with the version in force at the decision date. This is expensive to maintain but necessary for research accuracy. A citation graph that silently conflates statutory versions is worse than no citation graph, because it creates confident-looking incorrect connections.

What the Graph Surface Looks Like for Research

For a practitioner using Silex Legal, the citation graph is not exposed as a network diagram. It is the infrastructure behind a research query response. When a practitioner asks about Art. 97 OR, the query resolves against the graph to identify: the current version of Art. 97 OR, its explicit statutory cross-references, the BGE decisions where it appears as a primary citation, and a selection of cantonal decisions where cantonal coverage exists.

The graph structure means that a query about Art. 97 OR also surfaces relevant decisions that cite Art. 97 OR alongside Art. 99 OR and Art. 107 OR together, because the compound citation cluster is itself a meaningful research signal. A cluster of decisions that always cite these three provisions together indicates that practitioners and courts treat them as a functional unit for non-performance analysis, which is doctrinal information that the flat SR text does not contain.

We are not saying the citation graph makes legal research judgment-free. The practitioner still needs to evaluate which of the surfaced decisions are relevant to their specific fact pattern, and the graph can surface decisions that mention a provision in a context entirely different from the practitioner's question. The graph's contribution is to make the set of potentially relevant materials richer and more complete than a keyword search would produce, while keeping source links attached to every element so the practitioner can evaluate them directly.

What We Have Learned About Graph Coverage and Quality

The main lesson from building this over the past year is that coverage quality is more important than coverage quantity. A citation graph that indexes all BGE volumes from 100 to the present, but indexes them imprecisely (missing some citation forms, conflating version timestamps), is less useful than a graph that covers BGE volumes 130 to the present with high parsing precision.

We chose the quality-first path: our BGE coverage goes back to approximately 2000 (Volume 126), with high-confidence citation extraction for the common citation forms. Pre-2000 BGE decisions are in the database but with lower citation extraction confidence, and we note that limitation in results. For cantonal decisions, we surface the canton-specific coverage confidence level with every result, as described in our earlier post on cantonal precedent aggregation.

The citation graph is a living infrastructure, not a project with a completion date. Each new BGE decision is a new node and a set of new edges. Each SR amendment requires version-tracking updates. The operational commitment is ongoing, which is the honest description of what building a useful legal citation infrastructure actually requires.

Trace citations in Swiss law without the manual search.

Silex Legal indexes federal statutes, Federal Tribunal decisions, and cantonal precedent with traceable source links. Every answer comes with a citation you can verify.

Start free

More from the blog

Why AI-Assisted Legal Research Accuracy Requires Source Traceability
AI and Law

Why AI-Assisted Legal Research Accuracy Requires Source Traceability

Understanding BGer References: Swiss Federal Tribunal Citations Explained
Citation Mechanics

Understanding BGer References: Swiss Federal Tribunal Citations Explained

The Challenge of Cantonal Precedent Aggregation in Swiss Legal Research
Research Method

The Challenge of Cantonal Precedent Aggregation in Swiss Legal Research