Find the best match for a query string from a list of targets.
POST/ai/fuzzy-match
This function takes a query string and a list of target strings. It uses an LLM to find the best match(es), accounting for variations in the query string, and returns the closest match(es) based on the options provided.
Request
Header Parameters
ipaas string
- application/json
Bodyrequired
queryStringstringrequired
The main string you want to match against the target list. Typically, this is the name or entity you are searching for.
Example:
Alf from Melmac
contextstring
A short description of the type of data being matched. This helps provide additional clarity for the AI in determining the best match.
Example:
Names of people
targetListstring[]required
The list of potential matches. Each entry in this list represents a possible candidate for matching with the query string.
Example:
["Willie Tanner","Gordon Shumway","Kate Tanner","Trevor Ochmonek"]
options object
maxResultsnumber
The maximum number of matches to return. Defaults to 1 if not specified.
Example:
2
Responses
- 200
- 400
Success
- application/json
- Schema
- Example (auto)
Schema
- array
- string
- Array [
- ]
matches objectrequired
anyOf
string
string
A single matched string if maxResults
is 1.
Example:
Gordon Shumway
{
"matches": [
"Gordon Shumway"
]
}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
statusnumber
errorMessagestring
{
"status": 0,
"errorMessage": "string"
}