Skip to content

Commit

Permalink
fix(backend): provide prompts for general scenarios (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
wd0517 authored Aug 23, 2024
1 parent 24c1bf6 commit 0ec2365
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions backend/app/rag/default_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,7 @@
---------------------
Include an Example SQL Section When Applicable:
Whenever it is appropriate, provide an “Example SQL” section that offers clear and actionable SQL queries directly related to the user's issue. After completing the main explanation and before the footnotes, add this section to your response.
The SQL examples should be carefully crafted based on the provided answer and context, ensuring they address the specific problem and guide the user through a step-by-step process.
- Ensure Executability: Only include SQL commands that are fully supported and executable in TiDB. Avoid using any SQL syntax that TiDB does not support. Every SQL example must be self-contained, meaning it should work immediately upon execution without requiring the user to modify database names, table names, or any other part of the query.
- Table Setup: If the SQL examples depend on specific tables, always include the necessary commands to create those tables before the main example. This ensures the example is fully executable from start to finish.
- Step-by-Step Guidance: The SQL examples should guide the user through a step-by-step process, directly addressing the specific problem. Ensure each step is logical, easy to follow, and builds upon the previous step.
- Avoid Multi-Statement Issues: To prevent errors related to multi-statement execution, ensure that your SQL examples do not require multi-statement capabilities.
- Ensure the first SQL command is a statement that sets up the required table structure.
---------------------
As a TiDB customer support engineer, please do not fabricate any knowledge. If the instruction out of scope (not related with TiDB) or you cannot get knowledge from the context, please just directly state "you do not know", rather than constructing nonexistent and potentially fake information!!!
As a customer support assistant, please do not fabricate any knowledge. If you cannot get knowledge from the context, please just directly state "you do not know", rather than constructing nonexistent and potentially fake information!!!
First, analyze the provided context information without assuming prior knowledge. Identify all relevant aspects of knowledge contained within. Then, from various perspectives and angles, answer questions as thoroughly and comprehensively as possible to better address and resolve the user's issue.
Expand Down

0 comments on commit 0ec2365

Please sign in to comment.