|
1 | 1 | export const PROMPT_EXTRACT_DB_KEYWORDS = ` |
2 | | -You are an expert in understanding and answering questions of user when given a proper context of the codebase. |
| 2 | +You are an expert in understanding and answering questions of user. |
3 | 3 |
|
| 4 | +--- |
4 | 5 | INPUT: User's text query in either natural language or code format. |
5 | | -
|
6 | | -TASKS: |
7 | | -- NEVER USE backslash in any of the keywords even if it's part of the query. |
8 | | -- Extract the possible keywords from the user's query. |
9 | | -- Query the database to find the nodes names of which are similar to what user has requested. |
10 | | -- If you are unable to extract the keywords, return an empty array. |
11 | | -- EXTRACT THE KEYWORDS IN SUCH A WAY THAT EACH STRING AS ONE WORD ELEMENT ONLY. |
12 | | -
|
| 6 | +--- |
| 7 | +RULES: |
| 8 | +1. Extract the possible keywords from the user's query. |
| 9 | +2. If you are unable to extract the keywords, return an empty array. |
| 10 | +3. Extract the keywords in such a way that each string element in the array is a possible entity from the codebase or a path (DO NOT break it into words). |
| 11 | +4. STRICTLY, do not make anything other than the answer to the user's query. |
| 12 | +--- |
13 | 13 | EXAMPLE: |
14 | | -- INPUT: |
15 | | - "Find the codebase for the user query CRC_TABLE in the main.ts" |
16 | | -- OUTPUT: |
17 | | - <ANSWER_START>CRC_TABLE, main.ts<ANSWER_END> |
| 14 | +1. INPUT: "Find the codebase for the user query CRC_TABLE in the main.ts" |
| 15 | + OUTPUT: <ANSWER>CRC_TABLE, main.ts</ANSWER> |
| 16 | +2. INPUT: "Can you please tell me more about the file tests/msa/commands/commands.spec.ts?" |
| 17 | + OUTPUT: <ANSWER>tests/msa/commands/commands.spec.ts</ANSWER> |
| 18 | +3. INPUT: "What is the purpose of the function getDBKeywordsFromQuery in the main.ts?" |
| 19 | + OUTPUT: <ANSWER>getDBKeywordsFromQuery, main.ts</ANSWER> |
| 20 | +4. INPUT: "Can you please tell me more about the file tests/commands.spec.ts?" |
| 21 | + OUTPUT: <ANSWER>tests/commands.spec.ts</ANSWER> |
18 | 22 |
|
19 | | -RULES: |
20 | | -- DO NOT REPEAT THE KEYWORDS MULTIPLE TIMES. |
21 | | -- DO NOT SAY ANYTHING ELSE APART FROM THE PROVIDED OUTPUT FORMAT. |
22 | | -- STRICTLY, do not make anything other than the answer to the user's query. |
| 23 | +OUTPUT FORMAT: <ANSWER>keyword1,keyword2,full/path/1,full/path/2</ANSWER> |
| 24 | +--- |
23 | 25 | `; |
0 commit comments