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
  • Trust and Verification14
    • Hallucination and Failure Modes
      • Invented APIs, Flags and Signal Names
      • Plausible but Wrong Numbers
      • Overconfident Tone and Sycophancy
      • Instruction Drift in Long Sessions
      • Subtle Bugs That Compile
    • Verifying AI Output
    • Evaluating AI Tools for Your Team
  • 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

‹Hallucination and Failure Modes
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Trust and Verification
  4. Hallucination and Failure Modes
  5. Instruction Drift in Long Sessions

Verification and Safe Use · Beginner to Intermediate

Instruction Drift in Long Sessions

Lost constraints in long sessions, with restatement and rescan habits.

On this page

    Constraints fade over long sessions

    Early instructions carry less weight as a session grows. A rule stated at turn 1 may be ignored by turn 9 without any warning.

    This tendency varies by model and session length: measure it on the actual setup. Long-context use is less reliable than short-context use, so drift is expected rather than surprising.

    Session stage

    Typical behaviour

    Answer

    Early turns

    Constraints are followed

    State each rule once, plainly.

    Middle turns

    Some rules weaken

    Restate the contract beside the current work.

    Late turns

    A rule may drop silently

    Rescan the output against the contract.

    Restate and rescan points across a long session.
    Restatement points keep late turns inside the original contract.

    Restating the contract

    Restatement puts the rules back near the work. A short rule list repeated every few turns costs little and holds the session inside its contract.

    plaintext
    1
    2
    3
    4
    session of 12 turns, restate the contract every 4 turns (stated example policy)
    restatements = 12 / 4 = 3, at turns 4, 8 and 12
    scan cost: assume each turn check costs 2 units (labelled EXAMPLE parameter)
    scan total = 12 x 2 = 24 units

    How to detect it

    Keep the contract as a written list and scan each output against it. The program below scans a 12-turn record where turn 9 drops a required rule.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    import sys
    
    CITES = [True, True, True, True, True, True, True, True, False, True, True, True]
    
    def main():
        if len(CITES) != 12:
            print("FAIL: turn count is " + str(len(CITES)))
            sys.exit(1)
        gaps = [i + 1 for i, c in enumerate(CITES) if not c]
        if gaps != [9]:
            print("FAIL: gap list is " + ",".join(str(g) for g in gaps))
            sys.exit(1)
        print("PASS: 12 turns scanned, dropped rule at turn 9 located")
    
    main()

    Twelve entries go in and one gap comes out. The scan locates the dropped rule at turn 9, which restatement at turn 8 was meant to prevent.

    Common mistakes

    Common pitfall

    Adding new rules only at the top of a long session. Distant rules fade, so restate them beside the current work.

    Interview

    Likely probes: the restatement habit and the rescan.

    • Restate the contract every few turns, next to the current task.

    • Rescan late output against the written rule list.

    • Drift varies by model: measure it on the setup in use.

    Check yourself Turn 9 of 12 drops a required rule. Which habit finds it?

    A rescan of all 12 turns against the stated contract. The scan locates the gap at turn 9.

    Check yourself Why restate the contract at turns 4, 8 and 12 instead of only at the start?

    Later turns drift from early instructions. Restatement keeps the rules near the work instead of buried far above it.

    Related topics

    • Planning, memory and stopping

    • Verifying AI output

    Previous

    37 / 173

    Next: Subtle Bugs That Compile

    Up next

    Up nextSubtle Bugs That Compile

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Invented APIs, Flags and Signal Names
    • Plausible but Wrong Numbers