Error Message -The Semantic Similarity activity

Hi all, I am working on Agentic Automation Associate Training and I had this

error and no idea how to solve it, any solutions?
thanks

Hello @Marta_Lisicka check any “JSON input” or “Body” field.
If you used something like
{"text": "hello" "language": "en"}

then missing comma. Should be the reason

{"text": "hello", "language": "en"}
or if you’re dynamically building JSON then always use

Newtonsoft.Json.JsonConvert.SerializeObject(myObject)

instead of string concatenation.

Cheers

1 Like

Option 1: Validate JSON Before Passing

If you are building JSON dynamically:

Use Newtonsoft.Json.JsonConvert.SerializeObject(object) to ensure proper formatting.

Example:

validJson = JsonConvert.SerializeObject(yourDictionaryOrObject)

Option 2: Escape Quotes in Strings

When including text or variables that might contain quotes or special characters, escape them:

escapedString = yourText.Replace(“”“”, “"”")

Option 3: Simplify Tool Input

If the agent or tool doesn’t require the entire object:

Pass only required fields.

Avoid large DataTables directly; use summarized or reference-based data (like file paths).

Option 4: Validate JSON via an Online Tool

Copy your JSON input into https://jsonlint.com
to confirm valid formatting before running the agent.

@Marta_Lisicka if the guidance from @bhavesh.choubey did not resolve your issue, can you send more details on the information that is being sent to Semantic Similarity?

Hey If it helped you then kindly close the thread by marking me as SOLUTION so that it can help others.

Thanks