Azure PromptFlow Tool Function - AI Response Problem

Deniz PEKŞEN 20 Reputation points
2025-02-23T19:29:03.6966667+00:00

Dear All,

I used Tool Function sample of Azure ML Promptflow, as you see that <<After the first dialog, the problem starts in the dictionary it returns, it prints all the text that the user should not see into content.>>
Used Model: ChatGPT4o
Api Version: 2023-07-01-preview
User's image

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,149 questions
0 comments No comments
{count} votes

Accepted answer
  1. Saideep Anchuri 3,140 Reputation points Microsoft Vendor
    2025-02-24T09:37:43.53+00:00

    Hi Deniz PEKŞEN

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.

    Ask: Azure PromptFlow Tool Function - AI Response Problem

    Solution: The issue is resolved. That You made the following change. It seems that working well now.

    old:

    # assistant:
    {{item.outputs.llm_output}}
    

    new:

    # assistant:
    
    {{item.outputs.llm_output.content}}
    

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

     

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    Thank You.


2 additional answers

Sort by: Most helpful
  1. Suwarna S Kale 956 Reputation points
    2025-02-23T22:53:12.95+00:00

    Hello [Deniz PEKŞEN],

    Thank you for posting your question in the Microsoft Q&A forum.

    The issue of unintended text exposure in the content field when using the Tool Function sample in Azure ML Promptflow with ChatGPT-4 can be addressed by filtering and sanitizing the model's response, using custom prompt templates, upgrading to a stable API version, leveraging Azure ML Promptflow's built-in features, and enabling debugging and logging. By implementing these solutions, you can ensure that only relevant and user-appropriate content is displayed, enhancing the user experience and maintaining the professionalism of your application.

    Microsoft’s comprehensive documentation provides detailed guidance on configuring and using Azure ML Promptflow, Azure OpenAI Service, and related tools to build robust and secure conversational AI solutions.

    Key Documentation References:

    https://learn.microsoft.com/en-us/azure/machine-learning/monitor-azure-machine-learning?view=azureml-api-2

    https://learn.microsoft.com/en-us/azure/ai-services/openai/reference

    https://learn.microsoft.com/en-us/azure/machine-learning/monitor-azure-machine-learning?view=azureml-api-2

     

    Please, let me know the response helps answer your question? If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue. 🙂

    1 person found this answer helpful.

  2. Deniz PEKŞEN 20 Reputation points
    2025-02-24T06:59:39.78+00:00

    Hi,
    I made the following change. It seems that working well now.

    old:

    # assistant:
    {{item.outputs.llm_output}}
    
    

    new:

    # assistant:
    {{item.outputs.llm_output.content}}
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.