Add the ‘Update Knowledge’ Tool step to your Tool

You can add the ‘Update Knowledge’ Tool step to your Tool by:

  1. Creating a new Tool, then searching for the ‘Update Knowledge’ Tool step
  2. Click ‘Expand’ to see the full Tool step
  3. Select the knowledge set you would like to use.
  4. Filter condition: “and” vs “or” when matching data to update:
    • Use and when all specified conditions must match for a row to be deleted.
    • Use or when any of the conditions can match.

    Filter condition only applies if you include more than one object in the filter

  5. Filters: Accepts an array of objects, where each object corresponds to a row. Add more objects to delete multiple rows at once.
  6. Update value: Provide an object with the new values to update. Each key should match a column name in your knowledge set, and its corresponding value will replace the current value in the matching row.
  7. Use the Sync on upload field to determine whether the data should be vectorized when added to the knowledge set. In most cases, you’ll want this enabled as it allows your agents to semantically search and retrieve relevant information from your knowledge table.

Common errors

Formatting Examples

Example 1: Replace all poodles with bulldogs

// Filters
[
  {
    "breed": "poodle"
  }
]
// Update value
[
  {
    "breed": "bulldog"
  }
]

Example 2: Replace all small poodles with large bulldogs

// Filters
[
  {
    "breed": "poodle",
    "size": "small"
  }
]
// Update value
[
  {
    "breed": "bulldog",
    "size": "large"
  }
]

Example 3: Replace all poodles and bulldogs with cats

// Filters
[
  {
    "breed": "poodle"
  },
  {
    "breed": "bulldog"
  }
]
// Update value
[
  {
    "breed": "cat"
  }
]

Ensure to separate each object with a comma if filtering multiple rows.

Frequently asked questions

What happens if I don’t enable “Sync on Upload”?

If “Sync on Upload” is disabled, the data will be stored but not vectorized. This means your agents won’t be able to semantically search or reference that data until you manually vectorize it.

How do I update a field to be empty/blank?

You can update a field to be empty/blank by setting the value to empty quote marks "".

What data types can I update with?

You can use text, numbers, booleans, or any JSON-serializable value. Just make sure each object in the array follows the correct formatting.