Representative ClauseGuard contract review workspace with highlighted clauses and review cards
Representative concept preview
Overview

ClauseGuard AI is a self-directed product concept for independent workers who need a faster first pass over contract language before deciding whether to seek professional legal advice. The system is designed to identify potentially risky terms and translate them into plain, actionable review prompts.

Important boundary: this is a risk-review prototype, not a replacement for legal advice. The benchmark language below describes a target, not a measured production result.

Problem and users

Freelancers, solo consultants, and small agencies often review payment terms, scope, intellectual property, non-competes, and liability clauses without a dedicated legal team. The product question is how to reduce the effort of finding what deserves closer human attention without pretending that a model can make the final legal judgment.

My responsibilities

My work covers product framing, the system architecture, the risk-scoring approach, retrieval design, structured-output constraints, and the planned workflow around document processing and review.

Solution and workflow

The proposed pipeline validates an uploaded document, extracts and chunks its contents, retrieves relevant reference rubrics, asks the model for structured analysis, calculates a review signal, and presents highlighted risk cards for a human to inspect.

Validate
Check file type and isolate untrusted content
Retrieve
Find relevant rubric examples
Analyze
Return structured clause findings
Review
Human checks before acting
Key technical decisions
Grounding
Gemini + pgvector + RAG

Retrieve reference examples before generation instead of relying on an ungrounded answer.

Determinism
Structured JSON output

Validate a known shape before mapping findings into stored risk data or UI cards.

Reliability
Async orchestration

Move slow document processing into an event-driven workflow rather than blocking the request path.

Safety
Validation and review

Treat uploads as untrusted input and keep a human checkpoint before a finding is acted on.

Target benchmark
~4 hoursmanual first-pass review · illustrative baseline
< 60 sectarget first-pass analysis · not yet measured
Current scope
DESIGN
Foundation, file processing, AI pipeline, and risk-engine design
The architecture and sprint plan are documented; implementation is still in progress.
In progress
NEXT
Evaluation, dashboard, n8n automation, and polish
The next proof needed is a representative test set, error analysis, UI walkthrough, and deployment evidence.
Planned
Result and limitations

The demonstrated capability is a considered architecture for grounded, structured, reviewable contract analysis. I am not claiming legal accuracy, production adoption, or a measured reduction in review time yet. A finished version should include test cases, false-positive analysis, document-size limits, latency measurements, and a clear legal disclaimer.

Context and goals

A prototype for making document review more structured and more careful.

ClauseGuard AI is a self-directed technology project for freelancers and small agencies. Its purpose is to help a person find clauses that deserve attention before seeking professional advice, not to make a legal decision.

01 · Ingest
Validate uploaded documents

Treat files and extracted content as untrusted input at the system boundary.

02 · Ground
Retrieve relevant references

Use pgvector and retrieval to give analysis a reference context.

03 · Structure
Return reviewable findings

Constrain model output so findings can be validated before they reach the interface.

04 · Review
Keep a human checkpoint

Present signals and explanations for inspection rather than authoritative conclusions.

Challenges, limitations, and lessons

Reliability matters more than making the model sound confident.

  • Output consistency: structured JSON and validation are needed before findings become stored data or UI cards.
  • Processing time: document work is better suited to asynchronous orchestration than a single blocking request.
  • Legal boundary: the system needs representative evaluation, false-positive analysis, document-size limits, and a clear disclaimer before it can be treated as more than a prototype.
Technical outcome: the project demonstrates a grounded, reviewable architecture for AI-assisted document analysis. Legal accuracy, production adoption, and the illustrative time target remain unmeasured.
Explore the engineering

Interested in reliable AI workflows-

See the broader patterns behind retrieval, structured output, and human checkpoints.

Read the architecture notes