Hello fellow developers! I'm currently working on a project that involves searching through JSON files based on input sentences using the Assistant API. The objective is to identify matches where either a word or the entire sentence aligns with parameters in the JSON entries. Additionally, I'm aiming to filter out common words, or stop words, and provide the corresponding 'Id' field for matches.
Specifics:
Substring Search: Break down the given sentence into words for a precise substring search in the information contained in provided JSON files.
Non-Common Words: Exclude common words (stop words) such as articles, prepositions, and frequently used words from the search. Focus on finding matches with non-common words in the JSON entries.
Output Format: Return the corresponding 'Id' field for matches where non-common words or the entire sentence align with any parameter in the JSON entries. If no match is detected, generate an output of 'No Entry.' Structure the output in JSON format as follows:
Example:
{
"ids": [ids with a match]
}
If no match is found:
{
"ids": []
}
Note: I'm utilizing the Assistant API for this task. I am using Assistant API just because of fast searching and some intelligence. I am giving the JSON file in the Assistant API. The main problem is that I am not getting the correct output.
Instructions:
Feel free to share your code, pseudocode, or thoughts on how to approach this challenge. Any programming language is welcome. Let's collaborate to create an efficient solution.
Happy coding! 🚀