Skip to manual
gluon

Administration

Read Dutch laws per article

Turn on the nl-legal structure profile for a Source so laws are cut per article and lid, kept as article objects with their references and amendments, and read article first when a question names one.

Ontology owner and platform administrator

Dutch laws and regulations have a fixed shape: hoofdstuk, artikel, lid. With the nl-legal structure profile, Gluon reads a law that way. It cuts the text per article and lid instead of per page. It keeps every article as an object you can open and cite. It links each article to the articles it refers to and the ones it amends. A question that names an article ("artikel 6, tweede lid, van de Handelsregisterwet 2007") then reads that article first, and an answer cites "art. 6 lid 2" instead of a page.

You set this up once per Source, as an ontology owner in the designer. Employees then simply ask.

Before you start

  • The law types in your package. Copy the law domain from examples/wetten/domains/law into your package. It declares law.Law and law.Article, and the links ArticleOfLaw, RefersTo and Amends. The property names are what the ingest writes; keep them as they are.
  • A policy that lets readers read them. The law types are read like any other type: a reader needs a policy that allows law.Article and law.Law (see Policies and segments). An article never reads wider than its document: it carries the document's markings and access list.
  • A Source of documents. This is either a files Source you fill yourself (see Sources) or a connector Source a producer fills.

Turn on the profile

In the designer, open the Source and add one line to its spec:

GOL · YAML
kind: Source
metadata: { name: wetten, title: Wetten en besluiten }
spec:
  connector: "gluon:files@1"
  trust: authoritative
  acl: ignore
  pii: { scan: true, masker: default, onDetect: mask }
  chunking: { structure: nl-legal }
  ai: { prompt: "Noem bij elk antwoord het artikel en lid en de wet." }

nl-legal is the only profile so far. The ai.prompt line is optional; it is added to every answer that reads this Source, and never replaces Gluon's own rules. Propose, review and deploy the change as usual (see Proposals).

Documents ingested before the change keep their old chunks. Upload them again (Replace on the file) to read them with the profile.

Add the laws

Upload the law texts to the Source: PDF, Word, text or Markdown, one law per file. The texts from wetten.overheid.nl and the Staatsblad work as they are. Each file goes through Gluon Ingest:

  • Chunks per article. Boek, deel, hoofdstuk, titel, afdeling, paragraaf and artikel become section levels. This also works when an article heading is only bold text. A chunk never crosses an article, and a lid starts a new chunk when it fits in one. Each chunk carries the law, the article and the lid.
  • One law.Law and one law.Article per article. Each object has the law, the number, its leden, the chapter path, the text (masked as the chunks are), the document and where in the document it stands.
  • Links found in the text. A reference ("bedoeld in artikel 5", "de artikelen 15, 31 en 35", "het eerste lid", "van deze wet") becomes refersTo. A line that changes a law ("komt te luiden", "vervalt", "wordt ingevoegd", "wordt als volgt gewijzigd") becomes amends. A reference resolves within the same law first, then by law title among the laws already in the same Source. A reference that resolves to nothing, such as a law not in the Source or an undefined "de wet", stays as text in unresolvedRefs, and no link is guessed.

Open Admin › Documents and pick the Source to check the result. In the inspector, the chunks follow the articles on the page (see the document inspector).

Ask about a law

Employees ask in chat as usual, with the Source's collection picked in the scope or not:

  • Name an article ("Wat zegt artikel 6, tweede lid, van de Handelsregisterwet?"). That article is read first, its named lid first of all, and then the search fills the rest.
  • Whole articles. A passage found by the search widens to its whole article (up to 6,000 characters, three articles per answer), so the answer reads the lid in its context.
  • References. The planner can follow refersTo and amends one step through the article tool, so a question about an article can bring in the article it points to.
  • Citations name the article, and Explain shows which articles were read.

To see what a question would retrieve for a given person, use the retrieval playground: the named article comes first.

Good to know

  • The grammar is Dutch. Laws in other languages are chunked by their headings until a profile for them exists.
  • A law ingested later does not fill in the references made to it earlier: upload the citing law again to resolve them.
  • A second copy of the same law in a Source leaves the articles to the first document. The second copy's chunks are still searchable.
  • refersTo and amends are not yet drawn in lineage or on the canvas.