Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -358,15 +358,19 @@ def rag_workflow(query):
|
|
358 |
2. Remove conversational elements like greetings or pleasantries (e.g., "Hello Chatbot", "I need you to help me with").
|
359 |
3. Exclude specific variable values (e.g., "ID of my record is '31'") unless essential to the intent.
|
360 |
4. Rephrase the query to match the format and keywords used in the docstrings, focusing on verbs and objects relevant to the action (e.g., "Add a record to a collection").
|
361 |
-
5. Given the query the user might need more than one
|
362 |
|
363 |
Examples:
|
364 |
- User query: "Create a Python script with a method that facilitates the creation of records. This method should accept an array of identifiers as a parameter and allow metadata to be added to each record."
|
365 |
- Rewritten query: "create records, add metadata to record"
|
366 |
- User query: "Hi, can you help me write Python code to add a record to a collection? The record ID is '45', and the collection ID is '12'."
|
367 |
Rewritten query: "add a record to a collection"
|
|
|
|
|
368 |
|
369 |
-
Based on these examples and guidelines, rewrite the following user query to align more effectively with the keywords used in the docstrings.
|
|
|
|
|
370 |
Original query:
|
371 |
{query}
|
372 |
"""
|
|
|
358 |
2. Remove conversational elements like greetings or pleasantries (e.g., "Hello Chatbot", "I need you to help me with").
|
359 |
3. Exclude specific variable values (e.g., "ID of my record is '31'") unless essential to the intent.
|
360 |
4. Rephrase the query to match the format and keywords used in the docstrings, focusing on verbs and objects relevant to the action (e.g., "Add a record to a collection").
|
361 |
+
5. Given the query the user might need more than one action to achieve his goal. In this case the rewritten query has more than one action.
|
362 |
|
363 |
Examples:
|
364 |
- User query: "Create a Python script with a method that facilitates the creation of records. This method should accept an array of identifiers as a parameter and allow metadata to be added to each record."
|
365 |
- Rewritten query: "create records, add metadata to record"
|
366 |
- User query: "Hi, can you help me write Python code to add a record to a collection? The record ID is '45', and the collection ID is '12'."
|
367 |
Rewritten query: "add a record to a collection"
|
368 |
+
- User query: I need a python script with which i create a new record with the title: "Hello World" and then link the record to a given collection.
|
369 |
+
Rewritten query: "create a new record with title" , "link a record to a collection"
|
370 |
|
371 |
+
Based on these examples and guidelines, rewrite the following user query to align more effectively with the keywords used in the docstrings.
|
372 |
+
Do not include any addition comments, explanations, or text.
|
373 |
+
|
374 |
Original query:
|
375 |
{query}
|
376 |
"""
|