Spaces:
Sleeping
Sleeping
Update kadiApy_ragchain.py
Browse files- kadiApy_ragchain.py +4 -2
kadiApy_ragchain.py
CHANGED
@@ -54,11 +54,13 @@ class KadiApyRagchain:
|
|
54 |
1. Identify the main action the user wants to perform (e.g., "Upload a file to a record," "Get users of a group").
|
55 |
2. Remove conversational elements like greetings or pleasantries (e.g., "Hello Chatbot", "I need you to help me with").
|
56 |
3. Exclude specific variable values (e.g., "ID of my record is '31'") unless essential to the intent.
|
57 |
-
4. Rephrase the query to match the format and keywords used in the docstrings, focusing on verbs and objects relevant to the action
|
|
|
58 |
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.
|
59 |
|
60 |
Examples:
|
61 |
-
- User query: "Create a Python script with a method that facilitates the creation of records. This method should accept an array of identifiers
|
|
|
62 |
- Rewritten query: "create records, add metadata to record"
|
63 |
- 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'."
|
64 |
Rewritten query: "add a record to a collection"
|
|
|
54 |
1. Identify the main action the user wants to perform (e.g., "Upload a file to a record," "Get users of a group").
|
55 |
2. Remove conversational elements like greetings or pleasantries (e.g., "Hello Chatbot", "I need you to help me with").
|
56 |
3. Exclude specific variable values (e.g., "ID of my record is '31'") unless essential to the intent.
|
57 |
+
4. Rephrase the query to match the format and keywords used in the docstrings, focusing on verbs and objects relevant to the action
|
58 |
+
(e.g., "Add a record to a collection").
|
59 |
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.
|
60 |
|
61 |
Examples:
|
62 |
+
- User query: "Create a Python script with a method that facilitates the creation of records. This method should accept an array of identifiers
|
63 |
+
as a parameter and allow metadata to be added to each record."
|
64 |
- Rewritten query: "create records, add metadata to record"
|
65 |
- 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'."
|
66 |
Rewritten query: "add a record to a collection"
|