@vespermcp/mcp-server 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/search/engine.js +16 -4
- package/package.json +1 -1
package/build/search/engine.js
CHANGED
|
@@ -124,15 +124,27 @@ export class SearchEngine {
|
|
|
124
124
|
* Determine if JIT should be triggered
|
|
125
125
|
*/
|
|
126
126
|
shouldTriggerJIT(results, query) {
|
|
127
|
-
|
|
127
|
+
const queryWords = query.trim().split(/\s+/).length;
|
|
128
|
+
// Condition 1: Zero results (Always trigger JIT)
|
|
129
|
+
if (results.length === 0) {
|
|
130
|
+
log(`JIT trigger: No results found for "${query}"`);
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
// Condition 2: Very few results
|
|
128
134
|
if (results.length < 3) {
|
|
129
135
|
log(`JIT trigger: Only ${results.length} results found`);
|
|
130
136
|
return true;
|
|
131
137
|
}
|
|
132
|
-
// Condition
|
|
138
|
+
// Condition 3: Low confidence (top result has low similarity)
|
|
139
|
+
// Increased threshold from 0.60 to 0.75 for better specific-query matching
|
|
133
140
|
const topScore = results[0]?.relevance_score || 0;
|
|
134
|
-
if (topScore < 0.
|
|
135
|
-
log(`JIT trigger: Low confidence (top score: ${topScore})`);
|
|
141
|
+
if (topScore < 0.75) {
|
|
142
|
+
log(`JIT trigger: Low confidence (top score: ${topScore}, threshold: 0.75)`);
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
// Condition 4: Long specific queries with mediocre matches
|
|
146
|
+
if (queryWords >= 4 && topScore < 0.85) {
|
|
147
|
+
log(`JIT trigger: Long query with mediocre top score (${topScore})`);
|
|
136
148
|
return true;
|
|
137
149
|
}
|
|
138
150
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vespermcp/mcp-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "AI-powered dataset discovery, quality analysis, and preparation MCP server with multimodal support (text, image, audio, video)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|