Logic Block Issue

Help me here please.

When I use this logic block I get always the #2 as a result…

When it should give #1 when the match is “Excellent match” like in this case below:

1 Like

Hi @Fjmtrigo, thanks for the post!

There are a couple of things that might be causing this behavior:

  1. Make sure you’re using variables wrapped in curly braces so they get resolved correctly
  2. Make sure those variables are introduced before the Logic block

The Logic block, like most others, doesn’t have any context about what’s happening in the Agent unless you pass in variables. It also doesn’t know the structure of your Agent and simply evaluates the condition based on the input you provide.

In your case, the context can be something simple like:

Choose between two conditions based on the data below.
Conditions:
Case 1 = Excellent Match
Case 2 = Good Match, Low Match, Fair Match

Data: {{matchLevel}}

And make sure your Conditions reference the variable using curly braces: {{matchLevel}}.

Let me know how it goes!

2 Likes

Yeah, this is not using variables correctly. Variables need to be wrapped in double curly braces like {{this}}. Take a look here for some more help: Variables | MindStudio Docs

Additionally, in the debugger, look at the “Resolved Value” column of the table. This is what the AI sees when it executes the logic block. From the AI’s perspective, it basically sees:

Which statement is the most accurate?
1. if "" = "Excellent match
2. if ""= "Good match" or = "Low match"...

You can think of the logic block as effectively designing a “multiple choice” question for the AI to answer, and then whichever option it picks affects the routing of your agent.

3 Likes