CSCI 3280 Tutorial 4
A Simple Tiny Agent Workflow Example
A Simple Tiny Agent Workflow Example1:�Memory Management & Function Call
ASR Module
Press a button to wake up/
Call a specific name to wake up
User: Please help me set a notification to participate Sam’s birthday party. His birthday is 1988.02.18
A Simple Tiny Agent Workflow Example
ASR Module
Press a button to wake up/
Call a specific name to wake up
User: {Please help me set a notification to participate Sam’s birthday party}
System_Prompt:{... when asked about the personal information of the user, please check USER_INFO part … when asked to set notification, please output the information after reply in the format <yyyy\mm\dd><notification_info>...}
User_Info:{ user name: …
User birthday: …
Other: ...}
Chat_History:{}
LLM
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
<2025\02\18><attend Sam’s birthday party>
A Simple Tiny Agent Workflow Example
LLM
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
<2025\02\18><attend Sam’s birthday party>
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
Text processing
<2025\02\18><attend Sam’s birthday party>
A Simple Tiny Agent Workflow Example
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
Text processing
<2025\02\18><attend Sam’s birthday party>
function_write_ics(time, event)
.ics file (which can be imported to outlook or google calendar)
TTS module
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
A Simple Tiny Agent Workflow Example
A Simple Tiny Agent Workflow Example
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
TTS module
OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.
User: {User: Please help me set a notification to participate Sam’s birthday party. Assistant: OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.}
System_Prompt:{... this is the end of one round conversation, please summarize the conversation. If there is critical information, please output in the format of <critical><critical information> ...}
User_Info:{ user name: …
User birthday: …
Other: ...}
Chat_History:{...}
A Simple Tiny Agent Workflow Example
LLM
User: {User: Please help me set a notification to participate Sam’s birthday party. Assistant: OK, I just set the notification on 2025.02.18 to participate Sam’s birthday party.}
System_Prompt:{... this is the end of one round conversation, please summarize the conversation. If there is critical information, please output in the format of <summary><chat summary><critical><critical information> ...}
User_Info:{ user name: …
User birthday: …
Other: ...}
Chat_History:{...}
<summary><The user asked to set a notification of attending Sam’s birthday party, and the notification is successfully set.>
<critical><Sam’s birthday is 1988.02.18>
Function to update User_Info and Chat_History
A Simple Tiny Agent Workflow Example2:�Planning
User: {I’d like to change the plan of the third day. I prefer to visit some traditional buildings and have an authentic local meal with moderate budget.}
System_Prompt:{... when the user requirement is complex, please first plan steps and then implement step by step.}
Chat_History\Memory\Current Plan:{}
Planning
LLM with structured output
{
’Step1’: ‘find attractions of traditional buildings using map tool’
’Step2’: ‘find the representative authentic local food’
’Step3’: ‘based on results of step2, find restaurant, rank according to average cost, and filter the results above 4 stars’
‘Step4’: route the attractions and restaurants to minimize daily walking
A Simple Tiny Agent Workflow Example2:�Planning
{
’Step1’: ‘find attractions of traditional buildings using map tool’
’Step2’: ‘find the representative authentic local food’
’Step3’: ‘based on results of step2, find restaurant, rank according to average cost, and filter the results above 4 stars’
‘Step4’: route the attractions and restaurants to minimize daily walking
}
Sub-agent: prompts only related to the current step, to minimize hallucination
Execute Step 1
Execute Step 2
Execute Step 3
Execute Step 4
Summarize final results,
Update Chat_History\Memory\Current Plan
Final Speech Feedback
Intermedia Speech Feedback
Intermedia Speech Feedback
CSCI 3280 Tutorial 4