Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Getting Started with AI for VLSI Engineers5
  • Just Enough AI: Models and Context15
  • Prompting13
    • Anatomy of a Prompt
    • Examples and Reasoning
    • Prompt Debugging
      • Diagnose the Failure First
      • Change One Thing at a Time
      • Keep a Small Set of Test Prompts
      • A Prompt Regression Harness
  • Trust and Verification14
  • Using AI for Engineering Work17
  • Engineering Walkthroughs7
  • Practical Foundations for AI Workflows4
  • Engineering Data5
  • Retrieval-Augmented Generation6
  • Agents and Tool Use18
  • Agent Design8
  • MCP and Skills6
  • Multi-Agent Design6
  • Practical Capstone6
  • Tokens, Cost and Latency12
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹Prompt Debugging
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Prompting
  4. Prompt Debugging
  5. Keep a Small Set of Test Prompts

Asking Clearly · Beginner to Intermediate

Keep a Small Set of Test Prompts

Build test prompts with checkable properties, exact chain arithmetic, and security properties.

On this page

    Cases own properties, not strings

    A test prompt owns its input plus a list of expected properties. Properties describe the reply, such as its shape or a value it must contain.

    Properties survive rephrasing while exact strings do not. Wording varies by model and by run, so the set checks what must hold.

    Kinds of properties

    Four property kinds cover most prompt work. Each one is cheap to check by script.

    Property

    Checks

    Example

    Contains

    A required token or value is present.

    Reply names the 8-bit width.

    Shape

    Line count, bullet prefix, or key set matches.

    Reply has 3 steps or both required JSON keys (named fields).

    Excludes

    A forbidden token is absent.

    Reply never repeats the credential marker.

    Starts with

    The reply opens in the expected form.

    Reply opens with STEP 1.

    Chains multiply misses

    Multi-step prompts chain their steps, so each step needs its own property. The arithmetic below uses stated example rates with independent steps.

    plaintext
    1
    2
    3
    4
    5
    assume three steps, each 0.9, independent (stated example):
    chain = 0.9 x 0.9 x 0.9 = 0.729 = 72.9%
    raise the first step to 0.99:
    chain = 0.99 x 0.9 x 0.9 = 0.8019 = 80.19%
    each step needs its own property: misses multiply

    Security properties

    Ask only for the data the task needs, and keep secrets out of prompts; proprietary IP goes only to an approved deployment for its data class. Least privilege applies to prompt content too.

    Treat files and logs as untrusted input, since injected instructions can arrive through them. Risky actions need human approval regardless of what the reply claims.

    The excludes property enforces this in the set. A fake credential marker in the prompt must never appear in the reply.

    Common mistakes

    Common pitfall

    Matching exact reply strings. Wording varies by model and run, so exact matches go red on good replies; check properties instead.

    Interview

    Likely probes: property kinds and why chains need per-step checks.

    • Contains, shape, excludes, and starts-with cover most prompt work.

    • Chain rates multiply, so 0.9 cubed is 0.729 and each step needs a check.

    • Excludes properties keep fake credential markers out of replies.

    Check yourself A check requires one exact sentence, and a later run keeps the facts but changes the wording. What breaks?

    The check goes red on a correct reply. Exact strings are brittle because wording varies, so check properties instead.

    Check yourself Three steps each succeed with probability 0.9. What is the chain rate, and what does it say about per-step checks?

    0.9 cubed is 0.729, or 72.9 percent. Each step needs its own property, since misses multiply.

    Related topics

    • A Prompt Regression Harness

    • Verifying AI output

    Previous

    32 / 173

    Next: A Prompt Regression Harness

    Up next

    Up nextA Prompt Regression Harness

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Diagnose the Failure First