AI for Everyone | Blog

AI is lying? No, it's your mistake. 5 principles of prompting for a lawyer

Written by Julius Tomeczek | Dec 3, 2025 6:56:42 AM

Has ChatGPT ever invented a non-existent case file reference for you? Or perhaps it wrote a justification that sounded smart but was legally gibberish? If so, I have a brutal but liberating truth for you: it's not the fault of artificial intelligence. It's the fault of your command. Welcome to the world of Prompt Engineering – the new "Latin" without which the modern lawyer will soon become professionally illiterate.

Frustration is growing in the legal community. After the first wave of delight with Generative Artificial Intelligence (GenAI), the stage of disappointment has arrived. I hear this at almost every training session I conduct for law firms: "Mr. Juliusz, this tool is dangerous. I asked for case law in a Swiss Franc mortgage case, and I got judgments from courts that don't exist."

The skeptics are right – AI can hallucinate. But they are wrong about the cause. They treat ChatGPT, Claude, or Gemini like a web search engine. They type in keywords and expect a precise result from a database. Meanwhile, an LLM (Large Language Model) is not a search engine. It is a probability engine. What you get out of it depends 100% on the quality of the instruction you provide.

In this article, we won't cover basics like "how to set up an account." We will go straight to engineering. As an AI trainer, I will show you why your prompts so far have been ineffective and teach you how to write ones that turn a "random content generator" into a precise legal assistant.

Here is the anatomy of a prompt that works.

Why "Talk like you would to a human" is the worst advice you've heard

Many guides suggest: "Write to AI as if you were speaking to a colleague." In the context of your work – a lawyer's work – this is a disastrous strategy. When you assign a task to a trainee, you are connected by years of shared context, legal culture, and unspoken rules. The trainee knows we don't cite repealed regulations. They know that a "short note" means one A4 page, not one sentence.

The language model doesn't know this. The model is a tabula rasa in the context of your specific case. If you tell it: "Write a payment demand for debtor X," the model has to guess:

  • In what tone? Aggressive or conciliatory?

  • On what legal basis?

  • What is the payment deadline?

  • Should it threaten court action or an entry in a debt register?

When the model has to guess, a process called hallucination is triggered. It fills the gaps with statistically most probable text. And in law, "statistically probable" rarely means "factually correct."

Prompt Engineering is the skill of reducing this uncertainty. It is the art of precisely defining the framework within which the AI can operate.

5 Pillars of an Effective Legal Prompt

To get a useful result, every prompt (command) you write must consist of five key elements. You can remember this scheme as R.C.T.C.F. (Role, Context, Task, Constraints, Format).

Pillar 1: Persona (Role)

By default, ChatGPT is a "helpful assistant." That's too general. In law, "helpful" often means "uncritical." You need an expert.

Assigning a role (so-called Role Prompting) changes the weights the model assigns to specific information in its neural network. If you tell it that it is a "criminal law specialist," it will be more inclined to use vocabulary from the Penal Code rather than the Civil Code.

Amateur Approach (No Role):


Write me...

Professional Approach (Role Prompting):


Act as an experienced legal advisor with 15 years of experience in handling construction processes, specializing in disputes based on FIDIC contract conditions. Your goal is the maximum protection of the General Contractor's interests.

See the difference? The model already knows it needs to be biased (in your favor) and use industry terminology.

Pillar 2: Context (Context is King)

This is the most important element, which is most often omitted. Lawyers are afraid to paste data into a web chat window (rightly so – I wrote about security and official recommendations in the previous article), so they write generalities. This is a mistake. You must provide context, but anonymized.

The model doesn't read your mind. It doesn't know that the "Client" is an elderly lady and the "Opponent" is a bank.

Weak Context:


The client has a problem with a lease agreement.

Good, Legal Context:


The client is a limited liability company renting 2000 m2 of office space in the center of Warsaw. The landlord (a large investment fund) charged contractual penalties for an alleged violation of the building regulations (noise during night hours). The client claims the office is empty at night. The agreement contains an arbitration clause.

Pillar 3: Task (Instruction)

Verbs matter. Words like "describe," "check," "see" are too soft for the model. Use operational verbs that force a specific thought process.

Instead of: "See if this contract is OK." Use: "Analyze the paragraph below for abusive clauses according to the Office of Competition and Consumer Protection (UOKiK) register. Bullet point every risk and propose a safer wording for the provision."

Pillar 4: Constraints

This is the safety brake. Here you tell the model what NOT to do. This is crucial in the fight against "fluff."

Examples of constraints for a lawyer:

  • "Do not use flowery language. Use a formal, dry, procedural style."

  • "Rely EXCLUSIVELY on the provided text fragment. Do not add facts outside the attachment."

  • "If you don't know the answer, write 'I DON'T KNOW' instead of inventing."

  • "Maximum answer length: 500 words."

Pillar 5: Format (Output)

Lawyers love structure. AI loves chaos (walls of text). If you don't define the output format, you'll get an essay.

Force a structure:

  • "Present the answer in a table with two columns: [Contract Clause] | [Legal Risk]."

  • "Divide the text into sections with headers and use bolding for the most important theses."

  • "Create a bulleted list."

Case Study: "Weak Prompt" vs. "Good Legal Prompt"

Theory is one thing, but let's see how it looks in practice. Let's assume we are analyzing a fragment of a contract for specific work (creating a website), in which the contractor excludes the statutory warranty.

Scenario A: Amateur Approach

The lawyer pastes a fragment of the contract and writes:


Is this provision beneficial for the ordering party? What should be changed?

What will AI do? It will generate general advice: "A provision excluding the statutory warranty may be unfavorable because you lose the right to complain. It is worth negotiating the restoration of the warranty." This is true, but it's a truism. Such an answer is worth zero dollars. Every first-year student knows this.

Scenario B: Professional Legal Approach (Prompt Engineering)

The lawyer applies the 5 Pillars method:


ROLE
Act as an attorney specializing in Intellectual Property law and IT. You represent the Ordering Party (a large e-commerce company).

CONTEXT We are analyzing a draft implementation agreement. The Contractor is attempting to completely exclude the statutory warranty (rękojmia), offering in exchange a 12-month guarantee on "Best Effort" terms. The project is critical to the Client's business.

TASK Conduct a critical risk analysis of excluding the statutory warranty in this specific context. Then, prepare 3 negotiation arguments for the Contractor as to why the statutory warranty must be restored (or replaced by a strong SLA).

CONSTRAINTS Do not write definitions of statutory warranty. Focus on business risks (lack of repair for critical errors). Do not use generalities.

FORMAT

  1. Risk Table.

  2. List of 3 negotiation arguments (benefit language for the Contractor).

  3. Proposal for the wording of a new clause (compromise clause).

What will AI do? It will provide a concrete strategy. It will point out that "Best Effort" with a guarantee is a trap. It will propose a clause where the warranty is capped by amount but not excluded. You get ready-made input for a negotiation email.

The difference? In the first case, AI was a search engine. In the second – a consultant.

Advanced Techniques: Chain of Thought and Few-Shot Prompting

If you master the 5 pillars above, you will be better than 90% of AI chat users. But if you want to enter the master level (and impress your law firm), you must learn two techniques: Chain of Thought and Few-Shot Prompting.

1. Chain of Thought

Language models often make logical errors if they try to answer "immediately." You can force the model to "think out loud."

Just add a magic phrase to the prompt:


Before providing the final answer, analyze this problem step by step. First list the premises, then the subsumption, and finally the conclusion.

Research shows that forcing the model to "write out" the problem drastically (often by several dozen percent) reduces the number of logical errors and hallucinations. This is ideal for analyzing case studies.

2. Few-Shot Prompting (Giving Examples)

This is the most powerful technique in the Prompt Engineer's arsenal. Instead of just describing what the model should do (Zero-Shot), show it.

If you want AI to write summaries of judgments in your specific style, paste two examples of your previous summaries into the prompt.


TASK
Summarize the judgment below.

EXAMPLE 1 Judgment Text: (...) Summary: The Supreme Court in the judgment of date X ruled that [Thesis]. Key for practice is that [Conclusion].

EXAMPLE 2 Judgment Text: (...) Summary: The Court of Appeal in Warsaw confirmed the line of jurisprudence, according to which [Thesis]. This means for us that [Conclusion].

YOUR TASK Judgment Text: [Paste new text here] Summary:

By giving examples (shots), you "calibrate" the model. It stops guessing the style – it copies it. This (Few-Shot Prompting) is the key to automating boring, repetitive tasks in a law firm.

Polish models on Polish turf. Why should you know Bielik?

Speaking of prompts, we cannot forget who we are talking to. Most lawyers use ChatGPT (OpenAI), Claude (Anthropic), or Gemini (Google). These models are trained mainly on English data. Yes, they speak Polish great, but their understanding of the nuances of Polish civil or criminal procedure can sometimes be "Western."

That is why an "Aspiring Technocrat" should pay attention to local solutions, such as Bielik.ai. It is a Polish, free language model, trained specifically on native texts of culture and law.

Why is this important? Because in complex doctrinal issues, a model fed on Polish textbooks may (though it doesn't have to) demonstrate greater linguistic intuition than a giant from California. It is worth testing the same prompts on different models to obtain the optimal result (so-called Model Benchmarking). Sometimes ChatGPT will write a better email to a client, but Bielik or Claude will handle the analysis of Polish case law better. And although in my course I focus on working with Google Gemini and NotebookLM, the prompt engineering techniques I teach there are universal, and you will successfully apply them in any other model.

Hallucinations are not a bug. They're a "Feature".

Finally, we must deal with the myth that hallucinations disqualify AI in legal work. Hallucination is nothing more than the model's creativity. When you ask AI to come up with a marketing slogan for a law firm, you want it to hallucinate (be creative). When you ask for a case file reference – you don't.

Your job as an operator is to control the temperature of this creativity.

  • Good prompt = low temperature (strict adherence to facts).

  • Bad prompt = high temperature (guessing).

If your AI is "inventing judgments," it means you allowed it creativity in a place where precision was required. You didn't set Constraints (Pillar 4) and you didn't provide Context (Pillar 2).

Prompt Engineering is the new Latin

Once, the barrier to entry into the legal profession was knowledge of Latin and access to expensive paper commentaries. Today, the barrier is becoming the ability to communicate effectively with algorithms.

A lawyer who writes: "Write a lawsuit," will always receive a product of lower quality than a lawyer who writes: "Acting as the plaintiff's attorney, draft the prayer for relief of a lawsuit for payment, taking into account the joint and several liability of defendants X and Y, basing the claim on Art. 415 of the Civil Code, with the following factual justification..."

The second lawyer will do the job in 15 minutes. The first will spend 3 hours correcting the nonsense generated by AI and finally conclude that "this tool is useless."

Don't be that first lawyer.

Prompt Engineering is a technical skill. You can learn it just like you learned to use legal research databases or Word. It's not magic – it's syntax.

If you feel like you're utilizing AI's potential at barely 10% and you're tired of fighting with a stubborn AI chatbot, I invite you to my world.

Do you want to stop guessing and gain full control? In the course "Prompt Engineering and NotebookLM for Lawyers" we don't theorize. This is not an academic lecture. It's a workshop.

  • After completing the course and filling out the survey, you will receive a PromptBook – a collection of all prompts used during the training (ready to copy).

  • You will see live how to apply Chain of Thought to analyze complex factual states.

  • You will learn how to turn many pages of PDF into a risk table with a single prompt.

Stop fighting the tool. Start managing it.

👉 Join the course: Prompt Engineering and NotebookLM for Lawyers

Important Note: The course is conducted exclusively in Polish.

PS. In the next (last) article of this series, I will show you something that will make you forget about "reading" case files. I'll show you how to "talk" to them, with 100% certainty that AI isn't making things up (thanks to the Grounding function). See you there!