datascienceharp commited on
Commit
3882789
·
1 Parent(s): eb1f97f

update full prompt

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -190,7 +190,7 @@ class FiftyOneAssistant:
190
  """Wrapper for GPU embedding function."""
191
  return get_embedding_gpu(text, config.embedding_model)
192
 
193
- def hybrid_search(self, query_text: str, query_vector: List[float], limit: int = 5, text_boost: float = 0.3):
194
  """
195
  Hybrid search using only dense vectors + text filtering
196
  """
@@ -276,14 +276,20 @@ class FiftyOneAssistant:
276
 
277
  try:
278
  # Prepare the full prompt
279
- full_prompt = f"""Based on your knowledge of FiftyOne and the following FiftyOne documentation, answer the user's question:
 
 
 
 
 
 
280
 
281
- DOCUMENTATION:
282
  {context}
283
 
284
- USER QUESTION: {user_query}
285
 
286
- Provide a helpful answer using the DOCUMENTATION and your own knowledge of FiftyOne. Your code examples should be complete and fully self-contained."""
 
287
 
288
  messages = [
289
  {"role": "system", "content": config.system_prompt},
 
190
  """Wrapper for GPU embedding function."""
191
  return get_embedding_gpu(text, config.embedding_model)
192
 
193
+ def hybrid_search(self, query_text: str, query_vector: List[float], limit: int = 2, text_boost: float = 0.3):
194
  """
195
  Hybrid search using only dense vectors + text filtering
196
  """
 
276
 
277
  try:
278
  # Prepare the full prompt
279
+ full_prompt = f"""Your task is to generate a helpful response to the user's query about using FiftyOne, and provide the appropriate function calls and class methods so that the user can understand how to use FiftyOne to achieve their goal.
280
+
281
+ This is the user's query: {user_query}
282
+
283
+ The following is some context about FiftyOne which you may find helful to answer this query:
284
+
285
+ #######
286
 
 
287
  {context}
288
 
289
+ #######
290
 
291
+ You already have knowledge of FiftyOne, and also some additional context. Now, answer the following user query: {user_query}
292
+ """
293
 
294
  messages = [
295
  {"role": "system", "content": config.system_prompt},