Skip to content

Content-based topics

The Knowledge Base graph groups entries using an AI-generated primary content topic, not FAQ/agenda/announcement type. Up to three labels are cached per entry; the graph currently groups by the primary label. Examples: Izin Bermalam (IB), Perizinan keluar kampus, Akses akun App Hub. Existing labels are supplied as vocabulary to reduce duplicate names. Labels are model suggestions, not a new source of official facts.

Only currently eligible published/public sources are sent to the classifier. Text is sanitized and limited to the title and a 650-character excerpt. Draft/internal/revoked sources are not sent for background classification. Uncategorized entries remain visible under Belum dikategorikan. A content hash invalidates labels immediately after title/content edits. Eligible entries are classified initially, after edits, and when their classification is over 30 days old. Publication and authority checks remain separate from labels.

The new topic-worker service is an isolated, private, resource-limited process. It never runs in the conversational worker or on a user request path. It checks every minute but makes at most one four-entry batch per fifteen minutes and twelve attempts per provider day (at most 48 entries/day). Initial mapping therefore fills in gradually. It waits for ten minutes without chat jobs, any queued/processing user work, and queued admin AI previews. No alternate-model rolling or automatic provider retries are used for classification.

Every attempt requires recorded RPM/TPM/RPD limits checked within 30 days. Unknown/zero/stale limits or a provider cooldown pause work. App-local Google usage is aggregated across models conservatively. Background work stops when adding the call would pass 20% of recorded daily/request-per-minute capacity or 50% of minute-token capacity. Configured AI_RPM and AI_RPD caps reduce these allowances further. Token reservations conservatively use UTF-8 input bytes plus the output allowance. A per-day background cap also applies. A database session lock prevents duplicate scheduler instances. All real calls use the existing usage recorder; model output is strictly validated for exact input IDs, bounded content labels and complete batches. A changed entry is not overwritten by stale classification results.

This is a small shared quota budget, not additional free capacity. Recorded local limits/usage cannot reveal use by unrelated external clients of the same Google project. The scheduler prioritizes foreground headroom; it cannot promise zero consumption of shared provider quota. The graph shows classified/pending counts, the budget policy and last attempt status. Published knowledge remains available to chat even while topic labeling is paused.

Tests cover unknown limits, cooldowns, daily reservation, queued-user precedence, successful batch persistence, cache reuse, invalid identities and generic labels, and graph coverage. The full disposable suite and graph browser checks run without real model calls. Production background labeling uses the configured Google model and normal free-tier key when its guards permit. Stop only the topic-worker service to pause labeling; chatbot workers and existing topics remain available.