Skip to main content

I’m trying to create a matchmaking system so I thought of using AI to build recommendations but when I ask the Agent Field to cross the database I’m getting this error: 

“I cannot provide any matches for Alice Johnson. The analysis requires comparing her profile with other users' profiles, but no other user data has been provided in the context. To perform effective matchmaking based on overlapping tags... I would need access to other users' profiles for comparison.”

Anyway I could solve this and give it access to the whole base or is it how it’s supposed to work? 

Hi ​@flaviagoma,

 

I imagine you have a table of people and their respective fields with data about them. A field agent needs to be given all the information it needs in order to be able to find a match. You will need to give it all the fields of the record to the field agent as well as all the fields of every other record (other people to match). 
 

You can accomplish this by creating a new table where you would just have 1 record. This table should be linked to your people table. That one record in this new table should be linked to every record in your people table. Then you can create a look ups for all the fields in your people table. These fields will be arrays of all the details about each person. 
 

Then back in your people table, you can do a lookup of those lookups fields from your new table. Then just feed those fields to the AI agent field. The array fields should all be in the same order so you can tell the AI in your prompt that too. Make sure you also have a look up field array with the names of the people so that the AI can just return a list of names that would be a match.

 

If this isn’t clear enough, I can create quick demo base I can share here. Hope this helps!


Hm, depending on how much data you’re feeding the Agent this might use a whole bunch of AI credits, and so you may want to keep an eye on usage while doing this too


Hey ​@airvues , thanks so much for the instructions. At first I was skeptical wondering how it could correlate the different array fields with each other but I followed throught and it seemed to work. However, the models kept feeding me wrong information, it would attribute wrong tags to the wrong users and some cases seemed like it was making things up.

Then I  asked it to rewrite the array fields as a text listing each users’ and their corresponding tags so I could test its ability to read the database and the result was a bunch of wrong answers too. Idk if there’s something wrong with the method or prompting, or if LLMs can’t be trusted for this, 
 


Hey, so the Field Agent can only look at fields of the record it’s in. So if you have a People table with records about each person, and you create a field in that table with a Field Agent in it, then when you run the Field Agent on one record, it can only look at the fields of that record -- which is why you get the response about only having info about Alice.

@airvues’ suggestion is to create a table that links to every record in the People table, then link back to it. That gets all the information into the record, so the Field Agent can process it. But the problem with that is that it’s unclear to the LLM what tag goes with what person. 

I suggest you try this to help the Field Agent: in your People table, create formula fields that have the information and link to those instead. For example, if your table has info about hair colour, pets and age, you would create a formula field using a CONCAT formula that outputs something like “Name: Alice | Hair: White | Pets: Cat | Age: 99”. (If you are comfortable with JSON, I suggest you make this output in JSON, because LLMs really parse JSON well.) Your one-record table that links to every record in your People table should lookup this field, let’s call it “Person Details”. Then look that up from your Person table and feed that field to the LLM. 


@flaviagoma,

 

The solution I provided was based only if you wanted to stick to using a field agent. I believe in your particular use case it would be better to use an automation. You could bypass the need for an additional table that way. 

 

Your automation could start by using a find block to look for all available people to match. You could have it find all people who are active and that is not the person that you are trying to find a match for. Then you can use the “Generate text with AI” action block and you can pass in the information from all your possible matches from the find block. Taking in the suggesting from ​@nroshak, you can use the concatenated formula field that already contains all of the information for each person to make it easy to give the AI all the information. 

 

From there you can tell the prompt to return only the name or names of the people that would be a match. You would still need to provide the AI your match algorithm, the more detailed the more consistent this will be. 

 

You could also take this a step further and have the matches be created in a junction table that way you can create a record for each match and you can add a few more data like what was the matching percentage, or a brief summary of why they were a good match. This add another level of visibility into each match. 

 

Finally, to address ​@TheTimeSavingCo comment, the amount of tokens you will spend on doing all these matching could be quite a lot. As you scale your solution you might have to figure out if that is worth the cost. As you scale, you could move into a more algorithmic matching process aided by AI. This might save you a lot on tokens and could improve consistency in your matches. If interested in something like that let me know and I can share some more ideas.

 


You guys are great!! Really, really helpful :D 

@nroshak I followed your suggestion and it worked with gemini 2.5 Pro \o/, other models kept feeding wrong information even with the concatenate info. And I couldn’t find the JSON option.

@airvues I’m not sure how to build this automation. What would the trigger be? Also won’t this method use more AI Credits? I’d love to have “the matching percentage, or a brief summary of why they were a good match” btw.

For context, there are 5 fields I’m cross referencing ('Life-Supporting Systems', 'Skills & Habits', 'Interest & Motivations', 'Knowledge & Ideas', and 'Needs & Desires'.). These fields are linked to a Tags table to standardize the input.
 


You could create a Matches table with fields like Person 1, Person 2 and Fields Matched. Have the automation logic be like: When a record in People table is updated, Find Records that match on 'Life-Supporting Systems'. For each of those matching records, look for a record in Matches table that has both of the people in it; if found, update it so that it says they match on ‘'Life-Supporting Systems'; if not found, create it. Add the same logic for the other 4 fields to the trigger. Next, add an additional trigger to Matches table so that when a record is updated, it recalculates the Match percent. Finally, if you already have records in People, add a checkbox field to People called “Run Trigger”. You can check that field for everybody, in order to force the trigger to run for everyone in the table, and then delete the field. This won’t use any AI credits.


@flaviagoma,

 

The automation trigger really depends on how you want your system to work. As new people get added to your table and all of their fields are completed  could be a trigger, or if you want to verify things before triggering then you could have your trigger be a checkbox. There is so many different ways to set this up, I can give you a recommendation if you give me more details into how you envision your system to work as you get more people into your database. 

 

Also not sure if you can only match with one person at a time, but if that is the case you would actually wont need to run this automation on every person on your table, if a match is found then the person who matched no longer needs to run the matching automation for themselves since they already got a match. So this would actually result in you needed to use the AI block less times than if you use the field agent. With the field agent, AI tokens will run on all records, but with the automation you can control which records need to run the AI. 

 

I’ll work on a simple demo to share later this week. Keep an eye out!


Thanks ​@airvues !! Looking forward to your demos on automations. They are really tricky for me still.

The matchmaking system I’m trying to build is supposed to give multiple options, so it would have to run for every person. I’m now wondering if it’s possible to create an automation that looks for tags in different fields and tables. I also have a Task table, linked to the same tag fields mentioned before, and I’m trying to set up a system that recommends collaborators (from the User table) to the tasks based on similar tags in both tables. 

I was able to create a agent field for that recommendation in the Task Table (using the same concatenate field), but I’d like to have this info in the User table as well. Like, show the user a Task recommendation based on the similar tags.  


@airvues  ​@TheTimeSavingCo   ​@nroshak  I’m looking into automations for the matchmaking and realized when I use lookup fields in a concatenate formula, the values within each fields are not being separeted with commas. Any idea why is that?
 

 


I’m not totally sure what you’re trying to do here, but if you’re manipulating lookup field values, you might want a rollup field here, not a formula field. https://support.airtable.com/docs/rollup-field-overview#rollup-field-functions-reference