Translation Depth - protospatial/NodeToCode GitHub Wiki
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
-
Start Conservative
- Begin with depth 1 for most translations
- Evaluate results before increasing depth
- Consider token usage and costs
-
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.
-
When to Decrease Depth
- Token limit concerns
- Quick reference translations
- Simple graph conversion
- Cost optimization needed