You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated the package to the latest version before submitting this issue
I have searched the existing issues of NeMo-Guardrails
What i'm trying to do is make an LLM to assign a variable value. The LLM correctly responds but gets flagged with "Invalid LLM response".
Below is the code snippet:
flow bot extract job position
global $job_position
# Extract job position and location from user input
$job_position = ..."Extract job position from $last_user_transcript. This can be a specific title like 'CEO', 'CTO', 'CFO', or a more general term like 'Manager'."
flow bot extract location
global $location
# Extract job position and location from user input
$location = ..."If mentioned, extract the place name from $last_user_transcript. This can be a city, state, or country. If no location is mentioned, use 'Any location.'."
This is the response:
System
This is the current conversation between the user and the bot:
User
user action: user said "This is a CFO in New York"
Bot
user intent: user said job position
System
Follow these instruction `Extract job position from var_last_user_transcript. This can be a specific title like 'CEO', 'CTO',
'CFO', or a more general term like 'Manager'.` to generate a value that is assigned to:
$job_position =
16:07:04.659 | StartTimerBotAction | {"action_uid": "61f6...", "timer_name": "llm_response_polling", "duration": 1.0}
16:07:05.587 | Output Stats None
16:07:05.588 | LLM call took 0.93 seconds
2025-05-28 16:07:05,589 WARNING Error while execution 'GenerateValueAction' with parameters '{'var_name': 'job_position', 'instructions': "Extract job position from var_last_user_transcript. This can be a specific title like 'CEO', 'CTO', 'CFO', or a more general term like 'Manager'."}': Invalid LLM response: `CFO`
2025-05-28 16:07:05,589 ERROR Invalid LLM response: `CFO`
User
user action: user said "This is a CFO in New York"
Bot
user intent: user said job position
bot intent: bot extract job position
System
Follow these instruction `If mentioned, extract the place name from var_last_user_transcript. This can be a city, state, or
country. If no location is mentioned, use 'Any location.'.` to generate a value that is assigned to:
$location =
16:07:06.518 | Output Stats None
16:07:06.519 | LLM call took 0.89 seconds
2025-05-28 16:07:06,520 WARNING Error while execution 'GenerateValueAction' with parameters '{'var_name': 'location', 'instructions': "If mentioned, extract the place name from var_last_user_transcript. This can be a city, state, or country. If no location is mentioned, use 'Any location.'."}': Invalid LLM response: `New York`
2025-05-28 16:07:06,521 ERROR Invalid LLM response: `New York`
Here the user said: This is a CFO in New York. The correct value to assign to job_position is CFO and location is New York, which is the LLM has correctly responded with. But what's causing it to be flagged as: Invalid LLM response for both CFO and New York ?
I am not sure what's going on. There's a similar issue with assigning value to a variable through an LLM call I posted here. I appreciate any help and insights into this issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
What I have done so far:
What i'm trying to do is make an LLM to assign a variable value. The LLM correctly responds but gets flagged with "Invalid LLM response".
Below is the code snippet:
This is the response:
Here the user said: This is a CFO in New York. The correct value to assign to
job_position
is CFO andlocation
is New York, which is the LLM has correctly responded with. But what's causing it to be flagged as:Invalid LLM response
for both CFO and New York ?This is my config.yml:
I am not sure what's going on. There's a similar issue with assigning value to a variable through an LLM call I posted here. I appreciate any help and insights into this issue.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions