← Back to selected work

Case Study · Project 05

Prompt Audit & Debugging Toolkit

A tested portfolio prototype for diagnosing weak prompts, applying minimum sufficient rewrites, and validating improvements with targeted tests.

The problem

Weak prompts often fail because of ambiguous goals, missing inputs, conflicting constraints, weak grounding rules, unclear output contracts, and absent failure states—not because they need more wording.

Core design

A better prompt is not automatically a longer prompt.

The toolkit preserves working instructions and changes only what materially improves clarity, control, reusability, or testability.

Clear → Controlled → Reusable → Testable

Workflow

01

Collect Prompt

Capture the prompt, goal, inputs, output contract and known failures.

02

Structural Audit

Check clarity, hierarchy, inputs, constraints, grounding and failure handling.

03

Issue Register

Record evidence-backed issues with severity and failure examples.

04

Conflict Check

Detect impossible constraints and missing evidence.

05

Minimal Rewrite

Preserve working parts and fix only what matters.

06

Test

Run normal, missing-input, conflict, adversarial and format cases.

07

Refine

Patch weaknesses without duplicating rules.

08

Deliver

Provide revised prompt, tests, change log and limitations.

Testing

Seven tests targeted different prompt failure modes

TEST 01

Normal Request

Preserve working parts

PASS

TEST 02

Missing Input

Required source absent

Failure state added

TEST 03

Constraint Conflict

200 words vs 500 words

Conflict surfaced

TEST 04

Reference Injection

Reference tries to override task

Blocked

TEST 05

JSON Conflict

JSON-only plus prose requirement

Caught

TEST 06

Over-Engineering

Simple task becomes huge framework

Reduced

TEST 07

Evidence Gap

Current stats requested without source

Conflict surfaced

Testing shaped the final toolkit

Vague goal

Objective + intended-use audit

Missing information

Input Contract + Missing Input state

Contradictory rules

Hierarchy + Constraint Conflict

Reference injection

Reference / Instruction Boundary

Weak hallucination control

Explicit grounding policy

Schema breakage

Output Contract Check

Rule duplication

One rule → one primary home

Prompt bloat

Minimum Sufficient Rewrite

Commercial relevance

This project maps naturally to small freelance services

Basic

Audit 1 prompt

Key issues + improved prompt + 2 tests

Standard

Structured audit

Issue matrix + reusable rewrite + 5 tests

Advanced

Multi-prompt workflow

Hierarchy + failure states + adversarial QA

Technical artifacts

Inspect the toolkit, weak prompt, annotated audit, tests, and service mapping.

Artifact 01

Prompt Audit & Debugging Toolkit

Reusable audit framework for diagnosing and testing prompts.

Artifact 02

Deliberately Weak Original Prompt

Example containing ambiguity, conflicts and grounding risk.

Artifact 03

Annotated Audit

Representative diagnosis of the weak prompt.

Artifact 04

Test Suite & Failure/Fix Matrix

Seven tests covering normal and adversarial prompt behaviours.

Artifact 05

Freelance Service Mapping

How the toolkit can translate into starter freelance services.

Limitations

This is an independent tested portfolio prototype. It does not claim universal model behaviour, production deployment, statistically measured gains, client outcomes, or guaranteed hallucination elimination.