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
Copy file name to clipboardExpand all lines: admin/constants/ollama.ts
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -107,5 +107,35 @@ The suggestions should be in title case.
107
107
Ensure that your suggestions are comma-seperated with no conjunctions like "and" or "or".
108
108
Do not use line breaks, new lines, or extra spacing to separate the suggestions.
109
109
Format: suggestion1, suggestion2, suggestion3
110
+
`,
111
+
query_rewrite: `
112
+
You are a query rewriting assistant. Your task is to reformulate the user's latest question to include relevant context from the conversation history.
113
+
114
+
Given the conversation history, rewrite the user's latest question to be a standalone, context-aware search query that will retrieve the most relevant information.
115
+
116
+
Rules:
117
+
1. Keep the rewritten query concise (under 150 words)
118
+
2. Include key entities, topics, and context from previous messages
119
+
3. Make it a clear, searchable query
120
+
4. Do NOT answer the question - only rewrite the user's query to be more effective for retrieval
121
+
5. Output ONLY the rewritten query, nothing else
122
+
123
+
Examples:
124
+
125
+
Conversation:
126
+
User: "How do I install Gentoo?"
127
+
Assistant: [detailed installation guide]
128
+
User: "Is an internet connection required to install?"
129
+
130
+
Rewritten Query: "Is an internet connection required to install Gentoo Linux?"
131
+
132
+
---
133
+
134
+
Conversation:
135
+
User: "What's the best way to preserve meat?"
136
+
Assistant: [preservation methods]
137
+
User: "How long does it last?"
138
+
139
+
Rewritten Query: "How long does preserved meat last using curing or smoking methods?"
0 commit comments