-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to BaseSQLTableQueryEngine refine synthesis template #11378
Add to BaseSQLTableQueryEngine refine synthesis template #11378
Conversation
@@ -359,10 +368,14 @@ def _query(self, query_bundle: QueryBundle) -> Response: | |||
partial_synthesis_prompt = self._response_synthesis_prompt.partial_format( | |||
sql_query=sql_query_str, | |||
) | |||
partial_refine_prompt = self._refine_synthesis_prompt.partial_format( | |||
sql_query=sql_query_str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, the DEFAULT_REFINE_PROMPT
does not have a sql_query
variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's been fixed
@@ -386,10 +396,14 @@ async def _aquery(self, query_bundle: QueryBundle) -> Response: | |||
partial_synthesis_prompt = self._response_synthesis_prompt.partial_format( | |||
sql_query=sql_query_str, | |||
) | |||
partial_refine_prompt = self._refine_synthesis_prompt.partial_format( | |||
sql_query=sql_query_str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think theres an issue here -- the default refine synthesis prompt still doesn't have this variable. I think we need a V2 version of this prompt, similar to the main default prompt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I just corrected
Description
Adds the ability to choose a template for the prompt that refine the response from a BaseSQLTableQueryEngine.
Type of Change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Suggested Checklist:
make format; make lint
to appease the lint gods