Clay Icon

Handling Null Outputs in AI Enrichment Columns

·
·

Is there a way to make a "Use AI" enrichment column return nothing/null/undefined when it can't fulfill the prompt, when it's final output is configured to be a number? It seems to get converted to 0 every time

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    Currently, there's no direct way to configure a "Use AI" enrichment to return nothing, null, or undefined instead of 0 when it can't fulfill a prompt for a numeric output. However, you can work around this using AI formulas or conditional runs. Here's a potential solution: 1. Set up your "Use AI" enrichment as usual. 2. Add a formula column that checks the AI output. 3. Use an AI formula to return null or a custom value if the AI output is 0 or doesn't meet your criteria. If you need help creating this formula, you can use the AI help tool by clicking "Help me" in the Configuration section. If you require further assistance, please request human support by clicking "Talk to a person" in this chat.

  • Avatar of João T.
    João T.
    ·
    ·

    What if the result of the AI enrichment is supposed to be actually 0 sometimes? The formula wouldn't be able to tell them apart

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    Currently, there's no direct way to configure a "Use AI" enrichment to distinguish between a true numeric 0 result and cases where the AI can't fulfill the prompt. However, you can work around this using AI formulas and examples. Here's a potential solution: 1. Set up your "Use AI" enrichment as usual. 2. Use the "Examples" feature to show the AI how to handle cases where it can't fulfill the prompt. For instance, you could specify that it should return a specific string like "UNABLE_TO_PROCESS" in such cases. 3. Add an AI formula column that checks the "Use AI" output. If the output is "UNABLE_TO_PROCESS", return null. Otherwise, return the original value. To set this up, you can use the AI help tool by clicking "Help me" in the Configuration section of the "Use AI" enrichment. What specific use case are you working on that requires this distinction?

  • Avatar of João T.
    João T.
    ·
    ·

    Sounds sloppy. Are empty string values skipped in a waterfall? If so, I could just make the AI return an empty string when it can't fulfill the request, so that it gets skipped. For other results, I'd have to convert them to numbers somewhere else

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    Empty string values are not typically skipped in a waterfall. Waterfalls run sequentially, stopping when they find a valid result, regardless of whether it's an empty string or not. However, you can create a custom waterfall to achieve what you're looking for: 1. Set up your "Use AI" enrichment to return an empty string when it can't fulfill the request. 2. Create a custom waterfall with your AI enrichment as the first step. 3. Add a formula column after the AI step to convert non-empty strings to numbers. 4. Continue the waterfall with other enrichments if needed. This approach allows you to skip empty strings and process valid numeric results. If you need further assistance with this setup, please request human support by clicking "Talk to a person" in this chat.

  • Avatar of Anaum K.
    Anaum K.
    ·
    ·

    Hello João! Thank you for reaching out! Do you mind sending the link (url) to the table so we can take a look?

    (52 kB)
    Image
  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    This thread was picked up by our in-app web widget and will no longer sync to Slack. If you are the original poster, you can continue this conversation by logging into https://app.clay.com and clicking "Support" in the sidebar. If you're not the original poster and require help from support, please post in 02 Support.