Azure OpenAI Prompt Chaining > Using the Azure OpenAI Prompt Chaining recipe > Step 3: Configure and publish the process
  

Step 3: Configure and publish the process

Configure the deployment details of the LLM model and publish the processes.
    1Open the Prompt Chaining Azure OpenAI process.
    2On the Temp Fields tab of the Start step, enter values for the following fields:
    3Optionally, in the Configure Request Parameters step, configure the prompt instructions in the Assignments field by updating the Prompt_Configuration field using the Expression Editor, as shown in the following sample code:

    <GenerationConfig_AzureAI>
    <topP>1</topP>
    <max_tokens>500</max_tokens>
    <temperature>0.5</temperature>
    </GenerationConfig_AzureAI>
    For the Prompt_Configuration field, enter values for the following properties:
    Property
    Description
    max_tokens
    Defines the maximum number of tokens that the model can generate in its response. Setting a limit ensures that the response is concise and fits within the desired length constraints.
    temperature
    Controls the randomness of the model's output. A lower value makes the output more deterministic, while a higher value increases randomness and creativity. For example, a temperature of 0.5 balances between deterministic and creative outputs.
    topP
    Determines the cumulative probability threshold for token selection. The model considers the smallest set of tokens whose cumulative probability meets or exceeds topP. For example, if topP is set to 0.1, the model considers only the top 10% most probable tokens at each step.
    4In the Create Prompt 1 step, enter the prompt instructions in the Assignments field by updating the Prompt_Request field using the Expression Editor as shown in the following sample code:

    <CreateChatCompletionRequest>
    <temperature>{$temp.Prompt_Configuration[1]/temperature }</temperature>
    <top_p>{$temp.Prompt_Configuration[1]/top_p }</top_p>
    <max_tokens>{$temp.Prompt_Configuration[1]/max_tokens }</max_tokens>
    <messages>
    <role>system</role>
    <content>{$input.First_System_Prompt } </content>
    </messages>
    <messages>
    <role>user</role>
    <content>{$input.First_User_Prompt }</content>
    </messages>
    </CreateChatCompletionRequest>
    After configuring the prompt instructions, the process sends the details to the LLM to fetch the required response, and then stores the first response.
    5In the Create Prompt 2 step, in the Assignments field, update the Prompt_Request field using the Expression Editor as shown in the following sample code:

    <CreateChatCompletionRequest>
    <temperature>{$temp.Prompt_Configuration[1]/temperature }</temperature>
    <top_p>{$temp.Prompt_Configuration[1]/top_p }</top_p>
    <max_tokens>{$temp.Prompt_Configuration[1]/max_tokens }</max_tokens>
    <messages>
    <role>system</role>
    <content> {$input.First_System_Prompt} </content>
    </messages>
    <messages>
    <role>user</role>
    <content>{ $input.First_User_Prompt }</content>
    </messages>
    <messages>
    <role>assistant</role>
    <content>{ $temp.Prompt_Response[1]/choices[1]/message[1]/content }</content>
    </messages>
    <messages>
    <role>user</role>
    <content>{$input.Second_User_Prompt }</content>
    </messages>
    </CreateChatCompletionRequest>
    The LLM uses both the requests as an instruction to prepare the final response.
    6 Save and publish the process.