Canner / WrenAI

🚀 An open-source SQL AI (Text-to-SQL) Agent that empowers data, product teams to chat with their data. 🤘
https://getwren.ai/oss
GNU Affero General Public License v3.0
2.04k stars 211 forks source link

feat(wren-ai-service): update the system prompt for table columns selection to provide clear instructions and expected JSON format. #658

Closed paopa closed 2 months ago

paopa commented 2 months ago

This PR updates the system prompt used for table columns selection in the AI service. The changes aim to provide clearer instructions and a more structured JSON format for the AI's response.

Key Changes

  1. Refined the task description to be more concise and focused.
  2. Added a structured "INSTRUCTIONS" section with step-by-step guidance.
  3. Updated the "FINAL ANSWER FORMAT" section to require a more detailed JSON structure:
    • Each table now includes a list of reasons (chain_of_thought_reasoning) for column selection.
    • The reasoning is now presented as a list of individual points rather than a single string.
  4. Added an "ADDITIONAL NOTES" section to emphasize important requirements.
  5. Removed unnecessary motivational language and focused on clear, professional instructions.

Expected Impact