Skip to content

feat: [ISSUE] Create dependencies between the prompts (use prior prompt in next prompt) #1492

Open

Description

@snanatee-sfg

Hi There
Is it possible to create dependencies between the prompts? For example, if I have a prompt to extract the number of Figures (Figure_number), can I used the information from that prompt in the next prompt (i.e. For each of the Figure_number figures, extract the titles)?
Thanks
Shannon

Activity

  1. changed the title [-]feat: [ISSUE][/-] on Aug 21, 2025
  2. harini-venkataraman commented on Sep 18, 2025

    @harini-venkataraman
    Contributor

    Hi @snanatee-sfg,

    Yes, you can create dependencies using variable replacement. First, write a prompt that extracts the number of figures (e.g., prompt key: Figure_number).

    In the next prompt, reference it with the following syntax for the prompt key - Example -

    For each of the {{Figure_number}} figures, extract the titles.

    Here {{Figure_number}} is replaced with the earlier prompt’s output.

    If you need to enrich the value via an API, you can use the following syntax -

    For each of the {{[Figure_number]https://your-api-endpoint.com}} figures, extract the titles.

    Here the response of Figure_number will be passed as payload to the API, and the response will be replaced.
    This lets you chain prompts and pass outputs seamlessly.

  3. snanatee-sfg commented on Sep 18, 2025

    @snanatee-sfg
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions