Back to Home

Zero Shot Errors in Extracting Requirements from NPA

The article analyzes problems of Zero Shot prompting in extracting system requirements from normative acts. 7 key errors are described, recommendations on decomposition and chain-of-thought for legal tech. Useful for middle/senior developers.

Zero Shot Fails on Laws: 7 Errors
Advertisement 728x90

Why Zero-Shot Prompting Fails for Extracting Requirements from Legal Texts

Zero-shot prompting in LLMs for pulling requirements from legal regulations creates a false sense of a finished product. The model spits out a structured list of phrases like "the system must," but these aren't true requirements—they're just rephrased rules. This approach overlooks the multi-step nature of analysis: from identifying roles and conditions to tracing back to sources.

The task demands breaking it down into stages—spotting subjects, classifying rules, checking for completeness. A single prompt misses the subtleties of legal language: passive voice, exceptions, cross-references.

Why Legal Texts Aren't Technical Specs

Regulations outline a legal landscape, not a specific system. They contain four layers of info:

Google AdInline article slot
  • Definitions of objects and statuses (e.g., simple electronic signatures as codes or passwords under Federal Law 63-FZ);
  • Rules for participant actions;
  • Conditions, limits, exceptions;
  • Consequences and references to other rules.

Zero-shot blurs these distinctions, treating everything as functions. The output looks engineering-ready but isn't tied to your project: it's unclear who's doing what, where it's implemented, or under what conditions.

For mid-to-senior developers, it's crucial to get this: without decomposition, LLMs mash up definitions with constraints, turning passive phrases ("access must be restricted") into unprovable interpretations.

Common Pitfalls of Zero-Shot in Legal Extraction

The model ignores project context. Key errors include:

Google AdInline article slot
  • No Subject Selection: It lumps rules for all roles (user, operator, authority) into one list, ignoring your system's focus.
  • Mixing Rule Types: Definitions become requirements; limits turn into features.
  • Passive Voice Without Actor: "Information must be provided" doesn't specify who initiates, verifies, or logs it.
  • Blanket 'System Must' Phrasing: Misses data handling, audits, role models, external dependencies.
  • No Gap Analysis: Can't spot missed rules, exceptions, or roles.
  • Weak Traceability: Citing an article isn't explaining how a snippet becomes a requirement.
  • Ignoring Multi-System Impact: One regulation spawns client apps, backends, audit modules—the model doesn't differentiate.

Test quality: Can you answer "who, what, where in the system?" No? It's raw material, not requirements.

Challenges of Legal Texts for LLMs

Extracting info from legal docs is tough due to long contexts, jargon, and scattered structures. Reviews from OpenAI and Anthropic recommend chain-of-thought, quality criteria, and step-by-step analysis over zero-shot for these tasks.

Mistakes are costly: a missed check means flawed architecture and legal risks.

Google AdInline article slot

When Zero-Shot Actually Works

Limit it to initial scouting:

  • Quick doc overview;
  • Rough entity map;
  • Scenario hypotheses;
  • Domain familiarization.

Then iterate: refine prompts, verify, trace.

Key Takeaways:

  • Zero-shot gives a plausible draft, not requirements—decompose the task.
  • Always pin down subject, conditions, rule type for traceability.
  • Check completeness: what's missing, which exceptions ignored?
  • For legal tech, use chain-of-thought and multi-step prompting.
  • One regulation = multiple systems: define automation boundaries upfront.

In CI/CD: Integrate LLMs with validation (benchmark comparisons, expert review) to cut compliance risks.

— Editorial Team

Advertisement 728x90

Read Next