Debugging a Multi-Step LLM Workflow for Contract Clause Risk Triage
You are rolling out an internal LLM assistant for Legal Ops to triage vendor contract clauses into three labels: (A) "standard/low risk", (B) "needs legal review", (C) "reject". The assistant must also produce a short justification that can be audited. In a pilot, you observe two recurring failures: (1) on complex clauses, the model gives confident but wrong labels unless it is guided through intermediate reasoning; (2) when you add a simple instruction like "Let’s think step by step," the model often produces a long rationale but sometimes forgets to output a clear final label.
You are not allowed to fine-tune the model. You can only change the prompting workflow and the content placed in the prompt. You have a strict context window budget, so you can include at most ONE worked example in the prompt, and you must keep the number of model calls per clause to no more than 3.
Case: A new clause says: "Vendor may use Customer Data to improve its services and may share Customer Data with affiliates and subcontractors for that purpose. Customer may opt out of data sharing by emailing support within 10 days of signing." Your policy requires: (i) no sharing of Customer Data with third parties for model training/service improvement unless explicitly prohibited or strongly constrained; (ii) opt-out mechanisms are considered insufficient for sensitive data; (iii) subcontractor access must be tightly limited.
Design a prompting workflow (describe the sequence of prompts/calls and what each prompt contains) that uses in-context learning, problem decomposition/least-to-most prompting, chain-of-thought (including zero-shot CoT where appropriate), and self-refinement to reduce both failure modes while staying within the constraints. Your answer must explain how the techniques interact (e.g., why you place a worked example where you do, how you decompose the decision, how you ensure a final label is always produced, and how critique/revision is used without exceeding 3 calls).
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Ch.3 Prompting - Foundations of Large Language Models
Ch.5 Inference - Foundations of Large Language Models
Ch.1 Pre-training - Foundations of Large Language Models
Related
Application of COT Prompting on GSM8K Benchmark
Structuring Logical Reasoning Steps for Demonstrations
Zero-Shot Chain-of-Thought (COT) Prompting
Application of CoT to Algebraic Calculation Problems
Benefits of Chain-of-Thought (CoT) Prompting
Incomplete Answers from Zero-Shot CoT Prompts
Chain-of-Thought as a Search Process
Supervising Intermediate Reasoning Steps for LLM Alignment
Limitations of Simple Chain-of-Thought Prompting
Creating a CoT Prompt by Incorporating Reasoning Steps
Alternative Trigger Phrases for Zero-Shot CoT Prompting
Incomplete Answers as a Potential Issue in Zero-Shot CoT Prompting
A developer is trying to improve a language model's ability to solve multi-step word problems. They compare two prompting strategies.
Strategy 1: Provide the model with a new word problem and ask for the final answer directly.
Strategy 2: Provide the model with a new word problem, but first show it an example of a similar problem where the solution is explicitly broken down into logical, sequential steps before reaching the final conclusion.
Why is Strategy 2 generally more effective
Improving a Prompt for a Multi-Step Problem
Few-Shot Chain-of-Thought (CoT) Prompting
Practical Limitations of Chain-of-Thought Prompting
The primary benefit of a prompting technique that demonstrates a step-by-step reasoning process is that it permanently modifies the language model's internal weights, making it inherently better at solving similar problems in the future, even without the detailed prompt.
Designing a Prompting Workflow for a High-Stakes, Multi-Step Task
Choosing and Justifying a Prompting Strategy Under Context and Quality Constraints
Diagnosing and Redesigning a Prompting Approach for a Decomposed Workflow
Stabilizing an LLM Workflow for Multi-Step Policy Compliance Decisions
Debugging a Multi-Step LLM Workflow for Contract Clause Risk Triage
Designing a Robust Prompting Workflow for Multi-Step Root-Cause Analysis with Limited Examples
You’re building an internal LLM assistant to help ...
Your team is rolling out an internal LLM assistant...
You’re leading an internal enablement team buildin...
You’re building an internal LLM workflow to produc...
Example of One-Shot Chain-of-Thought (COT) Prompting
Problem-Solving Scenarios for Chain-of-Thought Prompting
Self-Consistency Method
Sub-problem Generation in Least-to-Most Prompting
Improving Least-to-Most Prompting with Advanced Techniques
Improving Problem Decomposition in Least-to-Most Prompting
An AI developer needs a large language model to solve a complex, multi-step logic puzzle that requires deducing a final answer from a series of interdependent clues. Initial attempts to solve the puzzle by providing the full puzzle and a few examples of other solved puzzles have consistently failed. Which of the following prompting strategies is the most effective next step, and why?
Analyzing a Problem-Solving Approach
A language model is tasked with solving the following logic puzzle: 'Sarah, David, and Emily are a doctor, a lawyer, and an engineer. The doctor is Emily's sister. David is not the lawyer.' To solve this complex problem, it is broken down into a series of simpler, sequential sub-problems. Arrange the following sub-problems in the correct logical order that builds towards the final solution.
Your team is rolling out an internal LLM assistant...
You’re building an internal LLM workflow to produc...
You’re building an internal LLM assistant to help ...
You’re leading an internal enablement team buildin...
Choosing and Justifying a Prompting Strategy Under Context and Quality Constraints
Designing a Prompting Workflow for a High-Stakes, Multi-Step Task
Diagnosing and Redesigning a Prompting Approach for a Decomposed Workflow
Stabilizing an LLM Workflow for Multi-Step Policy Compliance Decisions
Debugging a Multi-Step LLM Workflow for Contract Clause Risk Triage
Designing a Robust Prompting Workflow for Multi-Step Root-Cause Analysis with Limited Examples
Example of Final Problem Solving in Least-to-Most Prompting
Example of Self-Refinement in Machine Translation
Three-Step Framework for Self-Refinement in LLMs
Ideal Self-Refinement without Additional Training