Hi @souvikg10,
Thank you for your reply.
I have noticed that the LLM command generator tends not to fill several slots at the same time during a flow that aims to collect more user data. For example, for :
diving_info:
description: Collect information about the diving site
if : False # flow which should exclusively be started via a link or call step
steps:
- collect: name
reset_after_flow_ends: False
- collect: age
reset_after_flow_ends: False
next:
- if: slots.age < 3 OR slots.age > 150
then:
- action: utter_invalid_age
next: complete_briefing
- else:
- collect: content_type
reset_after_flow_ends: False
- collect: site
reset_after_flow_ends: False
next: complete_briefing
- id: complete_briefing
action: action_complete_briefing
next: END
I obtain the following behaviour:
===
Here is the current conversation:
AI: Come posso chiamarti?
USER: Mi chiamo Francesco e ho 59 anni
===
You are currently in the flow "diving_info".
This flow has the following slots:
- name
- age
- content_type
- site
You have just asked the user for the slot "name" (text).
The user answered "Mi chiamo Francesco e ho 59 anni".
===
Based on this information, generate a list of actions. These are the available actions:
1. Setting or correcting slots, described by "SetSlot(slot_name, slot_value)". An example would be
"SetSlot(recipient, Freddy)". DO NOT set a slot with an arbitrary value!
2. Indicating that the users intent goes beyond responding to a question from the AI and setting a slot, described by
"ChangeFlow()". Add this action, for example, if the user might want to start a different flow, cancel the current one,
skip a question, ask a question or engages in chitchat. DO NOT add the name of the flow inside "ChangeFlow" command.
===
Summarize the last user message in the context of the conversation. Then generate a final list of actions.
===
The user saying "Mi chiamo Francesco e ho 59 anni" after being asked for the slot "name" means that they might
2024-12-04 10:56:53 [debug ] base_litellm_client.formatted_response formatted_response={'id': 'chatcmpl-010df699-f93c-42d9-9517-339c63fd2d12', 'choices': ["## Summarize the last user message in the context of the conversation.\n\nThe user gave their name and age in response to a request for their name - it's possible that they misunderstood the question and are giving additional information.\n\n## Generate a final list of actions.\n\n1. SetSlot(name, Francesco)"], 'created': 1733306211, 'model': 'gemini-pro', 'usage': {'prompt_tokens': 418, 'completion_tokens': 66, 'total_tokens': 484}, 'additional_info': None}
2024-12-04 10:56:53 [debug ] multi_step_llm_command_generator.predict_commands_for_active_flow.actions_generated action_list=## Summarize the last user message in the context of the conversation.
The user gave their name and age in response to a request for their name - it's possible that they misunderstood the question and are giving additional information.
## Generate a final list of actions.
1. SetSlot(name, Francesco)
2024-12-04 10:56:53 [debug ] multi_step_llm_command_generator.predict_commands.finished commands=[SetSlotCommand(name='name', value='Francesco', extractor='LLM')]
2024-12-04 10:56:53 [debug ] command_processor.check_commands_against_slot_mappings.active_flow active_flow=diving_info
2024-12-04 10:56:53 [debug ] graph.node.running_component clazz=RegexMessageHandler fn=process node_name=run_RegexMessageHandler
2024-12-04 10:56:53 [debug ] processor.message.parse parse_data_entities=[{'entity': 'name', 'start': 10, 'end': 19, 'confidence_entity': 0.9904364139874045, 'value': 'Francesco', 'extractor': 'CRFEntityExtractor', 'processors': ['EntitySynonymMapper']}, {'entity': 'age', 'start': 25, 'end': 27, 'confidence_entity': 0.8171495188004679, 'value': '59', 'extractor': 'CRFEntityExtractor'}] parse_data_intent={'name': 'introduce_user', 'confidence': 0.8893842101097107} parse_data_text=Mi chiamo Francesco e ho 59 anni
Note that the NLU module correctly extracts both name and age from me while the LLM model only sets the required slot.
What I wonder is why the LLM model does not also set the age slot, which is part of the flow anyway?