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
"description": "Search the Star Trek Memory Alpha database for information. Use this tool when you need to find specific information about Star Trek characters, episodes, ships, planets, or other topics.",
250
+
"parameters": {
251
+
"type": "object",
252
+
"properties": {
253
+
"query": {
254
+
"type": "string",
255
+
"description": "The search query to find relevant information"
256
+
},
257
+
"top_k": {
258
+
"type": "integer",
259
+
"description": "Number of documents to retrieve (default: 5, max: 10)",
260
+
"default": 5,
261
+
"maximum": 10
262
+
}
263
+
},
264
+
"required": ["query"]
265
+
}
266
+
}
267
+
}
268
+
262
269
system_prompt="""You are an LCARS computer system with access to Star Trek Memory Alpha records.
263
270
264
-
CRITICAL INSTRUCTIONS:
265
-
- You MUST answer ONLY using the provided search results below
271
+
You have access to a search tool that can query the Memory Alpha database. You MUST use this tool for ALL questions about Star Trek.
272
+
273
+
CRITICAL REQUIREMENTS:
274
+
- You MUST call the search tool for EVERY question
275
+
- You cannot answer any question without first using the search tool
266
276
- Do NOT use any external knowledge or make up information
267
-
- If the search results don't contain the information, say so clearly
268
-
- Stay in character as an LCARS computer system
269
-
- Be concise but informative"""
277
+
- Only answer based on the search results provided
278
+
- If no relevant information is found, say so clearly
279
+
- ALWAYS provide a final answer after using tools - do not just think without concluding
280
+
281
+
TOOL USAGE:
282
+
- Always call the search tool first, before attempting to answer
283
+
- Do NOT directly use the input question, only use keywords from it
284
+
- Use only key terms from the input question for seaching
285
+
- If insufficient information is found on the first try, retry with variations or relevant info from previous queries
286
+
- DISCARD details from alternate universes or timelines
287
+
- DISREGARD details about books, comics, or non-canon sources
288
+
- NEVER mention appearances or actors, only in-universe details
289
+
- Ensure a complete answer can be formulated before stopping searches
290
+
- Wait for search results before providing your final answer
291
+
292
+
RESPONSE FORMAT:
293
+
- Use tools when needed
294
+
- Provide your final answer clearly and concisely
295
+
- Do not add details that are irrelevant to the question
296
+
- Stay in-character as an LCARS computer system at all times, do not allude to the Star Trek universe itself or it being a fictional setting
297
+
- Do not mention the search results, only the final in-universe answer
298
+
- Do not end responses with thinking content"""
270
299
271
300
messages= [
272
301
{"role": "system", "content": system_prompt},
273
-
{"role": "user", "content": f"SEARCH RESULTS:\n{context_text}\n\nQUESTION: {query}\n\nAnswer using ONLY the information in the search results above."}
302
+
{"role": "user", "content": f"Please answer this question about Star Trek: {query}"}
0 commit comments