-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Main Problem:
Currently, we are still encountering 404 Not Found errors when using ARASAAC's "beast search" or "search" endpoints, even after implementing fallback mechanisms such as searching for infinitive forms of verbs, handling plurals. The 404 errors occur when the API fails to return a relevant pictogram for certain search terms.
Edge Cases:
Non-Infinitive Verbs: While the system attempts to handle verb forms, some cases still result in a 404, particularly for more complex or uncommon variations.
Synonyms or Alternative Phrases: The current approach does not account for synonyms that could be equally valid for the user’s intended action or object.
Proposed Solution:
Implement a strategy where, if a 404 error is encountered, we leverage an LLM (Large Language Model) to generate synonyms or alternative phrases for the original search term.
The system will:
- Generate synonyms for the original term using the LLM.
- Reattempt the search using the generated synonym(s).
Example:
Search for "brushing teeth" → 404 error.
Generate synonyms: "cleaning teeth," "brush teeth."
Search for "cleaning teeth" → Result found.
If still 404, reattempt with "brush teeth."