Large Language Models in Public Sector: Technical Practices and Engineering Insights for Government Intelligence
This article explores the deployment and implementation of open-source Large Language Models (LLMs) in public service scenarios. Through a case study of a city government department launching "AI Digital Employees," we break down the technical architecture, private deployment paths, and the closed-loop application system. The article also highlights engineering considerations, security compliance requirements, and human-in-the-loop optimization strategies, providing technical teams with a reusable guide for implementing AI-driven upgrades in the public sector.
1. Background and Motivation
Public services typically involve high-concurrency inquiries, repetitive document processing, and cross-departmental collaboration. Traditional IT systems are primarily process-driven and often struggle with unstructured texts (such as citizen letters, approval materials, and policy documents). They rely heavily on manual categorization, drafting, and review, leading to significant efficiency bottlenecks.
The introduction of LLMs changes this landscape. Their core value is reflected in three aspects:
- Semantic Understanding: Intent recognition and element extraction for natural language content like official documents, work orders, and inquiries, replacing manual initial screening.
- Generation Capability: Assisting in drafting official documents, response scripts, and meeting minutes, thereby shortening the document workflow cycle.
- Knowledge Integration: Utilizing Retrieval-Augmented Generation (RAG) to consolidate scattered policies, regulations, and service guides into a unified knowledge base, supporting intelligent Q&A and assisted decision-making.
It is worth noting that public sector scenarios have a rigid requirement for private deployment. Government data involves citizen privacy and sensitive information, making it prohibited to call public cloud inference APIs externally. This is the fundamental reason why this practice chose to deploy a full-size open-source LLM locally on a government extranet and government cloud.
2. Deployment Path: From Single-Point Pilot to City-Wide Empowerment
Based on public information, the city’s LLM implementation followed a progressive three-stage path, which itself holds engineering reference value.
Stage 1: Single-Point Verification in a Secure Local Environment
A full-size open-source model was first deployed on the government extranet at a district-level data administration bureau. The core task of this stage was technical verification rather than business rollout:
- Domestic Compute Adaptation: Verifying the compatibility and throughput of inference frameworks on localized chips and operating systems.
- Network Boundary Confirmation: Ensuring the model service runs stably in an isolated government extranet environment without introducing data leakage risks.
- Performance Baseline Establishment: Recording latency and accuracy baselines for typical official document generation and intent recognition tasks to provide a basis for subsequent expansion.
Stage 2: Full Deployment on Government Cloud
Subsequently, a large-scale (671B parameter) full-version model was deployed on the municipal government cloud, accompanied by city-wide user training. Key engineering actions in this stage included:
- Compute Resource Pooling: Unifying inference service management through container platforms and GPU scheduling systems on the government cloud to allocate quotas by department.
- Multi-Replica and Elastic Scaling: Configuring auto-scaling strategies to handle periodic peaks in government inquiries (e.g., on policy release days).
- Unified Gateway Access: Districts and departments calling model services via a unified API gateway to avoid redundant construction. A schematic call chain is as follows:
Business System ──> Unified API Gateway (Authentication / Rate Limiting / Audit)│├──> Inference Cluster (Model Service, Multi-Replica Load Balancing)│ ││ └──> Vector Knowledge Base (Policy Document Retrieval Augmentation)│└──> Logging and Monitoring Service (Full-Chain Tracing for Audit Requirements)
Stage 3: Integrated Service Output
Ultimately, the model capabilities were opened to all districts and departments city-wide as a government cloud service, forming an integrated empowerment model of “one model base, multiple application scenarios.” This “platform-based supply” prevents redundant investments in computing power procurement across different districts.
3. AI Digital Employees: A Closed-Loop System for Scenario Implementation
On top of the municipal model base, a district took the lead in launching 70 “AI Digital Employees” across 11 major categories, covering the entire chain of public services. The core methodology involves precise parsing of 240 government scenario terminals to build a closed-loop ecosystem of “Demand - Training - Application - Iteration.”
1. Demand Side: Scenario Granularity Determines Success
The 70 digital employees are not 70 independent systems, but role-based configurations on the same model base, divided by job responsibilities. Each digital employee has a clear boundary of duties, for example:
- Document Processing: Automatic format proofreading, initial drafting, and compliance checking.
- Public Services: Smart categorization of hotline work orders and answering common inquiries.
- Emergency Management: Summarizing emergency incident information and multi-source reports.
- Investment Promotion: Organizing corporate intelligence and matching policy recommendations.
The key to scenario breakdown is “precise terminal parsing”—decomposing vague “intelligent demands” into measurable, trainable specific tasks, each with clear inputs, outputs, and acceptance criteria.
2. Training Side: Domain Adaptation Over Generic Stacking
Government texts have a unique linguistic system (official formats, policy jargon, business standards). Generic LLMs used directly may answer irrelevantly or fail to meet formatting standards. Common adaptation methods include:
- Prompt Engineering: Defining role prompt templates for each type of digital employee to constrain output formats and standards.
- Retrieval-Augmented Generation (RAG): Vectorizing the latest policy documents into a database. The system retrieves before generating, preventing the model from fabricating policies.
- Fine-Tuning: For high-frequency tasks like official document writing, using anonymized historical corpora for Supervised Fine-Tuning (SFT) to improve format and style consistency.
3. Iteration Side: Human-in-the-Loop Continuous Optimization
Public sector scenarios have a low tolerance for errors. Therefore, a “human-machine collaboration + feedback loop” mechanism must be established:
User Usage ──> Manual Review / Correction ──> Feedback Annotation ──> Periodic Evaluation ──> Prompt / Knowledge Base / Model Update
Every manual correction serves as a training signal. By setting operational metrics such as accuracy and adoption rate, the capabilities of digital employees can evolve sustainably, avoiding the gradual obsolescence that comes with one-time deployments.
4. Security, Compliance, and Engineering Essentials
The implementation of government LLMs must maintain three bottom lines:
- Data Stays In-Domain: Models, knowledge bases, and logs must all remain within the local secure government environment. Calling external interfaces to process government data is strictly prohibited.
- Full-Chain Audit: All model calls are traced via the gateway, and responses can be traced back to their knowledge sources, meeting regulatory audit requirements.
- Clear Human-Machine Accountability: AI outputs serve only as assistance. Decision-making processes, such as approvals and law enforcement, must retain manual final review to prevent algorithms from directly determining administrative actions.
5. Summary and Outlook
In essence, the “AI Civil Servant” is a government intelligence engineering project that uses an open-source LLM as its base, a government cloud as its compute carrier, and scenario-based digital employees as its delivery form. The success factors can be summarized as: progressive deployment to verify risks, platform-based supply to avoid redundant construction, scenario closed-loops to ensure continuous iteration, and human-machine collaboration to maintain compliance. For technical teams planning similar initiatives, it is recommended to start with low-risk, high-frequency scenarios like document assistance and intelligent Q&A. After accumulating corpora and operational experience, the scope can be extended to sensitive scenarios such as emergency response and approvals, steadily advancing the intelligent upgrade of public services.
