Project

Visa Support Letter Automation Platform

AI-powered platform that auto-generates and manages US investor visa support letters for immigration law firms

Service Type

AutomationDocumentWeb Development

Tech Stack

pgvectorClaude APIGemini APIUpstage OCR

Key Features

AI Support Letter Auto-GenerationIntelligent Document Improvement SuggestionsInterview Question GenerationDocument Version Management & Comparison

Development Period

4–6 weeks
Visa Support Letter Automation Platform
Problem

The Problem with the Old Workflow

The existing process for drafting E-2 visa support letters at immigration law offices.
Inefficiencies and risks accumulated at every step.

Open tab files

Manually search 10–20 files

Paste into ChatGPT

Low output quality, hallucinations

Switch to Claude

Manually rewrite prompts each time

Manual case search

Dig through 100+ company files

Edit in separate tool

No inline editing

No version control

Cannot track change history

100+

Companies managed

10-20

Support letters per company

3-5h

Time per letter

30+

Files per person

Trial & Error

A Record of Iterations

Three key approaches taken before reaching the final solution.

ChatGPTStandalone use
Prompt

Write E-2 visa support letter for Korean restaurant investor...

Response

Dear USCIS Officer, I am writing to support the E-2 treaty investor visa application...

HallucinationLack of domain knowledge
E-2 visa legal requirements not met — rewrite required
Attempt 1

ChatGPT alone

Failed to reflect the nuances of legal documents. Frequent hallucinations. Insufficient E-2 visa domain knowledge.

Takeaway

Domain-specific prompts and references to actual approved cases are essential

Manual Case Search100+ companies
Case_001.pdfSearching…
Case_027.pdfSearching…
Case_043.pdfSimilar case?
Case_058.pdfSearching…
Case_091.pdfSearching…

30min+

Search time

Manual

Prompt repetition

Improved

Quality gains

Attempt 2

Claude + manual prompt iteration

Quality improved, but relevant cases still had to be searched manually every time. Prompts were rewritten from scratch each session.

Takeaway

Automatic similar-case retrieval (RAG) emerged as the critical challenge

Single LLM PipelineCost surge
OCR
LLM (full input)
Output
OCR raw text8,000 tokens
→ LLM input8,000 tokens
Context pollution tokens
Solution: Gemini summarisation layer reduces tokens by 30%
Attempt 3

Single LLM pipeline attempt

Feeding raw OCR text directly into the LLM wasted tokens and polluted the context window. Costs spiked.

Takeaway

Evolved into a multi-LLM architecture with a Gemini summarisation layer

Insight
Thekeyisfindingthemostrecentlyapprovedsupportletterandusingitasareference

Because company information changes frequently, basing a new letter on a letter approved two years ago is less effective than using the most recently approved letter in the same category. What was needed was not simple RAG but a hybrid search combining category filtering and recency ranking.

Architecture

Workflow Transformation

Do
Document upload
Te
Text extraction
OC
OCR compression
Ve
Vector conversion
Si
Similar case match
Dr
Draft letter
AI
AI improvements
Fi
Final letter

Detailed Comparison

A 1-to-1 mapping showing how each pain point in the old process was resolved

Before

Manually searching tab files → pasting into ChatGPT / Claude

After

4-step wizard: select visa type → bulk upload → OCR verification → auto-generation

Before

Manual case search (100+ companies, 10–20 letters each)

After

pgvector RAG: category filter + cosine similarity + recency ranking for automatic matching

Before

Editing in a separate tool, no inline editing

After

Inline editor + sidebar AI suggestion cards (one-click accept / reject)

Before

No version control, no change history

After

Version history + diff view + PDF / Word download

Before

Waiting for a colleague to review quality

After

AI review: grammar, legal terminology, and content enhancement suggestions with boolean apply / reject

Before

Separate manual creation of interview question sheets

After

Auto-generation of expected questions and model answers based on letter content

Before

Manual entry of DS-160 information (hand-extracted from documents)

After

Automatic DS-160 field mapping from OCR-extracted data

Product

4-Step Wizard

A step-by-step interface intuitive enough for non-developers. Sessions can be abandoned and resumed at any time.

01Step 1

Select Visa Type

Choose the visa type and sub-category: E-2 employee (new hire / transfer), E-2 investor, L-1, etc. The prompt and search scope are configured automatically based on the selected category.

02Step 2

Bulk Document Upload

Upload up to 7 document types at once via drag-and-drop. Upstage OCR automatically extracts text from PDF and DOC files.

03Step 3

Per-File OCR Verification

Review and correct the extracted text for each file. Gemini summarises key information, reducing token usage by 20–30%.

04Step 4

Letter Generation + Editor

Claude generates a support letter draft with the Top 3 similar cases automatically injected. Edit inline alongside AI suggestions.

Pipeline

Multi-LLM Pipeline

Combining each LLM's strengths to reduce cost while maximising quality.

UpstageOCR Extraction

Specialised in recognising PDF/DOC documents such as passports and income statements. High accuracy for extracting structured data from visa application documents.

GeminiOCR Summarisation

Cost-efficiently compresses lengthy OCR text. Reduces Claude input tokens by 30%+ while preserving key information.

ClaudeLetter Generation

Highest quality for legal document drafting. Enforces 8 domain-specific writing rules via system prompt.

OpenAIEmbedding + Suggestions

Cost-efficient vector generation with text-embedding-3-small. Also used for AI suggestions and interview question generation.

Impact

Results & Impact

Letter drafting time

80%
Before
3–5 hours
After
30 min–1 hour

Case search time

99%
Before
30 min+
After
2–3 sec

Manual edits

80%
Before
10–15 rounds
After
2–3 rounds

Version control

Before
None
After
Fully automated

4 LLMs

Multi-LLM pipeline

80%

Drafting time reduction

RAG

Automatic similar-case retrieval

0→∞

Version control system

Need a similar project? Get in touch with IMPAKERS.

Get a Free Consultation