Your Digital Lawyer, Always on Duty
Initializing Secure Chambers
Category: Legal Tech
Published: 2026-08-02
Estimated read time: 12 minutes
Published by Al Wakeelo. An individual legal reviewer is not recorded for this guide. Verify the current law and relevant Gazette notifications before relying on it.
Category: Legal Tech
Summary: The ultimate guide on structuring system prompts, introducing legal templates, and enforcing strict jurisdictional boundaries for AI outputs.
The legal profession in Pakistan is undergoing a quiet revolution. From the marble corridors of the Supreme Court of Pakistan in Islamabad to the bustling District Courts in Lahore, Karachi, and Peshawar, artificial intelligence (AI) is beginning to assist lawyers, judges, and legal researchers. However, AI is only as good as the instructions it receives. This is where legal prompt engineering becomes indispensable.
Legal prompt engineering is the art and science of crafting precise, structured instructions for AI models to generate legally accurate, jurisdiction-specific, and procedurally sound content. For Pakistani legal practitioners, mastering this skill ensures that AI outputs comply with the Contract Act 1872, the Civil Procedure Code (CPC) 1908, the Specific Relief Act 1877, the Registration Act 1908, and other foundational statutes. This guide will walk you through the essential techniques to harness AI for precise legal drafting while respecting Pakistani legal boundaries.
Pakistani law is a unique blend of English common law, Islamic jurisprudence, and local statutory enactments. AI models trained on global datasets often produce outputs that are irrelevant or even dangerous when applied to Pakistan's legal framework. For instance, a generic AI prompt for a "breach of contract" notice might reference the Indian Contract Act 1872 or the UK's Unfair Contract Terms Act 1977, both of which are inapplicable in Pakistan.
By engineering prompts that explicitly reference Pakistani statutes, case law from the Supreme Court of Pakistan, and procedural rules from the CPC 1908, you can transform AI from a liability into a powerful drafting assistant. This is not just about convenience—it is about professional responsibility. Under the Pakistan Legal Practitioners and Bar Councils Act 1973, lawyers owe a duty of competence to their clients. Using AI without proper prompt engineering could constitute professional negligence.
A system prompt is the foundational instruction that sets the AI's behavior, tone, and knowledge boundaries. For legal work, this prompt must be meticulously crafted. Below is a template you can adapt.
You are a senior Pakistani legal expert with 20 years of experience in civil, commercial, and constitutional law. You are licensed to practice before the Supreme Court of Pakistan, all High Courts, and District Courts. Your knowledge is strictly limited to the laws of Pakistan, including but not limited to:
- The Contract Act 1872 (Act IX of 1872)
- The Civil Procedure Code 1908 (Act V of 1908)
- The Specific Relief Act 1877 (Act I of 1877)
- The Registration Act 1908 (Act XVI of 1908)
- The Stamp Act 1899 (Act II of 1899)
- The Limitation Act 1908 (Act IX of 1908)
- The Qanun-e-Shahadat Order 1984 (President's Order No. 10 of 1984)
- The Transfer of Property Act 1882 (Act IV of 1882)
You must:
1. Cite specific sections, articles, or orders of Pakistani law in every response.
2. Reference relevant judgments from the Supreme Court of Pakistan and provincial High Courts where applicable.
3. Use the correct nomenclature for courts (e.g., "Senior Civil Judge," "Additional District Judge," "High Court").
4. Apply the correct limitation periods under the Limitation Act 1908.
5. Calculate court fees and stamp duties according to the Court Fees Act 1870 and the Stamp Act 1899.
6. Never reference foreign laws unless explicitly asked for comparative analysis.
7. Always include a disclaimer that your output is for informational purposes and does not constitute legal advice.
If you are unsure about a specific Pakistani legal provision, state your uncertainty clearly and suggest consulting the relevant statute or a practicing lawyer.
This prompt does three critical things:
Once your system prompt is set, you can use user prompts to generate specific legal documents. The key is to provide a structured template within the prompt. Below are examples for common Pakistani legal documents.
User Prompt:
Using the system instructions above, draft a legal notice for breach of a service agreement governed by the Contract Act 1872. The notice must be addressed to a party in Lahore. Include the following details:
- Client name: M/s Al-Barkat Traders
- Opposing party: M/s Zainab Enterprises
- Contract date: 15 January 2024
- Breach: Failure to deliver 500 bales of cotton by 30 June 2024
- Relief sought: Specific performance or damages of PKR 5,000,000
Structure the notice as follows:
1. Heading with "Before the Civil Court, Lahore" (for potential litigation)
2. Parties' details with complete addresses
3. Recitals summarizing the contract
4. Details of the breach
5. Legal basis under Sections 73 and 74 of the Contract Act 1872
6. Demand for performance or compensation
7. Notice of legal action if not complied with within 30 days
8. Signature block with advocate's details
Also calculate the court fee for a suit for specific performance under Article 17 of the Court Fees Act 1870, assuming the value of the cotton is PKR 5,000,000.
AI Output (Excerpt):
NOTICE OF BREACH OF CONTRACT
BEFORE THE CIVIL COURT, LAHORE
In the matter of:
M/s Al-Barkat Traders, having its registered office at 12-Main Boulevard, Gulberg, Lahore
... (Claimant)
Versus
M/s Zainab Enterprises, having its registered office at 45-Davis Road, Lahore
... (Respondent)
RECITALS:
1. On 15 January 2024, the parties entered into a Service Agreement for the supply of 500 bales of cotton...
...
LEGAL BASIS:
Under Section 73 of the Contract Act 1872, the Claimant is entitled to compensation for any loss or damage caused by the breach. Section 74 provides for compensation for breach of contract where a sum is named in the contract as payable in case of breach...
...
COURT FEE CALCULATION:
Under Article 17 of the Court Fees Act 1870, for a suit for specific performance, the court fee is ad valorem. For a claim of PKR 5,000,000, the fee is PKR 5,000,000 x 1% = PKR 50,000 (subject to the maximum prescribed by the relevant High Court rules).
User Prompt:
Draft a plaint for a suit for recovery of money under Order VII of the Civil Procedure Code 1908. Use the following facts:
- Plaintiff: Ahmed & Sons, a partnership firm registered under the Partnership Act 1932
- Defendant: Rashid Builders, a sole proprietorship
- Cause of action: Loan of PKR 2,000,000 given on 1 March 2023, repayable with 12% interest per annum. Defendant defaulted on 1 September 2023.
- Jurisdiction: Lahore High Court (original civil jurisdiction, value exceeding PKR 1,000,000)
Include:
1. Proper cause title with court name
2. Description of parties
3. Facts constituting the cause of action
4. Grounds for jurisdiction (Section 15 CPC 1908)
5. Limitation period (Article 57 of the Limitation Act 1908 – three years for a loan)
6. Valuation for court fees and jurisdiction
7. Prayer clause for decree of PKR 2,000,000 plus interest at 12% per annum from 1 September 2023 until payment
8. Verification and affidavit under Order VI Rule 15 CPC 1908
AI Output (Excerpt):
IN THE LAHORE HIGH COURT, LAHORE
(Original Civil Jurisdiction)
Suit No. _____ of 2024
Ahmed & Sons, a partnership firm registered under the Partnership Act 1932, having its principal place of business at 10-Mall Road, Lahore.
... (Plaintiff)
Versus
Rashid Builders, a sole proprietorship, having its office at 22-The Mall, Rawalpindi.
... (Defendant)
PLAINT
1. The Plaintiff states that on 1 March 2023, the Defendant borrowed a sum of PKR 2,000,000 from the Plaintiff...
...
GROUNDS FOR JURISDICTION:
The cause of action arose within the territorial jurisdiction of this Honourable Court as the loan was disbursed in Lahore. The value of the suit exceeds PKR 1,000,000, and this Court has pecuniary jurisdiction under Section 15 of the Civil Procedure Code 1908.
LIMITATION:
The suit is within time under Article 57 of the Limitation Act 1908, which prescribes a period of three years for a loan. The cause of action arose on 1 September 2023, and the suit is being filed on [date], which is within the limitation period.
PRAYER:
It is, therefore, prayed that this Honourable Court may be pleased to:
a) Pass a decree in favour of the Plaintiff and against the Defendant for PKR 2,000,000;
b) Award interest at the rate of 12% per annum from 1 September 2023 until the date of payment;
c) Award costs of the suit; and
d) Grant any other relief deemed fit.
VERIFICATION:
I, [Name], partner of Ahmed & Sons, do hereby verify that the contents of this plaint are true to my knowledge and belief. Verified at Lahore on this [date].
[Signature]
[Advocate's Name and Address]
One of the biggest risks in legal AI is the "jurisdiction drift"—where the AI inadvertently applies foreign law. To prevent this, your prompts must include explicit boundary enforcement mechanisms.
Negative Prompting: Explicitly tell the AI what not to do.
Citation Verification: Instruct the AI to provide the exact section number and act name.
Case Law Anchoring: Require the AI to reference specific Pakistani judgments.
Procedural Precision: Force the AI to use correct procedural terminology.
You are strictly prohibited from referencing any law, statute, or case from outside Pakistan. If you are asked about a legal concept that does not exist in Pakistani law (e.g., "consideration" under English law), you must state: "This concept is not recognized under Pakistani law. Under the Contract Act 1872, consideration is defined in Section 2(d) as follows..."
If you are unsure about a Pakistani legal provision, say: "I am not certain about this specific provision under Pakistani law. Please consult the [relevant act] or a practicing advocate of the High Court."
Always end your response with: "This information is for educational purposes only and does not constitute legal advice. You should consult a qualified Pakistani lawyer for advice on your specific matter."
Use this checklist every time you craft a legal prompt for AI.
Legal prompt engineering is not just for drafting. It can assist in:
Legal prompt engineering is a critical skill for the modern Pakistani lawyer. By structuring system prompts with precise jurisdictional boundaries, introducing templates grounded in Pakistani statutes, and enforcing strict citation rules, you can leverage AI to enhance your drafting efficiency without compromising legal accuracy. Remember, AI is a tool—not a replacement for professional judgment. Always review AI outputs against the original statutes and consult the latest case law from the Supreme Court of Pakistan and your provincial High Court.
As the legal tech landscape in Pakistan evolves, those who master prompt engineering will have a distinct advantage. Start today by crafting your first system prompt, test it with a simple contract notice, and refine it based on your experience. The future of Pakistani legal practice is here—and it is powered by precise, well-engineered prompts.
Disclaimer: This article is for educational purposes only and does not constitute legal advice. Laws and procedures may change. Always consult a qualified Pakistani lawyer for advice on specific legal matters.
These official research portals are starting points, not confirmation that each statement has been independently reviewed.