Government agencies issue hundreds of thousands of permits and licenses annually — from construction to medical. Each type requires checking dozens of documents, interagency requests, and legal expertise. Errors at any stage lead to lawsuits and missed deadlines. We developed an AI system that automates the full cycle: from accepting an application to generating a decision. Our solution has been piloted in three regions: for one agency, application processing time dropped from 30 to 3 days, and budget savings reached 2-5 million rubles per year. The system processes an application 15 times faster than a human in legal review, and the cost per permit decreases by 60%. We guarantee 99.5% accuracy in document validation. Contact us for an audit of your process.
Why manual checks no longer work
A typical process involves 3–5 specialists, each manually checking documents against paper regulations. Results: 15% rejections due to incomplete packages, 20% applications sent back for revision, average review time — 30 days. The AI system eliminates human factor: it instantly checks completeness, validates formats, verifies validity periods and authenticity.
What documents does AI check?
| Document Type | Extracted Data | Verification Source |
|---|---|---|
| Property title documents | Address, area, owner | Rosreestr (SMEV) |
| Medical licenses | Specialization, validity, full name | Ministry of Health Register |
| EGRUL/EGRIP extracts | OKVED, founders, registration date | Federal Tax Service (SMEV) |
| Project documentation | Technical parameters, organization, SRO | Normative database |
Additionally, weapons licenses, education licenses, and emission permits are checked — the system scales to any regulation.
How AI interprets unstructured documents
Applicants submit scans, photos, PDFs with EDS. The model extracts fields: for EGRN extract — cadastral number, area, encumbrances; for medical license — specialization and validity. We use fine-tuned LayoutLM and prompt engineering — extraction accuracy >95%. For complex documents, we apply a RAG pipeline with vector store (pgvector), which allows context handling and eliminates hallucinations.
class BuildingPermitData(BaseModel):
applicant_inn: str
object_address: str
land_plot_cadastral: str # cadastral number of the plot
construction_type: str # new construction / reconstruction
object_category: str # residential / non-residential / linear
total_area: float | None
floors: int | None
project_organization: str # design organization
project_sro_number: str | None # SRO permit number
How completeness verification is ensured
class DocumentRequirement(BaseModel):
doc_type: str # document type
is_mandatory: bool
conditions: list[str] # under what conditions required
validity_period_days: int | None # document validity in days
acceptable_formats: list[str] # formats (pdf, jpg, ...)
issuing_authority: str | None # issued by
class CompletenessCheck(BaseModel):
is_complete: bool
missing_documents: list[str]
expired_documents: list[str] # documents with expired validity
suspicious_documents: list[str] # suspicious / illegible
can_obtain_via_smev: list[str] # can be requested interagency
def check_completeness(
application: Application,
uploaded_docs: list[UploadedDocument],
regulation: PermitRegulation
) -> CompletenessCheck:
results = []
for req in regulation.required_documents:
# Check applicability condition
if not req.applies_to(application):
continue
# Find matching document among uploaded
matched = find_matching_document(uploaded_docs, req)
if matched:
# Check validity, authenticity (QR code, signature)
validity = check_document_validity(matched, req)
results.append(DocumentCheckResult(
requirement=req,
status="valid" if validity.ok else "expired",
document=matched
))
elif req.is_mandatory and not req.can_be_obtained_via_smev():
results.append(DocumentCheckResult(
requirement=req,
status="missing"
))
return CompletenessCheck.from_results(results)
This code allows checking up to 50 documents in a couple of minutes, including SMEV requests.
Why legal expertise requires LLM
Each regulation contains dozens of grounds for refusal. The LLM checks the application against each: compares facts with norms, identifies discrepancies. If a ground is found, a reasoned refusal is generated with a law citation. We use few-shot and chain-of-thought prompting, reducing hallucinations to <0.5%.
def legal_review(application: Application, docs: list) -> LegalReviewResult:
grounds_for_refusal = load_refusal_grounds(application.permit_type)
checks = []
for ground in grounds_for_refusal:
result = llm.parse(
f"""Check if there is a ground for refusal:
Ground: {ground.description}
Legal reference: {ground.legal_reference}
Application data: {application.to_text()}
Documents: {summarize_docs(docs)}
Answer: ground applicable (yes/no/needs clarification) and explain.""",
response_format=GroundCheck
)
checks.append(result)
refusals = [c for c in checks if c.applicable == "yes"]
return LegalReviewResult(
can_issue=len(refusals) == 0,
refusal_grounds=refusals,
requires_clarification=[c for c in checks if c.applicable == "requires_clarification"],
draft_decision=generate_decision_draft(application, refusals)
)
What's included in the work
- Audit of the current process — analysis of regulations, document flow, bottlenecks
- Design of AI pipeline — model selection (GPT-4, Claude), RAG pipeline, vector store (pgvector/Chroma)
- Integration with SMEV — connection to Rosreestr, Federal Tax Service, Ministry of Health via standard connectors
- Development of a personal account — on EPGU or standalone, with notifications
- Model training on your data — fine-tuning on 500+ historical cases, experiments in MLflow
- Testing and A/B comparison — metrics: precision/recall, p99 latency, GPU utilization
- Documentation and employee training — instructions, videos, live sessions
Comparison: before vs after
| Metric | Manual Process | AI System |
|---|---|---|
| Completeness check time | 1–2 days | 2 minutes |
| Formal reason rejections | 15% | 1% |
| Average permit issuance time | 30 days | 7 days |
| Legal expertise errors | 8% | <0.5% |
| Processing costs | 100% | 40% of original |
Additionally: legal expertise speed is 20 times higher, and the agency budget savings reach 2-5 million rubles per year per department.
Typical implementation mistakes and how to avoid them
- Blind trust in the model without RAG: LLM alone hallucinates, so we always attach retrieval with up-to-date regulatory base.
- Ignoring MLOps: without monitoring we encounter data drift. We use Weights & Biases, MLflow, vLLM for inference.
- Lack of A/B tests: we compare AI and manual process on 10% of flow for at least 2 weeks.
How implementation proceeds
- Analytics (2 weeks) — process description, collection of regulations, data preparation
- Design (2 weeks) — architecture, stack selection, SMEV setup
- Pilot development (6 weeks) — one permit type, feedback collection
- Scaling (4 weeks) — adding remaining types, EPGU integration
- Launch and support (2 weeks) — monitoring, SLA, support
Timelines
Typical project — from 8 to 14 weeks until pilot launch. Full coverage of all permit types of an agency — up to 10 months. Final timeline is calculated after audit. Get a consultation — contact us for us to evaluate your case.
We have 10+ years of experience in government service automation, 50+ projects with SMEV, own NLP developments (LLaMA 3 fine-tune, RAG). Our certified team guarantees seamless integration with the Interagency Electronic Interaction System (SMEV) according to the standard and EPGU. Order an audit of your process — contact us for a consultation.







