Natural Language to SQL Transformation with AWS Bedrock

Client

Extract, LLC

Location

Radcliff, Kentucky

Industry

Technology / Data Solutions

Services & Tech

AWS Bedrock, Amazon RDS, AWS Lambda, Amazon DynamoDB, Amazon OpenSearch, Amazon CloudWatch, AWS Secrets Manager, Amazon API Gateway, AWS Cognito

Project Overview

Extract, LLC partnered with Avahi to design and implement an advanced Natural Language to SQL (NL2SQL) solution that empowers users to query databases using plain language and receive human-readable answers. The goal was to allow non-technical users to extract, validate, and interpret data without writing SQL, while ensuring high query accuracy, robust data security, and fast response times. Avahi built a scalable, AI-powered system leveraging AWS Bedrock for language understanding and answer generation, tightly integrated with secure database infrastructure and optimized query execution workflows.

About the
Customer

Extract, LLC is a technology-driven solutions provider specializing in data-intensive environments. Based in Radcliff, Kentucky, the company serves industries where accurate, timely data insights are critical for operational efficiency and strategic decision-making.

The
Problem

Extract needed a way for business users to access complex datasets without relying on SQLtrained analysts. Existing manual workflows created bottlenecks in decision-making, increased operational costs, and limited agility in responding to evolving business questions. Without a self-service solution, Extract risked slower reporting cycles, reduced productivity, and higher dependency on technical resources. Additionally, there were concerns around query security, access control, and maintaining system performance under varying workloads.

Why AWS

Extract chose AWS for its mature AI and ML ecosystem, ability to securely integrate with existing infrastructure, and broad portfolio of managed services. AWS Bedrock’s native capabilities in natural language processing and generation provided a strong foundation for interpreting Why AWS queries and delivering clear, context-aware answers. AWS’s scalability, reliability, and security features made it ideal for supporting Extract’s high availability and performance requirements.

Why Extract Chose Avahi

As a Premier Tier AWS Partner, Avahi brought proven expertise in AI solution architecture, database integration, and NLP workflows. Avahi’s ability to design end-to-end systems—from natural language understanding to secure SQL execution—meant Extract could trust the project would be delivered on time, within scope, and aligned with AWS best practices. Avahi also provided specialized knowledge in query optimization, access control, and real-time monitoring to ensure the solution would be both accurate and efficient.

Solution

Avahi delivered a multi-layered NL2SQL system with the following key components:

  • Natural Language Understanding System: Built using AWS Bedrock to interpret user queries, extract relevant context, and handle complex question types (aggregations, comparisons, temporal queries, etc.).
  • Schema Mapping System: Automatically mapped natural language concepts to database schema elements, enabling precise query generation across multiple tables.
  • SQL Generation Pipeline: Constructed SQL queries using a secure generation layer that applied safety checks for SQL injection, access control, and performance optimization.
  • Natural Language Answer Generation: Used AWS Bedrock to convert SQL result sets into coherent, context-aware responses. Added an enhancement layer for improved clarity and validation.
  • Integration & Infrastructure: Deployed APIs via Amazon API Gateway, used AWS Lambda for processing, Amazon RDS for database hosting, Amazon OpenSearch for query optimization, AWS CloudWatch for monitoring, and AWS Cognito for authentication.
  • Performance Monitoring: Implemented real-time query monitoring, caching, and error recovery mechanisms to maintain optimal performance.

Key Deliverables

  • End-to-end NL2SQL pipeline with answer generation
  • Natural language query processing system
  • SQL generation engine with security controls
  • Database interaction layer with performance optimization
  • Answer generation layer with enhancement features
  • RESTful API integration with authentication and monitoring
  • Documentation and knowledge transfer materials

Project
Impact

The new system enabled Extract’s non-technical users to securely access, analyze, and interpret database information in seconds, without writing a single SQL statement. It significantly reduced turnaround time for data requests, improved accuracy of insights, and increased user adoption of self-service analytics tools.

Metrics

  • Reduced query-to-answer time from hours to under 10 seconds
  • Improved query accuracy through schema-aware mapping and validation
  • Enabled support for complex query types without technical intervention
  • Strengthened security with enforced access controls and SQL injection prevention

We highly recommend Avahi as a reliable and innovative technology partner. Their expertise in cutting-edge technologies was instrumental in building our Proof of Concept (PoC) and developing our Minimum Viable Product (MVP). Avahi consistently delivered high-quality solutions on time while maintaining a collaborative, responsive approach. They went beyond expectations by identifying opportunities for enhancement, ensuring scalability and compliance for our law enforcement-focused products. Avahi is the clear choice if you need a tech partner with industry knowledge, professionalism, and a commitment to innovation.

Brandon Puhlman

Founder, Bravo Foxtrot

Ready to Transform Your Business with AI?

Book Your Free Ignition AI Workshop

Let’s explore your high-impact AI opportunities together in a complimentary half-day session

View Our Case Studies

See how we’ve delivered measurable results for businesses like yours