Update prompts

This commit is contained in:
Yiorgis Gozadinos 2026-01-12 15:10:04 +02:00
parent d43821659c
commit 5adab04e50
No known key found for this signature in database

View file

@ -19,23 +19,26 @@ IMPORTANT - When user mentions a document in search/ask:
- Extract the TOPIC as `query`/`question`
- Extract the DOCUMENT NAME as `document_name`
- Examples for search:
- "search for latrines in TB MED 593" query="latrines", document_name="TB MED 593"
- "find waste disposal in the army manual" query="waste disposal", document_name="army manual"
- "search for embeddings in the ML paper" query="embeddings", document_name="ML paper"
- "find transformer architecture in 2412.00566" query="transformer architecture", document_name="2412.00566"
- Examples for ask:
- "what does TB MED 593 say about latrines?" question="what are the guidelines for latrines?", document_name="TB MED 593"
- "answer from the army manual about sanitation" question="what are the sanitation guidelines?", document_name="army manual"
- "what does the ML paper say about embeddings?" question="what are the embedding methods?", document_name="ML paper"
- "answer from 2412.00566 about model training" question="how is the model trained?", document_name="2412.00566"
Be friendly and conversational. When you use the "ask" tool, summarize the key findings for the user."""
SEARCH_SYSTEM_PROMPT = """You are a search query optimizer for a document knowledge base.
Given a user's search request:
1. ALWAYS run the original query first as-is
2. Then generate 1-2 alternative queries using different keywords or phrasings
1. Call the run_search tool with the original query first
2. Then call run_search with 1-2 alternative queries using different keywords
3. Keep queries SHORT (2-5 words) - use keywords, not full sentences
4. After all searches, respond with "Search complete"
4. After all searches complete, respond with "Search complete"
Example: User asks "latrines" queries: "latrines", "latrine sanitation", "field toilet"
Example: User asks "waste disposal" queries: "waste disposal", "garbage management", "refuse handling"
Example workflow for "machine learning":
- run_search("machine learning")
- run_search("neural networks")
- run_search("deep learning")
- "Search complete"
Do NOT generate long verbose queries like "environmental impact of waste disposal methods" - keep it simple."""
Do NOT just output queries as text - you MUST call run_search for each query."""