tontan2545 / NQL

Natural Query Language. A Text-to-SQL Solution using Amazon Bedrock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NQL

Description

NQL, or Natural Query Language, aims to assist in data insights by providing a natural language interface to data. NQL is a query language that allows users to query data using natural language. NQL is a domain specific language that is designed to be used by non-technical users. NQL is designed to be used with a data sources such as Athena, RDS, S3, or On-Prem Database.

About the project

NQL project was intiated during my internship at AWS on May 2023 - August 2023. This repository is a continuation of the project to be presented in ISE Open House 2023 which is held on 11th November 2023 at International School of Engineering, Chulalongkorn University.

There are several improvements that I have made/will make to the project, which are:

  • Utilizing Turborepo to manage all source code related to backend and frontend
  • Using Nest.js as the backend framework, replacing the previous Flask framework to improve robustness and scalability
  • Using Next.js as the frontend framework with proper utilization of RSC (React Server Component) to improve performance and user experience
  • Implemented prompt caching layer to improve performance and minimize unnecessary inference calls
  • Added data streaming support to allow users see generated SQL in real-time
  • Minor improvements on User Interface

System Architecture

System Architecture

Get started

Prerequisites

Installation

  1. Clone the repository
git clone git@github.com:tontan2545/NQL.git
  1. Install dependencies
pnpm install
  1. Start the development server
pnpm dev

and open in a seperate terminal

docker-compose up

Note: If you want to start the development server with a specific project, you can run

pnpm dev --filter <project>
  1. You'll be able to access

Installing dependencies

This project uses pnpm as the package manager, you can install dependencies by running

pnpm install <package>

Since this project uses Turborepo, you can install dependencies to a specific project by running

pnpm install --filter <project> <package>

About

Natural Query Language. A Text-to-SQL Solution using Amazon Bedrock

License:MIT License


Languages

Language:TypeScript 47.9%Language:PLpgSQL 43.7%Language:JavaScript 3.6%Language:Dockerfile 2.4%Language:Shell 1.2%Language:CSS 1.1%