A product proposal for an AI contract-review assistant aimed at flexible workers, developed by the TalentLink team for an AIGC innovation challenge.
19p
competition proposal
k=3
retrieved passages
AIGC
innovation challenge
01 / Overview
What this package actually contains.
LawGuard AI is the product concept and prototype developed by the TalentLink team for an AIGC innovation challenge. It reviews employment contracts for flexible workers, retrieves relevant legal context and returns risks, legal reasoning and suggested edits.
Objectives
01Identify unfair, ambiguous or incomplete contract clauses.
02Ground responses in a local labour-law knowledge base.
03Generate structured risk summaries and modification suggestions for non-lawyers.
Product mechanics
User surface, mechanism, automation.
The system is explained through its modules and the behaviour they enable.
Module01
Contract text
Pasted or uploaded agreement text.
Module02
Legal corpus
Labour-law and contract-reference documents.
Module03
Embeddings + FAISS
Vector retrieval over relevant legal passages.
Module04
RetrievalQA chain
Prompt combining question and retrieved context.
Module05
Risk report
Risks, legal basis, revisions and disclaimer.
02 / Package highlights
What this work demonstrates.
Combines market research, product design and an AI contract-analysis workflow.
Extends the TalentLink concept into employment-contract review and risk flagging.
Documents the team’s product thinking for a national computing competition.
03 / Mechanism
How the product works end to end.
01
Retrieval-augmented analysis
The prototype embeds the legal corpus and retrieves the three most relevant passages for each contract question. The retrieved context is inserted into a structured prompt that asks for risk identification, legal basis and concrete edits.
02
Prompt structure
The prompt separates three review layers: whole-contract completeness, party capability and substantive fairness. It also requires a disclaimer and instructs the model to ignore retrieved context when it is irrelevant to the question.
Risk items are returned as a structured list.
Each risk request includes legal reasoning and a modification suggestion.
A fallback path answers non-legal questions without pretending to provide legal analysis.
03
Product scope
The competition proposal adds market analysis and product positioning around flexible work. The technical prototype focuses on contract review and risk explanation, not legal representation or final adjudication.
04 / Key code
Key product and contract logic.
Only verified source excerpts and pseudocode taken from the project papers are shown.
Verified project codePython
FAISS retrieval setup
Original Python excerpt from the LawGuard prototype.
Original prompt excerpt defining the required analysis format.
analysis.py
Analyse the contract using the retrieved context.
1. Identify potential legal risks.
2. State the relevant legal basis.
3. Propose concrete contract revisions.
4. Provide risk-control suggestions.
Return the result in this structure:
### Identified risks
- ...
### Legal basis and analysis
- ...
### Suggested revisions
- ...
If the question is outside labour law, contract or
flexible-work topics, ignore the retrieved context
and answer normally.
Delivery notes
The prototype uses a local legal corpus rather than relying only on model memory.
The output format is designed for a non-lawyer reviewing a contract.
Credentials are loaded through environment variables in the public source archive.
Limitations / next steps
The system is not a substitute for qualified legal advice.
Legal RAG requires versioned statutes, citation validation and prompt-injection defences.
05 / Downloads
Files in this folder.
Open the original report, presentation or source archive. PDF cover pages with private details were removed.