Consultas em Linguagem Natural com Claude Multimodal no Bedrock
aws-samples/Simplify-natural-language-query-with-Anthropic-Claude-on-Amazon-Bedrock
Converta perguntas em português para SQL com compreensão automática do seu schema
Ver no GitHubPlugin que simplifica consultas em linguagem natural (NLQ) usando as capacidades multimodais do Claude para entender esquemas de banco de dados. Processa diagramas de relacionamento de entidades (ERD) como imagem e perguntas em texto, gerando SQL específico e resultados naturalizados via Amazon Athena.
Instalação
npx convez-ai aws-samples/Simplify-natural-language-query-with-Anthropic-Claude-on-Amazon-Bedrock1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Gerar SQL automaticamente a partir de perguntas em linguagem natural sobre bancos de dados
- Integrar ERDs como imagens para ensinar ao modelo o esquema específico da organização
- Consultar data lakes em Amazon S3 via Athena com queries geradas por IA
- Humanizar respostas de bancos de dados em vez de tabelas brutas
Veredito

Solução prática e bem documentada da AWS que aproveita multimodalidade do Claude para resolver um problema real: fazer modelos entenderem esquemas proprietários. Requer conhecimento de Python, boto3 e serviços AWS, mas o código está estruturado e exemplificado.
README
A tradução para o português deste README ainda está na fila.
Multi-modal capabilities from Anthropic Claude on Amazon Bedrock for natural language query
Introduction
Despite the advancement of foundation model, which can generate complex SQL statement, the main issue is the foundation model lacks the understanding of organization's data schema. Each organization has different naming convension, as such we need a way to feed the data schema and make the foundation model understands it. This repository provides the use case example of using Anthropic Claude's multi-modal capabilities to do NLQ (or Natural Language Query). By feeding the database's entity relationship diagram (or ERD) into image channel and user's question into text channel, Anthropic Claude foundation model can understand your data schema and use those information to generate the specific SQL according to the user's question.
This repository provides the end-to-end example from getting the user's question, generating SQL query, querying the data lake using Amazon Athena, and generating more natural outputs instead of table-like responses from Amazon Athena.
AWS services involved
- Amazon Bedrock: access Anthropic Claude foundation model
- Amazon S3: store the sample dataset
- Amazon Glue Data Crawler: build the data catalog from the dataset in Amazon S3
- Amazon Athena: use for querying the dataset
Prerequisite
- Understanding of
Pythonprogramming language andboto3SDK, please see here for boto3 documentation - Up-to-date
boto3library (you can do this bypip install --upgrade boto3) - Python IDE of choices to execute the code (alternatively, you can use SageMaker notebook instance, or SageMaker Studio for code execution)
- IAM role to access above AWS services on your behalf
- Access to Anthropic Claude on Amazon Bedrock, you can do this on Amazon Bedrock console page

Architecture Diagram
Below is the architecture diagram of this solution.

Security
See CONTRIBUTING for more information.
License
This library is licensed under the MIT-0 License. See the LICENSE file.