You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance query descriptions in PerplexityServer to emphasize the importance of specificity. Updated prompts for search, reasoning, and research queries to instruct users on including detailed context, error messages, and relevant information for more accurate responses.
Copy file name to clipboardExpand all lines: src/index.ts
+34-22Lines changed: 34 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ class PerplexityServer {
206
206
properties: {
207
207
query: {
208
208
type: "string",
209
-
description: "The search query or question"
209
+
description: "The search query or question. IMPORTANT: Be extremely specific and include all relevant details:\n- Include exact error messages, logs, and stack traces if applicable\n- Provide exact terminology, function names, API names, version numbers\n- Include relevant code snippets showing the problem or context\n- Specify platform, OS, framework versions, and environment details\n- Mention any attempted solutions or workarounds\n- Provide context about what you're trying to achieve\n\nThe more specific details you include, the more accurate and helpful the answer will be."
210
210
},
211
211
force_model: {
212
212
type: "boolean",
@@ -225,7 +225,7 @@ class PerplexityServer {
225
225
properties: {
226
226
query: {
227
227
type: "string",
228
-
description: "The complex query or task to reason about"
228
+
description: "The complex query or task to reason about. IMPORTANT: Be extremely specific and include all relevant details:\n- Include exact error messages, logs, and stack traces if applicable\n- Provide exact terminology, function names, API names, version numbers\n- Include relevant code snippets showing the problem or context\n- Specify platform, OS, framework versions, and environment details\n- Mention any attempted solutions or workarounds\n- Provide context about what you're trying to achieve\n- Include relevant data structures, configurations, or inputs\n\nThe more specific details you include, the more accurate and helpful the answer will be."
229
229
},
230
230
force_model: {
231
231
type: "boolean",
@@ -244,7 +244,7 @@ class PerplexityServer {
244
244
properties: {
245
245
query: {
246
246
type: "string",
247
-
description: "The research topic or question to investigate in depth"
247
+
description: "The research topic or question to investigate in depth. IMPORTANT: Be extremely specific and include all relevant details:\n- Include exact error messages, logs, and stack traces if applicable\n- Provide exact terminology, function names, API names, version numbers\n- Include relevant code snippets showing the problem or context\n- Specify platform, OS, framework versions, and environment details\n- Mention any attempted solutions or workarounds\n- Provide context about what you're trying to achieve\n- Include relevant data structures, configurations, or inputs\n- Specify the scope, constraints, or specific requirements\n\nThe more specific details you include, the more accurate and helpful the answer will be."
248
248
},
249
249
focus_areas: {
250
250
type: "array",
@@ -289,42 +289,54 @@ class PerplexityServer {
289
289
switch(selectedTool){
290
290
case"search": {
291
291
model="sonar-pro";
292
-
prompt=`Provide a clear, concise answer to: ${query}`;
292
+
prompt=`You are answering a query that should contain specific details like error messages, logs, code snippets, exact terminology, version numbers, and context. Use all provided details to give the most accurate answer possible.
293
+
294
+
Query: ${query}
295
+
296
+
Provide a clear, concise answer that directly addresses the specific details in the query.`;
293
297
break;
294
298
}
295
299
296
300
case"reason": {
297
301
model="sonar-reasoning-pro";
298
-
prompt=`Provide a detailed explanation and analysis for: ${query}. Include:
299
-
1. Step-by-step reasoning
300
-
2. Key considerations
301
-
3. Relevant examples
302
-
4. Practical implications
303
-
5. Potential alternatives`;
302
+
prompt=`You are answering a query that should contain specific details like error messages, logs, code snippets, exact terminology, version numbers, and context. Carefully analyze all provided details to give the most accurate and helpful answer.
303
+
304
+
Query: ${query}
305
+
306
+
Provide a detailed explanation and analysis that:
307
+
1. Addresses the specific details provided (errors, logs, code, versions, etc.)
308
+
2. Includes step-by-step reasoning based on the actual context
309
+
3. Identifies key considerations relevant to the specific situation
310
+
4. Provides relevant examples matching the described scenario
311
+
5. Offers practical implications based on the exact details provided
312
+
6. Suggests potential alternatives or solutions tailored to the specific context`;
prompt=`Conduct comprehensive research on: ${query}`;
320
+
prompt=`You are answering a research query that should contain specific details like error messages, logs, code snippets, exact terminology, version numbers, and context. Use all provided details to conduct the most accurate and comprehensive research.
0 commit comments