Imperva enhances SQL generation from natural language with Amazon Bedrock integration | Amazon Web Services

Imperva enhances SQL generation from natural language with Amazon Bedrock integration | Amazon Web Services



Imperva Cloud WAF is essential for protecting websites from cyber threats, blocking billions of security events daily. The application aims to enhance user experience by streamlining data exploration. Utilizing Amazonian Athena for SQL retrieval, the application replaces multiple search fields with a free text field and employs a large language model (LLM) for intuitive search functions in natural language.

Furthermore, Amazon Bedrock offers high-performance base models from leading AI companies for generative AI applications. The new single sign-on web interface simplifies experimentation with LLM and other models, aiding collaboration and rapid prototyping. By utilizing Amazon Bedrock, the team achieved quality results for data accessibility and experimentation.

In addressing the challenge of enabling users to query data in natural language, the team developed a data science approach. By creating static test databases, test suites, and questions translated to SQL, the team could compare experiment metrics such as precision and SQL error rate. The use of LLMs allowed for the generation of precise SQL queries based on natural language, ultimately improving user experience.

Using a tracking tool, the team monitored experiment progress and made informed decisions based on accuracy and error rates. Experimenting with different models and embeddings through Amazon Bedrock, including Anthropic Claude 2.1, led to improved accuracy and reduced costs. By conducting experiments and fine-tuning the application, the team successfully integrated generative AI capabilities into their application.

Overall, the data science approach utilized for building SQL queries from natural language can be applied to other LLM-based applications, providing a foundation for efficient data accessibility. Through experimentation and progress tracking, coupled with the flexibility of Amazon Bedrock for model selection and switching, the team achieved significant advancements in their application’s usability and performance.

Article Source
https://aws.amazon.com/blogs/machine-learning/imperva-optimizes-sql-generation-from-natural-language-using-amazon-bedrock/