AI Builder prompts are useful when slot filling does not extract information well or when you want to extract applied information.
Cases where slot filling does not work
We introduced “slot filling” in the previous article, but extracting information with this slot filling may not work.
For example, it is difficult to extract “Japanese names,” and although a “personal name” entity is available, it does not support Japanese names,
if we use this entity to extract Japanese names,
it is extracted alphabetically.
It is also not possible to extract the names of more than one person, and if more than one name is entered, the user must choose which name to use.
It might be possible to “create entities with Japanese names” or “extract multiple information”, but I couldn’t find any information.
So this time, I tried to construct the extraction of this information using “prompts” in AI Builder.
Information extraction using AI Builder “Prompts“
First, the “specific” in the previous question is changed to “the user’s entire response” and the message is assigned as is to the variable without entity extraction.
Then add “Create Prompt” next to the question node,
when the edit pop-up opens, type in a nice prompt and press [Add] in the upper right corner,
Select [Text] as the argument.
Name the argument and press [Add Input].
After the input has been added, press the output icon on the right, select [JSON] and press [Edit].
Then the JSON output settings will open. Specify that the Japanese names are to be output as an array, and click “Apply” and then “Save”.
* Learn more about AI Builder’s structured output
AI Builder 「GPTでプロンプトを使用してテキストを作成する」に、構造化出力(JSON出力)が追加された
AIBuilderに構造化出力のような機能が追加されたので試してみた。JSON出力とはJSON出力(構造化出力)は、ざっくりいうと「LLMの回答を、指定したJSON形式のデータに指定する」こと。今までは以下のようなプロンプトで出力を指定して...
Then return to Copilot Studio and set the input to the “prompt” node to the “user’s message” that you just saved in the question, and store the output in a variable.
Finally, set the text property in the object to display and the construction is complete.
Check the operation of the topic
If three Japanese are specified in the previous conversation flow, the information can be obtained in an object array as shown in the image.
This string can then be sent to Power Automate, etc., and “parse JSON” can be used to connect to other actions (in this case, meeting setup).
This string can then be sent to Power Automate, etc., and “parse JSON” can be used to connect to other actions (in this case, meeting setup).
So, when there is information that is difficult to extract by slot filling, it can be easily extracted using AI Builder.
Extra: Consider using GPT-4o if extraction is not working
The AI Builder prompt uses GPT-4o mini by default, but you can try GPT-4o if you cannot extract the information as you expect.