Technical Architecture of an Intelligent Approval Assistant for Public Services
This article examines the technical architecture behind an intelligent approval assistant deployed in a municipal public service hall, covering its five-layer design, knowledge base construction from structured service item catalogs, hybrid retrieval that prioritizes structured matching over vector search, retrieval-augmented generation with accuracy controls, data synchronization and versioning, and operational coordination with human service windows. It is intended for engineers and architects building domain-specific question answering systems over large, structured policy repositories, and it emphasizes the system's scope as a guidance tool rather than a decision-making authority.
1. Background and Problem Definition
In public service halls, the most common obstacle for visitors is not that a task “cannot be done,” but that they “do not know how to do it”: whether their documents are complete, where to go, whether an appointment is needed or a queue ticket must be taken on site, and whether different groups follow different procedures. Traditional approaches rely on in-person window consultation and static web announcements. The former creates queues during peak hours; the latter suffers from scattered information, high search costs, and updates that lag behind.
Against this backdrop of digital government reform, a municipal public service organization launched an intelligent approval assistant for citizens in May 2025. Visitors scan a QR code in the hall to open a mini program and ask questions in natural language to get procedural guidance. The system covers more than 1,700 service items, including social insurance, housing provident fund, business licenses, and real estate certificates, and it operates around the clock. Setting aside the specific product, this article abstracts the common architecture and implementation points of this class of system.
One point deserves emphasis: such a system is positioned as a source of guidance, not approval. It outputs standardized information such as document checklists, service locations, and procedural steps; it does not perform any administrative decision-making function. This boundary must be defined at the product design stage, otherwise unnecessary compliance risk is introduced.
2. Overall Architecture
A usable government intelligent question answering system typically has five layers:
- Access layer: multiple entry points such as the mini program, official accounts, and hall terminals, all passing through a gateway for authentication and rate limiting.
- Orchestration layer: intent recognition, query rewriting, retrieval scheduling, result assembly, and fallback strategies.
- Retrieval layer: a dual channel combining structured queries over government service items and unstructured retrieval over documents.
- Knowledge layer: the item catalog, document catalog, service location catalog, and policy document repository, plus the relationships among them.
- Data synchronization and governance layer: integration with government service websites and item management systems to handle incremental updates, version management, and quality validation.
The key design principle is structured first. Government service items are inherently strongly structured (item code, applicable groups, document checklist, processing time limit, fee standard, service location). Not every question should be handed to vector retrieval; instead, structured matching should be attempted first, with semantic retrieval as the fallback channel.
3. Knowledge Base Construction: From Item Catalogs to Computable Structures
A knowledge base covering more than 1,700 items cannot be populated manually, entry by entry. A practical path is to build a standardized mapping model that converts raw item descriptions into unified fields:
{"item_code": "SB-0012","item_name": "Social Insurance Enrollment Registration","applicable_to": ["enterprise employees", "flexible employment personnel"],"materials": [{"name": "identity document", "required": true, "format": "original + copy"}],"location": {"district": "municipal", "hall": "Public Service Center Zone A", "window_type": "general window"},"duration": "immediate completion","version": "2025-05-01","source_url_hash": "a1b2c3"}
On top of this, supplementary text for semantic recall is generated for each item: the document checklist, service location, and common question variants are concatenated into embeddable passages. Retrieval uses a hybrid strategy in which structured condition filtering and vector similarity recall run in parallel, after which a reranking model produces the candidates.
Illustrative retrieval logic:
def resolve(query, user_context):# Channel 1: exact structured matchinghits = structured_search(query, district=user_context.get("district"))if hits and hits[0].score > 0.9:return build_guide(hits[0])# Channel 2: semantic recall + rerankingcandidates = vector_recall(query, top_k=20)candidates = rerank(query, candidates)[:5]if candidates and candidates[0].score > threshold:return build_guide(candidates[0])# Fallback: clarifying question or handoff to a human agentreturn clarify_or_handoff(query)
Thresholds and fallback strategies are central to accuracy. It is better to ask “Are you applying for employee social insurance or resident social insurance?” than to return an answer that looks plausible but applies to the wrong group.
4. Retrieval-Augmented Generation and Accuracy Control
The value of a large language model in this class of system lies in organizing structured fields into natural language that citizens can understand, not in generating policy content from parametric memory. A retrieval-augmented generation paradigm is therefore mandatory: retrieve first, constrain generation, then run a consistency check.
The engineering essentials include:
- Prompt constraints: explicitly require answers to be based only on the retrieved fragments, and to output “not yet covered, please consult the service window” when information is missing.
- Citation and traceability: attach the item code and data version to each answer so that citizens and staff can verify it.
- Consistency validation: perform entity comparison on document names and service locations in the generated result, and block the answer if it conflicts with the knowledge base.
- Sensitive topics and disclaimers: questions involving eligibility determination or amount calculation are uniformly redirected to official channels for confirmation.
System constraint: answer using only the retrieved content below; do not infer conditions that were not provided.Retrieved content: {{retrieved_fragments}}User question: {{query}}Output requirement: document checklist + service location + processing method + data version; state the gap if information is insufficient.
5. Data Synchronization and Knowledge Updates
Policies and service conditions change continuously, and a knowledge base that cannot stay in sync becomes stale quickly. In practice, a combination of scheduled full validation and event-driven increments is common: scheduled jobs compare data digests from the government service website and the item management system, and trigger an update when differences are found; meanwhile, item change events are monitored so that updates take effect within minutes.
The synchronization pipeline should be decoupled: collection, cleansing, ingestion, and index rebuilding are connected through a message queue to avoid a single point of blocking. Each update generates a new knowledge version number, and the question answering side records the version that was hit. When disputes arise, it is possible to trace back to the specific version and source, which is critical for auditability in government scenarios.
6. Operational Results and Coordination with Service Windows
The direct benefit after launch appears in consultation triage: repetitive inquiries that used to concentrate at human windows during peak hours are largely absorbed, allowing window staff to focus on complex cases that require verification and judgment. It should be noted that the actual efficiency gain depends on the structure of service items, citizen usage habits, and signage in the hall, so no uniform figure should be promised.
Supporting operational work is equally important: the placement of QR codes and guidance signs in the hall, high-frequency item entries on the mini program’s first screen, periodic review of failed question answering, and a closed loop for adding uncovered questions to the knowledge base. Without a review mechanism, coverage stagnates about three months after launch.
7. Future Directions
Capabilities worth exploring next include voice interaction to lower the barrier for elderly users, intelligent pre-review of document photos to detect missing items in advance, process orchestration for cross-department joint services, and a quality dashboard built on log services and monitoring alerts. The shared technical prerequisite for all of these remains a knowledge base that is accurate, timely, and traceable.
