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
      • Five Parts of a Prompt
      • Roles: System, User, and Assistant
      • Specific and Parseable
      • Weak Versus Strong Prompts
      • Prompt Template Builder
    • Examples and Reasoning
    • Prompt Debugging
  • 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

‹Anatomy of a Prompt
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Prompting
  4. Anatomy of a Prompt
  5. Five Parts of a Prompt

Asking Clearly · Beginner to Intermediate

Five Parts of a Prompt

Task, context, constraints, output format, and examples with a worked token share.

On this page

    Task first

    The task states the goal in one verb phrase. It names the deliverable and its scope.

    A task without scope invites a generic answer. One sentence of scope often fixes that.

    Task line

    Verdict

    Why

    Explain this block.

    Weak

    No deliverable, scope, or audience.

    Explain what this FIFO does in two sentences.

    Strong

    Names the block, the question, and the length.

    Review this testbench for reset bugs.

    Strong

    Names the artifact and the bug class.

    Context that changes the answer

    Context holds facts that change a correct answer. It includes interfaces, parameters, and failure symptoms.

    Each fact should earn its place. A fact that cannot change the answer is clutter.

    Constraints that rule answers out

    Constraints state limits: length, tools, forbidden actions, and what to assume. They shrink the answer space before generation.

    Effective limits vary by model, so results vary by model: measure it on the task at hand.

    Output format and examples

    Output format names the shape: headings, keys, or a table. Examples show one input and its desired output.

    One short example often beats a paragraph of format prose. Two examples cover the normal case and one edge.

    plaintext
    1
    2
    3
    4
    5
    6
    7
    example section sizes in characters (stated example counts)
    task 100, context 400, constraints 150, format 100, examples 250
    total = 100 + 400 + 150 + 100 + 250 = 1000 characters
    shares: task 10%, context 40%, constraints 15%, format 10%, examples 25%
    shares sum: 10 + 40 + 15 + 10 + 25 = 100%
    rough token estimate at 4 characters per token: 1000 / 4 = 250 tokens
    the 4-characters-per-token rule is approximate and tokenizer-dependent

    Common pitfall

    Dumping every log and file without selection buries the task. Small prompts with the deciding facts beat long prompts with everything attached.

    Interview

    Likely probes: the five parts and what each rules out.

    • Task names the goal and scope; context holds facts that change the answer.

    • Constraints shrink the space; format and examples fix the shape.

    • Missing parts fail in distinct ways: vague task, wrong facts, open scope, lost shape.

    Check yourself A prompt has task, context, and examples but no constraints and no format. What breaks first?

    Scope and shape break first. Length, forbidden actions, and output keys stay open, so answers vary run to run.

    Check yourself In the calc block, context is 400 of 1000 characters. What share is that, and how many rough tokens does the whole prompt hold?

    40%. The whole holds about 250 tokens at 4 characters per token, stated as an approximate rule.

    Related topics

    • Prompt roles

    • Examples and reasoning

    Previous

    21 / 173

    Next: Roles: System, User, and Assistant

    Up next

    Up nextRoles: System, User, and Assistant

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Specific and Parseable
    • Weak Versus Strong Prompts
    • Prompt Template Builder