-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat(construct): Add new construct - textToSql #631
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dineshSajwan
requested review from
krokoko,
MichaelWalker-git and
alexa-perlov
August 14, 2024 17:33
Signed-off-by: Dinesh Sajwan <[email protected]>
krokoko
reviewed
Aug 14, 2024
krokoko
reviewed
Aug 14, 2024
krokoko
reviewed
Aug 14, 2024
krokoko
reviewed
Aug 14, 2024
krokoko
reviewed
Aug 14, 2024
krokoko
reviewed
Aug 26, 2024
krokoko
reviewed
Aug 26, 2024
krokoko
reviewed
Aug 26, 2024
krokoko
reviewed
Aug 26, 2024
krokoko
requested changes
Aug 26, 2024
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.
See my comments
krokoko
reviewed
Aug 27, 2024
dineshSajwan
dismissed stale reviews from laithalsaadoon and scottschreckengaust
via
August 28, 2024 14:48
d28bbe2
Signed-off-by: Alain Krok <[email protected]>
krokoko
reviewed
Aug 30, 2024
krokoko
reviewed
Aug 30, 2024
krokoko
approved these changes
Sep 4, 2024
scottschreckengaust
approved these changes
Sep 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #
aws-text-to-sql construct
This CDK construct leverages state-of-the-art generative AI capabilities to facilitate natural language-based SQL query generation. It seamlessly integrates with both Amazon Aurora and Amazon RDS database services, currently supporting MySQL databases. If you have an existing MySQL database hosted on an Amazon Aurora or Amazon RDS instance, you can seamlessly integrate it with the construct. Alternatively, the construct can provision the necessary database infrastructure for you.
To address the inherent ambiguity present in natural language, the system employs a sophisticated semantic linking mechanism. This mechanism utilizes a knowledge layer loaded from configuration files or an Amazon Bedrock knowledge base to reformulate the user's query, disambiguating and clarifying the intent. The system then prompts the user for feedback on the reformulated query, ensuring accurate interpretation of the user's intent. Upon user approval of the reformulated query, the construct generates the corresponding SQL query and presents it to the user for further validation.
Once the user approves the generated SQL query, they have the option to execute it against the target database. In the event of any issues with the generated query, the construct is equipped with an autocorrection mechanism that allows for a configurable number of retries.
The system's architecture is built upon a serverless workflow orchestrated by AWS Step Functions and AWS Lambda, triggered by an Amazon EventBridge event. The AWS Step Functions workflow publishes a task token on an Amazon Simple Queue Service (SQS) queue and awaits user feedback, ensuring a seamless and efficient user experience. The feedback strategy is configurable in config files and can be skipped by updating the config files.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.