Why is my gather node not working?

“Gather” is a powerful node which can help your workflow to achieve different things, like:

  • gather information from a customer
  • gather information from a tool or information source
  • let a customer know something, and gather whether that helped them or not

“Gather” works by giving the Lorikeet AI agent a goal: to collect information. It can use tools, dependencies, chat responses, or chain-of-thought reasoning to achieve that goal. Once it’s achieved that goal, it’s allowed to move on to the next node.

This gives our agent a wide degree of agency to achieve your workflow tasks. But just like when you give a human a wide degree of agency to achieve something, you’ll need to provide explicit instructions to make sure your aims are aligned.

Issue: Gather node is being ‘skipped’

Let’s take the example of a delivery status workflow, where we need customerEmail and orderId to look up the customer’s delivery status.

The first node in our workflow will be a ‘Gather’ node to collect this information, as most customers will just ask something like “Hey, where’s my order?” So we’ll need to ask them for these details.

However, some customers might message customer support with this information already handy:

hey there, where’s my order? email is joe@bloggs.com and order ID is 7238-4829

In this case, it would be counterproductive to ask the customer for their email and order ID. They’ve already provided this information! Thankfully, the gather node will simply collect this information and move on to the next node without saying anything, mimicking human-like behavior. This is beneficial because if we were to write these instructions manually, they would be lengthy and complex:

“if the customer hasn’t supplied you with their email and order id, ask them for their email and order id. if the customer has supplied you with their email but hasn’t supplied you with their order id, ask them for their order id only. if the customer has supplied you with both their email and order id and they are both valid” … etc.

Instead, our gather node only requires minimal instruction, and all those behaviors, which would be intuitive for a human, will be performed automatically.

An example of what a gather node from a delivery status workflow could look like.

The downside of this, however, is that since the gather node’s sole purpose is to collect information, it will simply move on when it believes it has gathered that information. This isn’t always the desired behavior.

For instance, after we’ve collected the customer’s delivery status information, we might want to present them with that information and ask if it resolves their inquiry. If it does, we have an outcome node called ‘resolved’. If not, we have an outcome node called ‘escalate’.

Using the gather node to communicate information and ask if that information helped the customer.

The approach above can actually lead to some issues, such as:

  • the workflow skipping the gather node entirely and just jumping to “resolved”
  • the workflow replying with something like “hey there! your order 7238-4829 is arriving tomorrow” but instead of waiting for the customer to reply confirming or denying whether that helped, the workflow skips to the ‘resolved’ node.

Why is this? The goal of the ‘gather’ node is to gather information, and as soon as it’s done that, it will move on. Additionally, as we discussed before, we’ve given the workflow some freedom to decide when this information needs to be gathered or not, so it can make intelligent decisions. So in this instance, our gather node has reviewed the information available, ‘gathered’ that the information helped the customer, and moved on. There are two ways to remedy this.

1. Explicit instructions

In this instance, we do have an explicit set of instructions we’d like the workflow to execute:

  1. Give the customer the relevant delivery status information

  2. Wait for their response

  3. Using their response only, fill out the ‘didThatHelp’ field

This makes it clear where the source of the ‘didThatHelp’ information is supposed to come from, and what order the actions are to be performed in.

2. Allowing the data field to be blank

Consider the following instructions we give the didThatHelp field.

You must fill out this field with either 'true' or 'false'.

If the customer's enquiry is resolved, mark this field as 'True'.

If it isn't or if the customer has further questions, mark this field as 'False'.

This may cause the Lorikeet AI agent to immediately answer the question of whether the information is helpful or not, using its own reasoning abilities, and once it has done this, it will move on.

Instead, our desired behaviour is that we’d like the Lorikeet AI agent to tell the user their delivery status, wait for their response, and fill out the field with their answer.

So instead, we’ll alter our prompt:

Allowed options are ["True", "False"] or an empty value.

If you haven't yet provided information to the customer, do not set this value to anything.

After you've provided the information and asked whether it helped

- If customer confirms that it has helped and they have no further questions, set the value to "True".

- If they have further questions or it did not help, fill this out with "False".

This will make it less likely that the AI agent will immediately fill this field out and move on.

Of course, if you’ve tried these tips and are still experiencing issues with your gather nodes, please feel free to get in contact with one of our customer success representatives.

Issue: Gather node gets stuck in a loop

A similar issue you may experience using gather nodes is you may find the Lorikeet agent getting stuck in a loop with a customer.

Lorikeet: I’m here to help! Could you send me your order ID and phone number?

Customer: Sure, my phone number is +61 450 398 283.

Lorikeet: Great! Could I please get your order number as well?

Customer: I can’t find it.

Lorikeet: That’s okay. Do you think you could try to get me that order number? It’s an eight digit number with a hyphen in the middle.

Customer: I don’t know where it is.

Lorikeet: I understand! I do really need that order number to look up your delivery though. Do you think you could send it to me?

As previously mentioned, gather nodes work by giving the workflow a goal: to gather a piece of information. It generally will try to collect that information, until it thinks that’s not possible anymore.

If you’re finding that your workflows are getting stuck in a loop like this, you may need to give your workflow an option to choose to account for these cases.

Allowed options are ["True", "False", "Unsure"].

If you haven't yet provided information to the customer, do not set this value to anything.

After you've provided the information and asked whether it helped

- If customer confirms that it has helped and they have no further questions, set the value to "True".

- If they have further questions or it did not help, fill this out with "False".

- If the customer tells you they aren't sure, fill this field out with "Unsure"

Then, later in your workflow, you could route these users to an outcome to help them find their order number.