Search Problems by Condition Text (Fuzzy Match)
sdamgia_search_by_textSearch for problems by fuzzy matching full condition text to find duplicates, similar problems, or problems from a text excerpt.
Instructions
Finds problems by matching against their full condition text using fuzzy text similarity algorithms.
When to use:
You have a problem's exact condition text but don't know its ID
You're looking for problems similar to one you've seen before
You want to find problems with nearly identical wording
You need to detect duplicate or similar problems across the database
You have partial problem text and want to find the closest matches
How it works:
Performs a broad search to find candidate problems
Fetches the full condition text for each candidate
Applies fuzzy text matching to calculate similarity scores
Returns problems that exceed the similarity threshold
Parameters:
subject(required): Subject code to search withincondition_text(required): The problem condition text to match against (10-1000 characters). Provide as much of the original problem text as possible for best results.threshold(optional): Similarity threshold from 0.0 to 1.0 (default: 0.6). Higher values = stricter matching. Recommended: 0.5-0.7 for approximate matches, 0.8+ for exact matches.limit(optional): Maximum number of matches to return (1-50, default: 20)response_format(optional): 'markdown' (default) or 'json'
Returns:
matches: Array of matching problems, each containing:
problem_id: The matched problem's IDsimilarity: Score from 0-1 indicating how closely the text matches (higher = better match)
total: Number of matches found
Similarity scores:
1.0: Exact match (identical text)
0.8-0.99: Very close match (minor differences in wording)
0.6-0.79: Similar problem (same concept, different phrasing)
0.4-0.59: Somewhat related (loosely connected)
<0.4: Poor match (not recommended)
Example usage:
{
"subject": "math",
"condition_text": "Find the area of a triangle with sides 3, 4, and 5 units.",
"threshold": 0.7,
"limit": 5,
"response_format": "markdown"
}Best practices:
Include the complete problem condition for best matching
For exact duplicates, set threshold to 0.9 or higher
For similar problems, use threshold around 0.6-0.7
If you get too many results, increase the threshold
If you get no results, decrease the threshold
Notes:
Condition text must be at least 10 characters
Fuzzy matching is computationally intensive - results may take longer
Searches broader than the limit, then applies fuzzy filtering
Some results may have lower similarity than expected due to formatting differences
For keyword-based searches, use
sdamgia_search_problemsinsteadFollow up with
sdamgia_get_problemto see full problem details
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | Subject code to search in | |
| condition_text | Yes | Problem condition text to search for (supports fuzzy matching) | |
| threshold | No | Similarity threshold for fuzzy matching (0-1, higher = stricter) | |
| limit | No | Maximum number of results to return | |
| response_format | No | markdown |