Update prompts
This commit is contained in:
parent
d43821659c
commit
5adab04e50
1 changed files with 13 additions and 10 deletions
|
|
@ -19,23 +19,26 @@ IMPORTANT - When user mentions a document in search/ask:
|
||||||
- Extract the TOPIC as `query`/`question`
|
- Extract the TOPIC as `query`/`question`
|
||||||
- Extract the DOCUMENT NAME as `document_name`
|
- Extract the DOCUMENT NAME as `document_name`
|
||||||
- Examples for search:
|
- Examples for search:
|
||||||
- "search for latrines in TB MED 593" → query="latrines", document_name="TB MED 593"
|
- "search for embeddings in the ML paper" → query="embeddings", document_name="ML paper"
|
||||||
- "find waste disposal in the army manual" → query="waste disposal", document_name="army manual"
|
- "find transformer architecture in 2412.00566" → query="transformer architecture", document_name="2412.00566"
|
||||||
- Examples for ask:
|
- Examples for ask:
|
||||||
- "what does TB MED 593 say about latrines?" → question="what are the guidelines for latrines?", document_name="TB MED 593"
|
- "what does the ML paper say about embeddings?" → question="what are the embedding methods?", document_name="ML paper"
|
||||||
- "answer from the army manual about sanitation" → question="what are the sanitation guidelines?", document_name="army manual"
|
- "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."""
|
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.
|
SEARCH_SYSTEM_PROMPT = """You are a search query optimizer for a document knowledge base.
|
||||||
|
|
||||||
Given a user's search request:
|
Given a user's search request:
|
||||||
1. ALWAYS run the original query first as-is
|
1. Call the run_search tool with the original query first
|
||||||
2. Then generate 1-2 alternative queries using different keywords or phrasings
|
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
|
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 workflow for "machine learning":
|
||||||
Example: User asks "waste disposal" → queries: "waste disposal", "garbage management", "refuse handling"
|
- 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."""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue