https://retellai.com/?utm_source=discord&utm_medium=seo logo
in single prompt agent, do i need to have extract ...
# ❓・ai-evy-support
s
@AI Evy in single prompt agent, do i need to have extract dynamic variable function if my custom actions have that?
a
Thanks for tagging me @superGamer69. I'll look through relevant sources and get back to you shortly.
### Answer No, you don't necessarily need to use the "Extract Dynamic Variable" function if your custom functions already have their own "Response Variable" section. [(1) ]() These serve different purposes: - **Extract Dynamic Variable**: You call this before you call a custom function to set variables from user input (e.g., extracting a name or phone number the user just said) . [(1) ]() [(2) ]() - Response Variable (in custom functions) : You use this after the function has been called to set variables from the output/response of that function. [(2) ]() So if you only need to capture data returned by your custom functions, the Response Variable section within those functions is sufficient. You'd add the Extract Dynamic Variable tool when you need to capture and store values from what the user says before passing them to a function. [(1) ]() [(2) ]()
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[2] I'm having trouble with Custom Functions that need dynamic path variables in GET endpoints](https://discord.com/channels/1186424376300679209/1420898782828040192) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.