How to use Files in AI Prompts - Provide File Content as Prompt Context and Get AI Response to Update Fields on Object Records - e2a AI Services with Files


From e2a v3.4945 onwards, now AI Prompts have been enhanced to use files to be included in the AI Prompt's context (the data which is sent to AI along with the prompt text/request). Currently, supported file types are .PDF, .DOCX and .TXT. You can follow these below steps to configure an AI Prompt to use files.

 

  1. Create an AI Prompt: 

    Both 'Human-like Text' and 'Structured Data' Prompts can be configured to use files.
    After the creation of AI Prompt as per your requirements, you can go to the below next step to configure the Additional Context Datasets in an AI Prompt.

  2. Add Additional Context Datasets:
    Click on Add button in the 'Additional Context Datasets' Section:


    In the 'Manage Salesforce file source configuration' modal, provide details and criteria for the selection of files to be used in the AI Prompt.


         a. Enter an appropriate 'Name' for this particular dataset.
         b. Enter relevant 'Description'.
         c. Select 'File Types' from the Available file types and move them to Selected column.
         d. Enter the number of files in this field which you want to select to be considered to be sent in the AI Prompt request to GPT or any other LLM.
         e. Select the suitable option to make the selection in 'Sort Files By' dropdown.

    Click 'OK' button to save the context dataset record.
  3. Utilize Your AI Prompt to Get Data from a File and Update a Field on an Object Record:

         a. Navigate to an e2a Email Rule and create a new Field Assignment Rule
         b. Select 'Update Field Using AI Prompt v1.0' as the Action Type. (Note that only AI prompts related to the selected context object/target object type will be visible)

         c. Configure Trigger Conditions based on your scenario requirements
        d. Choose the AI Prompt to Execute.

        e. Specify Destination Fields. 
    For example, in the scenario below, the response for Structured Data Property 'Invoice Number' will be stored in the Case's Invoice Number field.

         f. Now, you can Save the above Field Assignment Rule.
            It should update the 'Invoice Number' field present on the Case object with the value obtained from the AI Prompt's structured data property of 'Invoice Number' when this FAR will get executed as result of an incoming email to the email service address of the respective e2a email rule.
     

 

Please contact us at support@ortooapps.com for any questions.

Was this information helpful?
Quick survey: How do you rate Email-to-anything?
★★★★★ - EXCELLENT
★★★★ - GOOD
★★★☆☆OK
★★☆☆☆POOR
☆☆☆☆ - RUBBISH

-