KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using Function reset() to Prevent Context Side Effects
PRODUCT: 4D | VERSION: 21 | PLATFORM: Mac & Win
Published On: April 13, 2026
Reusing a chat helper without resetting can introduce unintended dependencies on previous exchanges, especially when tool calls are involved.

Calling reset() ensures that:
  • Previous tool results are not implicitly reused
  • Earlier prompts do not influence new decisions
  • Tool selection remains based only on the current request

Syntax:
$chatHelper.reset()

This is particularly important in multi-user or request-driven environments where isolation between interactions is required.