Coder Social home page Coder Social logo

sakila-db-llm-rag's Introduction

sakila-db-llm-rag

Késako ?

Rest API that implements RAG on the datasource linked to the Sakila database. The Sakila database models the DVD rental store business, which contains content such as films, actors, inventory, stores, customers and staffs.

To navigate Sakila's SQL schema.

The API lets you query the Sakila database using natural language.

Prerequisites

Launch the application

  • Start Application
./mvnw quarkus:dev

Test

ℹ️ The scripts/run-sql.sh script is used to check API responses.

Usage : scripts/run-sql.sh "<SQL QUERY>"

Example of SQL queries to insert into Swagger UI :

  • Which actors have the first name Scarlett ?
scripts/run-sql.sh "select * from actor where first_name = 'Scarlett'"
  • Which actor has appeared in the most films ?
scripts/run-sql.sh "select actor.actor_id, actor.first_name, actor.last_name,
       count(actor_id) as film_count
from actor join film_actor using (actor_id)
group by actor_id
order by film_count desc
limit 1"
  • What is the average length of films by category ?
scripts/run-sql.sh "select category.name, avg(length)
from film join film_category using (film_id) join category using (category_id)
group by category.name
order by avg(length) desc"
  • Which actors have the last name BALL ?
scripts/run-sql.sh "select * from actor where last_name like 'BALL'"

sakila-db-llm-rag's People

Contributors

nzuguem avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.