AI, LLM and real-time · RAG · Government records

Government knowledge assistant: RAG over records with classification-aware access, citations and FOI-ready logging

An assistant that answers staff questions from agency records. Retrieval enforces each user's access and classification before text reaches a model, answers carry citations to the authoritative record, and every interaction is logged so it can be managed under the State Records Act and produced under FOI.

A reference architecture from EITSAA, not a named client system. Service limits, prices and product features change, so confirm current details before you commit to a design.

  • ACSC Essential Eight
  • Protective Security Policy Framework (PSPF)
  • SA Information Security Management Framework (ISMF)
  • State Records Act 1997 (SA)
  • Freedom of Information Act 1991 (SA)
  • Australian Privacy Principles (APP 11)

Architecture

Architecture diagram. Tinted boundaries show regions, accounts, networks and trust zones. Numbered arrows match the flow below.
Government knowledge assistant: RAG over records with classification-aware access, citations and FOI-ready logging architectureAgency staff to Microsoft Entra ID: sign in. Agency staff to Assistant API: question. Assistant API to Retrieval service: query + identity. Retrieval service to Search index: filtered search. Retrieval service to Model gateway: grounded prompt. Assistant API to FOI-ready audit log: log. SharePoint and file shares to Ingestion pipeline: crawl. Ingestion pipeline to Search index: index + labels. Retrieval service to Records system: fetch recordStaffAgency platform · Australian region · private networkSource systemsAgency staffBrowser or TeamsMicrosoft Entra IDSSO, MFA, groups, clearanceclaimsAssistant APISession, citations, feedbackRetrieval serviceHybrid search, ACL and labelfilterSearch indexVectors, keywords, ACL metadataModel gatewayAustralian-region model,guardrailsFOI-ready audit logQueries, sources, answersRecords systemAuthoritative copy andretentionIngestion pipelineParse, chunk, label, embedSharePoint and filesharesPolicies, cases, briefs1sign in2question3query + identity4filtered search5grounded prompt6log7crawl8index + labels9fetch recordPlatform servicesIdentityprovider (SSO)Monitoring andalertsAudit logKey management(KMS)
  • People and clients
  • Security and identity
  • Compute and containers
  • AI and ML
  • Monitoring, audit and analytics
  • SaaS and business systems
  • Databases and data
  • Request or data flow
  • Asynchronous or optional
  • Boundary: region, account, network or trust zone

Request and data flow

  1. Staff sign in with SSO and MFA. Group membership and any clearance or caveat attributes arrive as claims, refreshed frequently so a role change takes effect quickly.

  2. A question reaches the assistant API with the user's token. The API holds the session, but not the authority to decide access.

  3. The retrieval service receives the question with the user's identity. It rewrites the query, then builds a filter from the user's entitlements and the classification labels they are cleared to see.

  4. The search index applies the access filter inside the query (document-level security), so documents the user cannot open are never retrieved, scored or sent to a model. Hybrid keyword and vector search with re-ranking improves precision.

  5. The top passages go to the model through the gateway with an instruction to answer only from the sources and to cite them. An Australian-region model and guardrails run through the gateway. Responses without supporting passages are declined.

  6. The API writes a log entry: user, time, question, retrieved record identifiers and versions, model, answer and feedback. The log is retained under the relevant records authority and is searchable for FOI and investigations.

  7. An ingestion pipeline crawls source repositories, extracts text (OCR for scans), splits it into sections that keep headings and context, and attaches metadata: record ID, version, owner, classification, security markings and retention class.

  8. Chunks, embeddings and ACL metadata are written to the index. Permission changes in the source are synchronised on a short cycle and by event, and deletions remove the chunks.

  9. Citations link to the authoritative record in the records system, not to a copy. Users open the source to confirm. Where the assistant output is itself a record of a decision, it can be saved to the records system with its sources.

Components and why they were chosen

ComponentWhat it doesWhy this choice
Microsoft Entra ID (or agency IdP)SSO, MFA, groups and clearance attributes.One identity source for access decisions.
Assistant APIChat sessions, citation rendering, feedback and rate limits.Thin layer, no access decisions.
Retrieval serviceQuery rewriting, entitlement filter, hybrid search, re-ranking and context assembly.Central place to enforce access before generation.
Search index (Azure AI Search, Amazon OpenSearch Service, Vertex AI Search or pgvector)Vectors, keywords and ACL metadata with document-level security.Filtering inside the index prevents leakage.
Model gatewayAustralian-region model, guardrails and cost control.Shared with other AI workloads.
Ingestion pipeline (Azure Functions or Lambda, Textract or Document Intelligence)Parse, OCR, chunk, label and embed.Quality of retrieval depends on ingestion quality.
Records system (an EDRMS such as Content Manager, or SharePoint with retention labels)Authoritative records, versions and disposal.Citations point to the record of truth.
Audit log (immutable storage plus SIEM)Queries, sources, answers and feedback.Supports FOI, privacy and quality reviews.

Design decisions and trade-offs

Where access control is enforced

In the index query with document-level security, never by asking the model to hide things.

Why. A model cannot reliably withhold content it has been given.

Trade-off. Needs reliable ACL sync and a clean permission model in the sources.

Classification handling

One assistant per classification boundary, or a single index only where labels and clearances are enforced end to end.

Why. Mixing classifications in one index multiplies the cost of a mistake.

Trade-off. More deployments, but simpler assurance.

Chunking and context

Section-aware chunks with headings, document title and version in each chunk, plus re-ranking.

Why. Better answers and better citations.

Trade-off. Higher ingestion complexity and re-indexing cost when a record changes.

Answer policy

Answer only with citations. Say when the records do not contain an answer.

Why. Public sector staff need verifiable answers.

Trade-off. Some questions get no answer. Measure and tune rather than relax the rule.

Logging content

Retain questions, retrieved record IDs and answers as agency records, with defined access and retention.

Why. These can be subject to FOI and may inform decisions.

Trade-off. The logs hold sensitive material and need the same protection as the sources.

Well-architected pillars

Security

Document-level security, claims-based access, private endpoints, customer-managed key encryption, DLP on outputs, guardrails and injection testing on retrieved text.

Reliability

Multi-AZ search and API tiers, idempotent ingestion with a dead-letter queue and a documented re-index procedure.

Performance

Hybrid search with filters, caching of embeddings and streaming answers. Pre-filtering must be tested at agency scale.

Cost optimisation

Embed once per version, tier search capacity, use a small model for query rewriting and a larger one only for answers.

Operational excellence

Evaluation sets per knowledge domain, source-freshness dashboards, and a review loop with records managers.

Sustainability

Incremental indexing, no duplicate copies of source files and right-sized search replicas.

Network, identity and data

Networking

API, retrieval, search and ingestion run in private subnets or a private environment. Search, storage, key vault and model endpoints use private endpoints. Source connectors use agency private connectivity. Public access is disabled on all data services, and egress is limited to the model gateway.

Identity and least privilege

Users authenticate with SSO and MFA. The retrieval service receives and validates user claims and builds the filter. Connectors and the ingestion pipeline use distinct workload identities with read-only access. The audit log is writable only by the API and readable by a small governance group.

Data and encryption

Records keep their classification and retention class in index metadata. Deleting or disposing of a source record must remove its chunks and embeddings. Treat embeddings as derived from the source. Do not use the content to train models. Retain logs under the applicable general disposal schedule and confirm with the agency's records manager.

Security and compliance mapping

ControlHow this design addresses it
Restrict administrative privilegesSeparate duties for platform, index and audit administration. Essential Eight.
Multi-factor authenticationPhishing-resistant MFA for staff and administrators. Essential Eight.
Records managementRecords identified, retained and disposed of under State Records Act obligations, with citations to authoritative copies.
Information accessInteraction logs searchable to support FOI processing.
Privacy and security of informationMinimisation, access filtering and encryption support APP 6 and APP 11 and SA ISMF controls.

Mappings show how the design supports each control. They are not certifications, and EITSAA does not claim IRAP assessment or compliance for any reference architecture.

Failure modes, targets and scaling

  • Target RTOUnder 4 hours for the assistant, which is not a system of record
  • Target RPOThe index can be rebuilt from sources. Audit log RPO is near zero
  • Scaling and limitsSized by document count, query concurrency and ACL complexity. Load test with real permission structures.
Failure modeMitigation
Permission change not yet reflected in the indexShort sync interval, event-driven updates and a final entitlement check against the source before display.
Hallucinated or unsupported answerCitation requirement, groundedness checks and a decline path. Sample reviews with subject matter experts.
Stale or superseded policy retrievedVersion and effective-date metadata, prefer current versions and show the date in the citation.
Ingestion backlog or poison documentQueue with dead-letter handling and alerts, and per-source health on a dashboard.
Prompt injection hidden in a documentTreat retrieved text as data, strip active content, give the assistant no write tools and monitor outputs.

Observability and runbooks

  • Retrieval hit rate, groundedness and citation-click metrics per knowledge domain.
  • Ingestion lag, failures and ACL sync delay.
  • Declined-answer rate and user feedback trends.
  • Cost per question and index capacity utilisation.

Cost drivers and levers

Search index capacity, embedding generation, model tokens, OCR and engineering time to clean sources.

  • Index only high-value sources first.
  • Re-embed only changed versions.
  • Use smaller models for rewriting and classification.
  • Cache frequent questions where the answer and permissions allow.

Implementation and fit

Phased approach

  1. Choose one domain with clean sources and an engaged records manager.
  2. Build ingestion, index and retrieval with access control, then test with real permission cases.
  3. Add the assistant, citations, logging and a review process.
  4. Extend to further domains, with an evaluation set per domain.

Anti-patterns to avoid

  • Indexing everything before fixing permissions.
  • Asking the model to withhold restricted content.
  • Citing copies instead of authoritative records.
  • Keeping no log, or logging into an unmanaged tool.
  • Letting the assistant act without a defined records process for its outputs.

When to use it

  • Agencies and councils with large policy, case or procedure collections.
  • Staff who must find and cite authoritative guidance.

When not to

  • Content with unresolved permission problems or no record owner.
  • Decisions about individuals that need a formal process rather than a search tool.

More in ai, llm and real-time

  • AWS · chatbot · guardrails

    Customer chatbot with slot filling, LLM orchestration and guardrails on AWS

    A customer-facing chatbot with flow control and guardrails kept apart. A deterministic engine owns intents, slots, validation and retries. A catalog of controls across six layers (input, context, model, tool and action, output, human oversight) screens every message in and every reply out, and a small Bedrock model is called only between questions, all on pay-per-use serverless services.

  • AWS and Azure AI

    RAG application with Amazon Bedrock or Azure OpenAI, a vector store, guardrails and evaluation

    A grounded question-answering system for internal knowledge: governed ingestion, hybrid retrieval with permissions, a guarded model call, citations, an audit log and a repeatable evaluation harness.

  • AWS and Azure AI

    AI agent with tool use and human approval

    An agent that can do things, not just answer: a bounded planner, a registry of narrowly scoped tools, policy checks outside the model, human approval for consequential actions and a full action ledger.

Related insights

Discuss this architecture

Tell us your systems, constraints and timeline. We reply within one business day, and the initial conversation is free.