Azure AI studio how to create space between inline citation

Junheok Cheon 120 Reputation points
2024-10-15T09:36:29.0133333+00:00

Hello, I am currently trying to modify the AI through Azure AI studio.

My goal is to make it so that there is space between inline citation.

My current approach is to create python code block that finds certain pattern and inserts space between.

User's image

The code looks like above, and the flow graph looks like this:

User's image

Problem arises when testing this feature.
When tested inside the prompt flow screen (using chat functionality),
Sometimes it doesn't work:

User's image

Sometimes it works:
User's image

After deploying the flow into the endpoint, it always does not work.

Reason why I want to make a space between the citation is because when we output AI's prompt to the user's interface, we change inline citation into the hyperlink that leads to the doc's page. Due to this reason, when there are many citations in a row, links look like they are single piece.

What is the proper way to achieve this?

Thanks,

Junheok

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,621 questions
{count} votes

Accepted answer
  1. romungi-MSFT 48,911 Reputation points Microsoft Employee Moderator
    2024-10-17T06:13:57.26+00:00

    As posted by OP as a resolution:

    1. Make final output to be linked with python code block instead of reply generation block.
    2. Reply generation block outputs to the python code block.

    However, despite being able to achieve this, there was a unexpected behaviour of Microsoft logic app automatically removing comma between inline citation for some reason, so they ended up implementing this in logic app side (using js code block).

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.