# BORG > BORG (Þekkingarborg) is the University of Akureyri's sovereign, vendor-independent AI platform — a knowledge citadel that stores, protects, and serves the institution's knowledge, with AI as the knowledge guardian, not the protagonist. Steward: University of Akureyri (Háskólinn á Akureyri) ## Working with this document You're reading the public architecture digest of BORG, formatted for any LLM. To get a working understanding quickly: 1. Copy this entire file. 2. Paste it into Claude Code (https://claude.com/code) — the same tool the BORG dev team at the University of Akureyri uses every day. 3. Ask Claude what you want to know — feature inventory, deployment shape, RAG layer, knowledge graph, anything documented below. Any other LLM works too (ChatGPT, Gemini, local models). Claude Code is what the team has confidence in because it is the team's daily driver. ## Maintainer Magnús Smárason — AI project lead, BORG — knowledge architecture, AI engineering, public-sector AI strategy at UNAK. - Email: magnussmari@unak.is - Personal site: https://smarason.is ## Positioning — Þekkingarborg Internal framing per the Þekkingar Borg positioning bible v1.1 (2026-05-18). The platform answers what the system *is* — a custodial Icelandic knowledge fortress for UNAK — rather than what its engine *can do*. The metaphor is library / national archive / bishop's seat: preservation, sovereignty, continuity. AI is Þekkingarvörður (knowledge guardian), never the invading force. Name registers: - **Þekkingar Borg** (ceremonial) — Two words, both capitalised. Board slides, signed documents, framed plaques. - **Þekkingarborg** (prose) — One word. Running text on the web, blog, email, README, internal docs. - **BORG** (technical) — Capitalised. Unchanged technical identifier in code, repos, env vars, URL routes. ## Audience - University staff and faculty (primary; rollout spring 2026) - Students (planned for fall 2026) - Researchers and partner institutions interested in a small-university sovereign AI stack ## What it serves ### Academics > "I uploaded my syllabus and got a Bologna Process evaluation in both languages within a minute. It flagged two learning outcomes that didn't align with ECTS level descriptors — I'd missed that for three semesters." Faculty evaluate and improve course syllabi against Bologna quality criteria, get AI-assisted feedback in Icelandic and English, and export formatted documents for filing. Cited responses come from the institution's own AI policy and knowledge graph — not generic answers. Tools: Námskráarrýnir (Syllabus Tool), UNAK-spjall (Institutional + Policy Assistant), Prompt Library, Studio, Verkefnauppfærsla (Assignment Upgrader) ### Administration > "We used to spend a full day classifying and filing documents into GoPro. Now SkjalaBorg classifies them automatically, and I just review and approve." Admin staff file documents with AI-assisted classification across 62 document types via SkjalaBorg. UNAK-spjall answers organisational, IT-systems, and procedural questions by querying both the institutional Knowledge Graph and the IT helpdesk wiki. The admin dashboard tracks AI spending in ISK, edits translations live without redeploy, and monitors infrastructure health. Tools: SkjalaBorg (Document Filing), UNAK-spjall, Admin Dashboard, Knowledge Graph ### Staff > "I needed to transcribe a 45-minute faculty meeting in Icelandic. Borg handled it in under two minutes — and the recording never left the university network." Staff across departments use Icelandic/English Speech-to-Text, audio/video conversion, and institutional AI assistance. Sensitive data can be routed to on-premises inference with zero external egress — a guarantee no commercial AI tool can make. The bilingual interface defaults to Icelandic with English parity. Tools: Speech-to-Text, Media Transformer, UNAK-spjall, Studio ### Students (future) > "I asked UNAK-spjall what prerequisites I needed for the nursing program and it walked me through the full academic path — pulling from the actual course catalog, not a generic answer." Student-facing capabilities are on the roadmap for fall 2026. Nemendaskrárspjall (Student Registry chat) opens to prospective students with no sign-in — admissions, enrolment, and course catalogue questions grounded in the Student Registry. Gervigreindur teaches responsible AI use through Socratic dialogue. Tools: Nemendaskrárspjall (planned), Gervigreindur (AI Literacy Tutor), UNAK-spjall (student mode), Knowledge Graph (public view) ## Principles ### Provider independence Borg is not locked to any AI vendor. The model registry routes requests to Google, Anthropic, OpenAI, or an on-premises GPU workstation depending on the task. Switching providers requires changing a configuration value, not rewriting application code. If a provider doubles its prices, disappears, or gets outperformed tomorrow, the platform adapts without downtime. ### Complementary, not competitive Borg is not a replacement for Microsoft 365 Copilot or other commercial AI tools the university uses. Borg fills the gap commercial platforms cannot: institution-specific knowledge bases, Icelandic-language primacy, on-premises inference for sensitive data, and integration with university systems like GoPro Foris. When a commercial product covers the same ground, that is a win — Borg shifts focus to what only a purpose-built platform can do. ### Icelandic-first, with English parity Icelandic is the primary language; English is a full second language. Both ship simultaneously. The translation layer is database-backed — admins can edit strings without redeploying — and is not a third-party i18n library. ### Production-grade Borg is not a research prototype or a demo. It is a production system used daily, backed by ~2,412 automated tests across 141 files, a 9.75/10 health score from a comprehensive February 2026 security audit, structured error tracking via self-hosted Sentry, and a CI/CD pipeline with pre-commit, pre-push, and deployment gates. ### Privacy-aware by default No third-party analytics on public surfaces. Admin actions are audited. Sensitive data can be routed to on-premises inference with zero external egress. Auth boundary checks happen server-side, never from JWT claims alone. ## Architecture (high level) ### frontend Next.js App Router application with React Server Components, server actions, and a database-backed translation system. Technologies: Next.js 16, React 19, TypeScript, Tailwind CSS, OKLCH design tokens ### api Authenticated API routes wrapped with structured logging, rate limiting, and header sanitisation. Streaming for AI responses. Technologies: Next.js Route Handlers, NextAuth (SSO), Redis-backed rate limits, Server-Sent Events / streaming ### reasoning Model registry that abstracts over multiple AI providers and on-prem inference. Server-side reasoning layer for AIOps, tool-calling, and agentic flows. Technologies: Vercel AI SDK, Anthropic Claude, Google Gemini, OpenAI, Local on-prem inference ### knowledge Retrieval-augmented generation over institutional knowledge bases and a knowledge graph of the university's organisational, academic, and operational entities. Technologies: pgvector embeddings, Neo4j knowledge graph, PostgreSQL knowledge bases, Parameterised Cypher templates ### data Primary relational store with audited migrations, plus a vector extension for embeddings and a separate graph database for entity relationships. Technologies: PostgreSQL 16, pgvector, Prisma ORM, Neo4j 5 ### identity Single sign-on via the university's identity provider. Role-based access checks verified server-side, not from JWT claims. Technologies: NextAuth, Authentik SSO ### observability Self-hosted error tracking, structured database logging, and a server-side AI reasoning layer that triages alerts and matches operational runbooks. Technologies: Sentry (self-hosted), Structured DB logs, AIOps Brain (Claude-based reasoning, token-accurate cost ledger) ## Capabilities - **UNAK-spjall** — Agentic bilingual institutional Q&A and policy consultation. Combines the institutional Knowledge Graph and the IT helpdesk wiki via a 6-tool agentic loop (entity resolution, multi-hop graph traversal, org-structure walks, semantic wiki search). Folded in StefnuSpjall (AI-policy chat) on 2026-04-29. - **Námskráarrýnir (Syllabus Tool)** — Bologna 7-dimension rubric analysis (Dublin Descriptors, EQF 6–8, Bloom, Kennedy, Biggs, ESG 2015, CAVS, UNAK QEF3). Bilingual feedback, DB-persisted history, .docx export. AI quality gate rejects non-syllabus uploads before processing. - **Verkefnauppfærsla (Assignment Upgrader)** — AI-powered assignment redesign for the post-GenAI classroom. Analyses each assignment across 7 academic frameworks (AIAS v2, FACT, Jisc, Stanford HAI, AI-TPACK, authentic assessment, Northeastern), produces a 5-level vulnerability score and 3–5 evidence-based structural recommendations. 120+ translation keys. - **Gervigreindur (AI Literacy Tutor)** — Socratic AI literacy tutor for staff, faculty, and students. Teaches AI concepts (Vélnám, Ofskynjun, Hlutdrægni) and helps craft prompts via the ICCRA framework. Includes a searchBorgSelf RAG tool for questions about the Borg platform itself. Not a general Q&A bot — that role belongs to UNAK-spjall. - **Knowledge Graph (Þekkingarkort HA)** — Institutional knowledge graph with 729 entities and 1,691 relationships across 7 domains (systems, people, organisational structure, academic programs, governance, partnerships, facilities). Public view at /knowledge-graph. The admin copilot constrains all Cypher to parameterised templates with read-only defaults, human-in-the-loop writes, and full audit logging. - **SkjalaBorg (Document Filing)** — AI-assisted document filing into the university's GoPro Foris document management system. Native TypeScript implementation (no separate microservice). 7-gate AI validation pipeline (intake → classification → validation → review → precommit → commit → verification), 62 document types, 24 categories, 3 confidentiality levels, GDPR-compliant audit logging. - **Speech-to-Text (STT)** — Icelandic and English audio transcription via Google Chirp 3. Up to 500 MB uploads or live browser recording. Multi-file queue, waveform preview, audio-transcript sync, IndexedDB-backed 5-day client-side archive. All provider credentials are held server-side. - **Media Transformer** — FFmpeg-based audio/video format conversion (MP3, WAV, FLAC, OGG, MP4, WebM, MKV) with bitrate, sample-rate, and channel controls. Magic-byte file-type validation, SSE-based progress streaming, automatic 24-hour temp file cleanup. - **Studio** — Multi-provider prompt workspace where users interact with any configured AI model directly. For comparing model responses, testing prompts, and exploring AI capabilities without committing to a dedicated tool. - **Inspera Exam Analytics** — Interactive analysis of Inspera exam-result exports — distribution charts, item-level statistics, cohort comparison, export to CSV/XLSX, and AI-generated narrative insights. Lets programme coordinators see how an exam actually performed without leaving Borg. - **Scite citation analysis** — Research-reliability tool that surfaces supporting, mentioning, and contrasting citations for a given paper or claim via the Scite API. For faculty and students preparing literature reviews and verifying sources. - **Prompt Library (Skilaboð)** — Curated, bilingual prompt catalogue grouped by tool and task. Lets staff reuse vetted prompts instead of rewriting them. Editable by admins, browseable by all signed-in users. - **Blog** — In-platform news and articles surface — release notes, policy explainers, change announcements. Bilingual by default, authored in the admin panel, public-readable. - **Wiki (Vefumsýslukerfi)** — Internal wiki for IT-helpdesk knowledge, runbooks, and operational procedures. Doubles as a retrieval source for UNAK-spjall's helpdesk tool — answers are grounded in the wiki rather than generic web knowledge. - **Hladvarp (Podcasts)** — Voice-recording and podcast tooling on top of the STT pipeline. Public episode page in flight (feature/hladvarp-public-page). Designed for staff/faculty podcasts grounded in institutional context. - **KhaTools (Canvas LMS toolkit)** — Operator-grade Canvas LMS user management — SSE-streamed bulk suspend/unsuspend/delete, feature-gated access, multi-account support. Eliminates manual click-through work for course administrators. - **AIOps Brain** — Internal server-side Claude reasoning layer for reliability operations — SITREPs, runbook matching, triage. Token-accurate cost ledger; every reasoning call is audited. Live on test since 2026-05-12 (ADR-010). - **Nemendaskrárspjall (Student Registry chat, planned)** — First public-facing chatbot, opening to prospective students with no sign-in required. Answers admissions, enrolment, course-catalogue, and study-leave questions from the Student Registry's own records. Fall 2026 GA target. ## Markaðskynningasvíta — marketing suite Markaðskynningasvíta — a nine-module marketing platform built for the UNAK marketing team. Bilingual CMS, vector-search-driven asset suggestions, atomic soft-delete, full observability. Each module ships independently and shares the same knowledge base. - **Landing** — Suite landing page and navigation hub. - **Studio** — Presentation studio with deck builder, PPTX export, and zip-all-formats bundle (PR #556). - **Ratsjá** — News and media monitoring pipeline for marketing intelligence. - **Knowledge** — Vector knowledge base — 4 seeded KBs, atomic soft-delete, pgvector-powered suggestPhotos, observability. - **Assets** — Asset library with text embeddings (embedding_gemini) and optional vision embeddings (opt-in via UserGroupSetting). - **Brand** — Brand identity store and guidelines. - **Templates** — Content template library for marketing materials. - **Settings** — KB similarity thresholds, vision-embedding toggle, admin tuning. - **Assistant** — AI assistant chat for the markaðsdeild persona; client-only role overlay, never persisted to Prisma. ## Foundations - **borg-core** — Core platform — App Router, auth, database, AI gateway, deployment pipeline. The substrate every capability runs on. - **borg-data** — Data architecture — dual-database design (production + test), 79 Prisma models covering chat, RAG, AI usage, content, speech, translations, KG audit, marketing. - **borg-security** — Network segmentation, incident response, 10 VMs behind Fortinet, DB-backed RBAC, deploy-pipeline secret validation. Security audit Feb 2026: 9.75/10, all 12 critical findings resolved. - **Disaster recovery** — Documented backup strategy, recovery procedures, and RTO/RPO targets. See `docs/architecture/DISASTER_RECOVERY_270226.md`. - **Translation system** — PostgreSQL-backed bilingual layer with ~4,100 entries. Admins edit strings live without redeploy. CI/CD re-seeds via staging-table dedup. Not a third-party i18n library. - **Deployment pipeline** — GitHub Actions → Docker → hai-web-test / hai-web-prod. Secrets injected at deploy time from GitHub Secrets. Source is never rsynced to production. - **Human Provenance Standard (HPS)** — Project-defined provenance contract: every authored source file carries an immutable @orchestrator field naming the responsible human. AI agents are never Orchestrator. Drafted in `docs/reference/BORG_HPS_draft.md`. - **Navigation shell** — Unified app shell — desktop sidebar, header with breadcrumbs and user dropdown, mobile bottom bar, route metadata. Single-source-of-truth navigation across all 18+ user-facing tools. ## Proof points - **42** production subsystems — Documented in the architecture registry; 100 % conformance, 0 scaffolded. - **2,654 across 179 files** automated tests — Vitest unit/integration + Playwright E2E. Counter at docs/generated/test-count.txt. Pre-commit and pre-push gates. - **729** knowledge graph entities — 1,691 relationships across 7 domains. Verified live on the production Neo4j cluster. - **9.75 / 10** security audit score — 10-wave audit completed February 2026. All 12 critical findings resolved. - **~4,100** translation entries — PostgreSQL-backed bilingual layer (IS primary, EN parity). Admin-editable live, no redeploy. - **4** AI providers — Anthropic Claude, Google Gemini, OpenAI, plus on-premises GPU inference. Routing decisions are configuration, not code. ## Links - [About BORG (bilingual deep-dive)](/um-borg) - [Public landing page](/) - [Sign in (staff and faculty)](/login) ## Notes - BORG is bilingual by default: Icelandic primary, English full parity. Both ship simultaneously, never sequentially. - The platform is operated by the University of Akureyri. It is not a commercial product and is not sold or licensed externally. - Architecture details in this digest are intentionally high-level. Operational topology — hostnames, IP addresses, internal service names, secret values — is never exposed in public artefacts. - The Þekkingarborg framing is not a rename. The technical identifier BORG is unchanged in code, repos, and routes. Þekkingar Borg is how we *talk about* the system in Icelandic institutional contexts. Digest version: 2.2