Skip to content

Translation Depth

NCMcClure edited this page Feb 26, 2025 · 1 revision

Best Practices → Translation Depth


Setting Appropriate Depth

The Max Translation Depth setting affects how Node to Code translates nested user-created graphs like functions, macros, collapsed graphs, and math expressions into code:

Depth Use Case Considerations
0 Single graph translation Fastest, lowest cost
1 Include direct function calls Good for most cases
2 Include nested functions Balance of depth/cost
3+ Deep system translation Higher cost, longer processing

Depth Configuration Guidelines

  1. Start Conservative

    • Begin with depth 1 for most translations
    • Evaluate results before increasing depth
    • Consider token usage and costs
  2. When to Increase Depth

    • When you know there are multiple nested graphs within your top-level graph that you will need to translate anyways and are comfortable with the increase in compute time

Important

Higher translation depths can exponentially increase token usage and LLM processing time and are more prone to LLM context window issues.

  1. When to Decrease Depth

    • Token limit concerns
    • Quick reference translations
    • Simple graph conversion
    • Cost optimization needed

Clone this wiki locally