Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -411,16 +411,22 @@ class RaindropSearchBot:
|
|
| 411 |
logger.info(f"Generating search query for: {user_request}")
|
| 412 |
|
| 413 |
prompt = f"""
|
| 414 |
-
You are a search expert. Create a search query to find relevant documents about:
|
| 415 |
{user_request}
|
| 416 |
|
| 417 |
Guidelines:
|
| 418 |
- Focus on key concepts and synonyms
|
| 419 |
-
- Use
|
| 420 |
-
- Avoid complex operators or special characters
|
| 421 |
- Return only the search terms, no explanation
|
| 422 |
- Include alternative phrasings
|
| 423 |
-
- Keep it concise (max
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
|
| 425 |
Return only the search query terms.
|
| 426 |
"""
|
|
|
|
| 411 |
logger.info(f"Generating search query for: {user_request}")
|
| 412 |
|
| 413 |
prompt = f"""
|
| 414 |
+
You are a search expert. Create a search query to find relevant documents in raindrop about:
|
| 415 |
{user_request}
|
| 416 |
|
| 417 |
Guidelines:
|
| 418 |
- Focus on key concepts and synonyms
|
| 419 |
+
- Use combination of keywords that would appear in titles or descriptions
|
|
|
|
| 420 |
- Return only the search terms, no explanation
|
| 421 |
- Include alternative phrasings
|
| 422 |
+
- Keep it concise (max 6-8 key terms/phrases)
|
| 423 |
+
- use the formatting authorised in raindrop search:
|
| 424 |
+
o use " for exact search (ex: "artificial intelligence")
|
| 425 |
+
o use - to exclude some terms (ex: -math)
|
| 426 |
+
o use match:OR for alternatives (ex: apple banana match:OR)
|
| 427 |
+
o use parenthesis for combinations ( ex: sugar (banana apple match:OR) match:AND )
|
| 428 |
+
o use match:AND for inclusion of both cases systematically (ex: apple banana match:AND)
|
| 429 |
+
Example elaborate request: ("artificial intelligence" AI match:OR) -"machine learning"
|
| 430 |
|
| 431 |
Return only the search query terms.
|
| 432 |
"""
|