Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
|
@@ -103,17 +103,25 @@ def create_rag_tool():
|
|
| 103 |
context = "\n\n".join(d.page_content for d in docs)
|
| 104 |
|
| 105 |
return f"""
|
| 106 |
-
You are given extracted content from a document.
|
| 107 |
-
|
| 108 |
-
Your task:
|
| 109 |
-
-
|
| 110 |
-
- Use bullet points
|
| 111 |
-
-
|
| 112 |
-
- Do NOT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
-
DOCUMENT CONTENT:
|
| 115 |
-
{context}
|
| 116 |
-
"""
|
| 117 |
|
| 118 |
return rag_search
|
| 119 |
|
|
|
|
| 103 |
context = "\n\n".join(d.page_content for d in docs)
|
| 104 |
|
| 105 |
return f"""
|
| 106 |
+
You are given extracted content from a document.
|
| 107 |
+
|
| 108 |
+
Your task:
|
| 109 |
+
- Produce ONE concise summary only.
|
| 110 |
+
- Use bullet points where appropriate.
|
| 111 |
+
- Do NOT repeat information.
|
| 112 |
+
- Do NOT restate the same idea in different words.
|
| 113 |
+
- Do NOT explain what the document is about.
|
| 114 |
+
- Do NOT add conclusions or meta commentary.
|
| 115 |
+
- Stop once the summary is complete.
|
| 116 |
+
|
| 117 |
+
IMPORTANT:
|
| 118 |
+
Return ONLY the final summarized content.
|
| 119 |
+
Do NOT add introductions, explanations, or commentary.
|
| 120 |
+
|
| 121 |
+
DOCUMENT CONTENT:
|
| 122 |
+
{context}
|
| 123 |
+
"""
|
| 124 |
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
return rag_search
|
| 127 |
|