Closed sourabh-patil closed 2 months ago
They're not added as part of the system prompt. They're instead added as user / assistant messages:
https://github.com/vanna-ai/vanna/blob/main/src/vanna/base/base.py#L583-L589
Oh I see. Apologies for my mistake. I suppose we are giving question and SQL pair as a few shot examples for LLM.
Describe the bug In get_sql_prompt definition of VannaBase class, current code does not include similar Question-SQL pairs from db in system message
Expected behavior Current code considers inputs only from DDL (add_ddl_to_prompt) and documentation (add_documentation_to_prompt) collections from db. As per the Ask phase, we should consider reference SQL too.
Error logs/Screenshots https://github.com/vanna-ai/vanna/blob/7b962d59c7ad7a0e976f179473ab9f18d1e0581b/src/vanna/base/base.py#L557-L591
Additional context Correct me if I am wrong, also will try to PR if we need to add in reference SQL.