Skip to main content
All CollectionsAI Project
What is Variables in System Prompt?
What is Variables in System Prompt?
Edward Hu avatar
Written by Edward Hu
Updated over a week ago

When setting up an action, you can include variables in the input to create your custom prompt template. If you see the following under your input, then it means you'll able to refer to these variables.

There are two types of variables, default variables and action variables.

  • Default Variables: these variables are provided by the system by default, which includes:

    • ${current_date_time}: as the name indicates, it's the current date and time in UTC+0.

    • ${history}: if memory is enabled for this project, you can incorporate historical conversation details into the prompt. If memory is disabled, any references to it will return null. You can learn more about memory here.

    • ${payload}: this is the value that will be provided by you when invoking the project endpoint. You can learn more about the endpoint here.
      โ€‹

  • Action Variables: when you add actions to the pipeline, you can refer the output of those actions. For example, we have a standard VDB + LLM RAG pipeline that looks like this:


    And the LLM's system prompt (in action 2) looks like this:
    โ€‹


    It's referring to the vector database result as ${action_1_output}. You can also see how the prompt template is being structured along with all other variables as well.

Note

You cannot refer to an action's output that occurs AFTER the action you're currently configuring. For example, if you're configuring action 1's system prompt, you won't be able to refer to action 2's output.

Did this answer your question?