Skip to content

Background: NM i AI Competition Learnings

This section documents learnings from NM i AI 2026 (Norway's National AI Championship) that influenced the design of this bot. These are historical notes, not part of the current architecture.

Key Takeaways Applied

Learning How It Shaped the Bot
LLM agent with function-calling beats hardcoded handlers Bot uses LLM to decide which API calls to make
Pre-fetch common data during LLM call Bot caches learned patterns in Postgres
Auto-fix API errors between turns Bot retries with corrections on 422s
Cheap models are good enough for routine tasks Gemini Flash primary, not Opus/Sonnet
System prompt rules are simpler than a rules engine Company rules live in the system prompt

Tripletex Notes (Future Reference)

If Tripletex integration is ever needed:

  • Use /incomingInvoice?sendTo=ledger instead of /supplierInvoice
  • Skip the salary API (always fails), use manual vouchers
  • Don't use the bank reconciliation endpoint, register payments individually
  • Hardcode VAT type IDs (they are stable across sandboxes)
  • Strip known-bad fields (amountCurrency, voucherDate, isCustomer, isSupplier)

These learnings come from studying 22 teams' implementations during the competition.