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
  • 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
    • Cost Arithmetic
    • Latency and Throughput
    • Reducing Tokens
      • Prefix Caching
      • Summarisation and Information Loss
      • Retrieval Instead of Pasting
      • Trimming Logs and RTL
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹Reducing Tokens
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Tokens, Cost and Latency
  4. Reducing Tokens
  5. Summarisation and Information Loss

Reference: Tokens, Cost and Latency · Beginner to Intermediate

Summarisation and Information Loss

Summaries compress long context but drop detail that later questions may need.

On this page

    What a summary keeps

    A summary keeps the gist and drops the particulars. Names, numbers and exact sequences are the first casualties, while conclusions usually survive.

    Survives a summary

    Often lost in a summary

    Decisions and their reasons

    Exact addresses and bit fields.

    Open questions and owners

    Ordering of similar events.

    Overall verdicts

    Rare corner cases and caveats.

    A worked compression

    A 6000-token debug history compresses to a 400-token summary. The ratio is large and the kept fraction is small, which is exactly why follow-up questions suffer.

    plaintext
    1
    2
    3
    4
    5
    original 6000 tokens, summary 400 tokens
    ratio = 6000 / 400 = 15, so 15:1
    kept = 400 / 6000 = 0.0666... = about 6.7%
    dropped = 5600 / 6000 = 0.9333... = about 93.3%
    check: 6.7 + 93.3 = 100.0

    A scripted toy

    The program below stands in for a model with a fake scripted function. It keeps sentences holding a digit and drops the rest, then checks what survived.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    import sys
    
    SENTENCES = [
        "The regulator output is 1.8 V with a 50 mV ripple limit.",
        "The enable pin needs a 10 ms delay after power-up.",
        "The lab bench is near the window and gets warm afternoons.",
        "The retry limit is 3 attempts with a 5 ms backoff.",
        "Coffee tastes better after a passing regression.",
    ]
    
    def fake_summarise(sents):
        # FAKE scripted stand-in for a model: keeps sentences holding a digit.
        return [s for s in sents if any(ch.isdigit() for ch in s)]
    
    def words(sents):
        return sum(len(s.split()) for s in sents)
    
    def main():
        kept = fake_summarise(SENTENCES)
        dropped = [s for s in SENTENCES if s not in kept]
        bad = 0
        if not (len(kept) < len(SENTENCES)):
            bad += 1
        if not (words(kept) < words(SENTENCES)):
            bad += 1
        if not any("1.8" in s for s in kept):
            bad += 1
        if any("Coffee" in s for s in kept):
            bad += 1
        if not any("Coffee" in s for s in dropped):
            bad += 1
        if bad == 0:
            print(f"PASS: kept {len(kept)} of {len(SENTENCES)} sentences and {words(kept)} of {words(SENTENCES)} words")
        else:
            print(f"FAIL: {bad} checks wrong")
            sys.exit(1)
    
    main()

    Three of five sentences survive because they hold digits. The lab note and the coffee line are gone, so questions about them are unanswerable from the summary.

    Common mistakes

    Common pitfall

    Summarising the only evidence and then deleting the original leaves no path back. Keep the full text stored outside the prompt so dropped details stay recoverable.

    Interview

    Likely probes: what summaries lose and when they are safe.

    • Summaries keep conclusions and drop numbers, orderings and caveats.

    • The worked ratio above is 15:1 with about 6.7% of tokens kept.

    • Summaries suit settled background, never the evidence under active debate.

    Check yourself A summary keeps 400 of 6000 tokens. What fraction is kept, and what does that imply for detailed follow-ups?

    About 6.7% is kept. Detailed follow-ups likely need the original, since 93.3% was dropped.

    Check yourself In the toy, why does the coffee sentence vanish while the 1.8 V sentence survives?

    The fake rule keeps sentences holding a digit. The coffee line holds none, so it is dropped with its detail.

    Related topics

    • Retrieval instead of pasting

    • Context window and attention for users

    • Cost arithmetic

    Previous

    140 / 173

    Next: Retrieval Instead of Pasting

    Up next

    Up nextRetrieval Instead of Pasting

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Trimming Logs and RTL