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
    • What an Agent Is
    • Tool Use and Structured Output
    • Planning, Memory and Stopping
      • Task Decomposition and Success Criteria
      • Memory Outside the Model and Summaries
      • Step and Cost Budgets
      • Loop Detection and Stopping
    • Multi-Agent Patterns and When Not to Use Agents
  • 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

‹Planning, Memory and Stopping
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Agents and Tool Use
  4. Planning, Memory and Stopping
  5. Memory Outside the Model and Summaries

Tools, Workflows and Agents · Beginner to Intermediate

Memory Outside the Model and Summaries

Keep state outside the model, track context growth, and summarise safely.

On this page

    Keep state outside the model

    Plans, findings, and file lists live in notes outside the model. The model context holds only the current working slice.

    External notes survive summarisation and restarts. Reviewers can read the same facts the run used.

    Store

    What lives there

    Why

    Plan file

    Steps, order, and done conditions

    The run resumes from the same plan.

    Findings log

    Per-step results and pointers

    Later steps quote evidence, not recall.

    Artifact list

    Paths of changed and read files

    Review covers exactly what the run touched.

    Context growth arithmetic

    Each loop step appends observations to the context. Ten steps of 800 tokens on a 2000-token start reach 10000 tokens, as the calc block shows.

    Token counts are approximate and tokenizer-dependent. Common tokenizers use about 3 to 4 characters per token for English prose, with fewer characters per token for code, numbers, hex, and non-Latin text.

    In the basic form, attention cost grows with the square of the sequence length, and efficient variants exist. Long-context use is less reliable than short-context use, and models tend to use information at the start and end of long inputs better than the middle, a tendency reported in studies rather than a law.

    plaintext
    1
    2
    3
    4
    5
    start = 2000 tokens, appended per step = 800 tokens, steps = 10 (stated example values)
    total = 2000 + 10 x 800 = 2000 + 8000 = 10000 tokens
    summary = 1500 tokens = 1500 / 10000 = 0.15 = 15%
    saving = 10000 - 1500 = 8500 tokens = 85%
    check: 15% + 85% = 100%

    Summarise without losing facts

    A summary keeps decisions, open items, and file paths. It drops raw logs and keeps pointers to them.

    Summarise on a fixed cadence or size threshold. What survives a summary varies by model: measure it on the task.

    Keep in the summary

    Drop or point to

    Decided facts with values

    Raw tool output beyond the quoted lines.

    Open items and next step

    Completed step detail already in the log.

    File paths and versions

    Full file contents; link the path.

    Stop reasons and counts

    Per-token debug traces.

    Common mistakes

    Common pitfall

    Treating the summary as the only record loses evidence. Keep the full log outside the model and let the summary point at it.

    Interview

    Likely probes: external state and growth control.

    • State lives in files; context holds the working slice.

    • Ten steps of 800 tokens on a 2000-token start total 10000 tokens.

    • Summaries keep decisions, paths, and open items with pointers.

    Check yourself A run starts at 2000 tokens and each of 10 steps appends 800 tokens. What is the total before summarisation?

    10000 tokens. It is 2000 plus 10 times 800, which is 2000 plus 8000.

    Check yourself A 10000-token log is summarised to 1500 tokens. What share is kept, and what is saved?

    15% kept and 85% saved. 1500 of 10000 is 0.15, and 15 plus 85 is 100.

    Related topics

    • Task decomposition

    • Budgets and enforcement

    • Cost arithmetic

    Previous

    98 / 173

    Next: Step and Cost Budgets

    Up next

    Up nextStep and Cost Budgets

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Loop Detection and Stopping