Extract entity from text

Hello, I currently have a problem that I am stuck with. I want to use AI to extract entities from articles. At the moment, I am using the "Extract entity from text" function. The issue I am facing is that it only works for individual database entries. I would like it to go through all the contents of the database and remove the specified properties. Does anyone have an idea for this?

P.S. I have opened this topic before, but unfortunately, it didn’t work out as I wanted.

Does the Input allow you to use a map function?

{{ table4.data.map(row => { return row.BEZEICHNUNG_SSB } ) }}

yes it does allow it but it doesn't Analyze every row just the first one

Hey @MC123! :wave:

If I understand correctly, you want to pass in the entire contents of the table as context for your AI Action query and have it extract the specified information from each record. Is that right?

If so, you are going to be limited by the way the "Extract entity from text" action operates - it returns just a single value for each of the listed entities. You might be better served by looping through each row of your table and querying each separately or, if you're dealing with a relatively static data set, utilizing a vector database.

Let me know if I'm not understanding your use case correctly or if you have any follow-up questions about these suggestions!

Yes u understood the use case. How can I loop it through each row, can u show me an example?

I need the "Extract entity from text" function tho.

Yep! Here's an example:

In the first image, you can see that we're looping through every row in the table and triggering the extractInfo query. We're able to pass in rowData as a parameter using the additionalScope option. As shown, the response is only being logged to the console but you could handle it however you want!

The second image shows how I've configured the extractInfo query itself. Let me know if you have any follow-up questions!