⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’

Excalidraw Data

Text Elements

Step-Back Prompting

Specific Query (Too Narrow)

“How do I debug a NaN error in my PyTorch model’s loss calculation?”

LLM: Generate Step-Back Query

Abstract to fundamental principles

Step-Back Query (Broader Scope)

“What are the fundamental principles of debugging machine learning models and troubleshooting mathematical operations in neural networks?”

Retriever

Retrieved Documents (Foundational)

• General ML debugging practices • Numerical stability in deep learning • PyTorch best practices • Common ML pitfalls

✓ More useful than searching specifically for “NaN errors”

Why Step-Back Works

Specific queries often: • Have few exact matches • Miss foundational context • Return narrow results

Step-back queries: • Broader coverage • Include first principles • Better for complex problem-solving

The foundational docs provide context to answer the specific question!

Problem: Too specific

Solution: Generalize