Skip to content
ZK
ZAIN KHALIL KHAN
PORTFOLIO
All projects

Interactive build

The Forge | AI-Powered Document Intelligence

AI platform that analyzes, creates, and secures legal and financial documents. Highlights contract risks, generates agreements with built-in security checks, and auto-fills US tax forms including nonresident alien forms.

Live demo readyLLM + OCR
LLMOCRTax AutomationContract AnalysisFull StackCase study / interactive demo

Case study

From problem to working system

Problem

Legal and financial documents are difficult to analyze safely because extraction, risk review, generation, and form completion require different workflows.

My role

AI product engineer and full-stack developer

Solution

AI platform that analyzes, creates, and secures legal and financial documents. Highlights contract risks, generates agreements with built-in security checks, and auto-fills US tax forms including nonresident alien forms.

Architecture

The implementation combines the following technologies and system concerns.

LLMOCRTax AutomationContract AnalysisFull Stack

How it was built

  • Built a document intelligence platform that analyses, generates, and secures legal and financial documents through one pipeline.
  • Generated agreements from templates with built-in security checks, so a generated document cannot silently drop a required clause.

Security decisions

  • Built a document intelligence platform that analyses, generates, and secures legal and financial documents through one pipeline.
  • Flagged contract risk by clause type, surfacing indemnity, termination, auto-renewal, and liability-cap language with the exact excerpt quoted.
  • Generated agreements from templates with built-in security checks, so a generated document cannot silently drop a required clause.

Major challenges

  • Combined OCR with LLM reasoning so scanned contracts and native PDFs both reduce to the same structured clause model.
  • Flagged contract risk by clause type, surfacing indemnity, termination, auto-renewal, and liability-cap language with the exact excerpt quoted.
  • Automated US tax form population including nonresident alien forms, where the rules differ from the resident case and are the most common source of filing error.

Verified evidence

Results and measurable impact

  • Combined OCR with LLM reasoning so scanned contracts and native PDFs both reduce to the same structured clause model.
  • Automated US tax form population including nonresident alien forms, where the rules differ from the resident case and are the most common source of filing error.
  • Generated agreements from templates with built-in security checks, so a generated document cannot silently drop a required clause.

Screenshots and access

Product view

The Forge | AI-Powered Document Intelligence interface

Interactive Demo

A scoped, fully functional recreation of this project's core feature runs below, live in your browser. Reset it, resize it, or expand it to full screen.

Forge

Document generation and review

ForgeWorkspace1 updates
The ForgeDOCUMENT OPERATIONS

ACTIVE MATTER · DOC-8841

Documents, inspected like code.

Analyzes, drafts, and secures legal and financial documents. Detection is real; the plain-English summaries are Simulated.

Clauses scanned

6

Risks found

6

Risk score

100

This Mutual Non-Disclosure Agreement is entered into between Meridian Analytics LLC and the undersigned Client. The Parties wish to explore a business relationship and may disclose confidential business, technical, and financial information.
100risk

3 high · 3 medium
clauses flagged

Findings

  • high · Uncapped liability

    Open-ended liability exposes you to unbounded financial risk for any connected claim, even the other party's own negligence.

  • high · One-sided indemnity

    A one-way hold-harmless clause makes you pay for the other side's losses. Push to make indemnity mutual and capped.

  • high · Missing termination clause(document-wide)

    No termination-for-convenience language was found. Without an exit, you cannot leave the agreement before its term ends.

  • medium · Auto-renewal trap

    The contract silently renews unless notice lands inside a narrow window. Miss it and you are locked in for another full term.

  • medium · Non-compete restraint

    A broad non-compete can bar you from your own line of work. Narrow the scope, geography, and duration or strike it.

  • medium · Jury / class-action waiver

    Forced arbitration plus a jury or class-action waiver strips your strongest dispute leverage and usually favors the drafter.

Click a highlighted clause above to isolate its finding.

Zain Khalil Khan