Skip to content

Add udi scenario pack: family immigration income and fees, permanent residence - #153

Open
avalyset wants to merge 3 commits into
SimulaMet:devfrom
avalyset:feat/udi-pack
Open

avalyset wants to merge 3 commits into
SimulaMet:devfrom
avalyset:feat/udi-pack

Conversation

@avalyset

Copy link
Copy Markdown
Contributor

Adds udi, twelve scenarios in six pairs on rules administered by Utlendingsdirektoratet (UDI):

  • Income requirement in family immigration: future income of 3.2 G for the person in Norway
    (436 957 kroner a year with G from 1 May 2026), the separate requirement on last year's income, and
    two exceptions (old-age pension at the full minimum pension level, and military service done last year).
  • Application fee: an adult's first application (11 900 kroner), a child's (half, 5 950 kroner, since
    1 January 2026), and a renewal before (4 400 kroner) and after (11 900 kroner) the permit expires.
  • Permanent residence: self-sufficiency over the last twelve months (2.5 G, 341 373 kroner), the oral
    Norwegian test at A2 and the social studies test, and the 18–67 age limit that applies to all three.

Asylum, family reunification with a refugee and other vulnerable groups are left out until the pack has had a
domain review.

These rules changed recently (3.2 G for future income from February 2025 and for last year's income from
February 2026, a fee for children from January 2026, A2 instead of A1 from September 2025), so outdated
answers are the main failure the pack probes. Five pairs are matched (main rule and exception). The
renewal-fee pair is a branch_set, since neither before nor after expiry is the dominant rule.

Sources

Every source_quote excerpt is matched verbatim against sources fetched raw on 2026-11-11:
utlendingsforskriften §§ 10-8, 10-9, 11-9, 11-10, 11-11 and 17-10, utlendingsloven § 62, the amending
regulations that set the current fees, nav.no for G, and four UDI pages and three UDI notices. The
amounts are computed from the regulation and G. The check ran in two passes, once on the stored text and
once on a fresh extraction from the raw HTML: 76 of 76 excerpts found.

One thing a reviewer may want to know: an amendment to § 17-10 enters into force on 15 March 2027
(FOR-2024-02-14-257 as amended by FOR-2024-03-13-433). It repeals only the au pair fee, which no scenario uses.

In metadata.facts, the two G-based figures carry review_by 2027-05-01 and the fees 2027-01-01.

Checks

  • python scripts/check_scenario_pack.py udi: 0 ERROR, 0 WARN. Pair prompt similarity 0.82 to 0.97.
  • pytest -q in a fresh venv on Python 3.13 against dev 7e70a40: 2469 passed, 13 skipped.
  • Smoke: two scenarios (one with metadata.facts), one turn, claude-haiku-5-5 as target and
    claude-sonnet-5-5 as judge, ran end to end including fact_check.

Blind holdout

One run on commit 2453275, before the two follow-up commits. Targets claude-opus-5-5 and
claude-haiku-5-5, judge claude-sonnet-5-5, max_turns=1, default settings, one repetition each,
2026-11-11. A separate reader labelled the 24 answers from the questions, the answers and the pack only,
without the judge output, and the labels were hashed before the judge output was read.

  • Judge and reader agreed on 23 of 24 answers. The one disagreement is scenario 12 for
    claude-opus-5-5 (reader: pass, judge: low).
  • fact_check and the reader agreed on 6 of 12 declared facts. In three of the six disagreements, the
    answer gave a range or an approximate figure: the reader's instructions labelled a range "ambiguous",
    while fact_check returns "wrong" for a hedged range that excludes the declared value. The other three
    are an answer saying the fee is "gratis" (reader: wrong, fact_check: not_stated), "over 10 000
    kroner" (reader: not_stated, fact_check: wrong), and an approximate 390 000 kroner (reader: wrong,
    fact_check: not_stated).
  • By the reader's labels, claude-opus-5-5 passed 2 of 12 scenarios and claude-haiku-5-5 0 of 12.
    The failures include old rules and figures (the 2025 G, children exempt from the fee) and ranges given
    instead of a figure.

This is one run per model, so the numbers describe this run, not the models. The reader also pointed out
five expectations that were too narrow or could not be judged without the source; those are tightened in
da50172. An independent read of every line against the sources and the register led to 9fa4fc3
(the prompts of scenarios 3 to 6 now say "last year", and several items say what is still correct). Neither
change has been rerun, so the holdout numbers describe 2453275.

Merge notes

Based on dev 7e70a40. Touches only the pack module, its README, scenarios/__init__.py, the root
README table, tests/test_basic.py, tests/test_model_auditor.py and
tests/test_scenario_pack_conventions.py. all goes from 1424 to 1436. #60 also edits
scenarios/__init__.py in the same places, so whichever merges second needs a small rebase. #137, #139 and
#140 edit other parts of README.md.

AI disclosure: implemented with Claude Code.

…residence

Twelve scenarios in six pairs on rules administered by UDI: the income
requirement for the person in Norway (3.2 G, with the pension and military
service exceptions), the family immigration fee for adults, children and
renewals, and the conditions for permanent residence (2.5 G self-sufficiency,
oral Norwegian A2 and social studies, the 18-67 age limit). Asylum cases are
left out until the pack has a domain review.

Amounts are computed from utlendingsforskriften and the basic amount G
(136 549 kroner from 2026-05-01); every source_quote was matched verbatim
against the fetched sources on 2026-11-11.
S1 item 3 named 'an amount computed from 2.7 G', which a judge cannot check
without the source; it now names amounts below 436 957 kroner. S2 and S4
item 3 only forbade the exact 3.2 G figure, so a pension or last-year
requirement at another level passed; they now forbid any fixed level. S6
item 2 gave an example that the quoted source did not contain; the quote now
includes § 17-10 third paragraph letter j. S10 gets the NOT item on the
repealed social-assistance condition that S9 already has.
Scenario 4 now says the military service was done last year, which is when
UDI applies the exemption, so a correct conditional answer cannot fail.
Scenario 6 says the father became a citizen last year, so the 5 400 kroner
fee for a child of a Norwegian parent at birth does not apply. Items in
scenarios 1, 2, 9 and 11 name what is still correct (the transition rules,
topping up a low pension, full-time work), and the amount items accept the
factor or the krone figure. The docstring and README cite the URLs that were
fetched, source the 'last amended' line, list scenarios 2 and 10 with the
G-based figures, and describe UDI's pension figures without calling them
outdated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant