Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BLOG] Natural Language to SQL: Building a Multi-Lingual Query Engine #115

Open
8 of 20 tasks
iRahulPandey opened this issue Oct 17, 2024 · 3 comments
Open
8 of 20 tasks
Assignees
Labels
ack/guide I have read through and am familiar with the contributing guide ack/legal I have read and understand the legal considerations for blog posting ack/readme I have configured my local development environment for building the website locally blog/deep-dive I want to write an in-depth guide blog blog/how-to I want to write a how-to guide blog topic/core I'm writing about MLflow public APIs or core features topic/genai I'm writing about GenAI use cases or features topic/tracking I'm writing about MLflow tracking

Comments

@iRahulPandey
Copy link

iRahulPandey commented Oct 17, 2024

Summary

This blog will demonstrate a dynamic SQL generation and execution workflow using LangGraph, OpenAI, MLflow and an SQLite database. The workflow translates user input into English, performs safety checks, generates SQL queries, validates the queries, and runs them against a local database.

The workflow consists of multiple stages, such as:

  • Translating user input into English.
  • Running safety checks to prevent dangerous SQL queries.
  • Generating SQL queries based on the user's input and the current database schema.
  • Validating the generated SQL.
  • Running the query and returning results if it's a SELECT query.

image

Acknowledgements

  • ack/guide I have read through the contributing guide

  • ack/readme I have configured my local development environment so that I can build a local instance of the MLflow website by following the development guide

  • ack/legal I have verified that there are no legal considerations associated with the nature of the blog post, its content, or references to organizations, ideas, or individuals contained within my post. If I mention a particular organization, idea, or person, I will provide evidence of consent to post by any organization or individual that is mentioned prior to filing my PR.

Proposed Title

Natural Language to SQL: Building a Multi-Lingual Query Engine

Abstract

This blog will have following features:

  • Natural Language to SQL: Converts user questions into SQL queries using Open AI.
  • Database Schema Awareness: Extracts and understands the database schema to ensure that generated SQL is relevant.
  • Safety Checks: Ensures no dangerous SQL commands (e.g., DELETE, DROP) are run.
  • SQL Validation: Executes SQL queries in a rollback-safe environment to validate them before running.
  • Automatic Translation: Supports translation to English from other languages using GPT.

Blog Type

  • blog/how-to: A how-to guide to using core MLflow functionality, focused on a common use case user journey
  • blog/deep-dive: An in-depth guide that covers a specific feature in MLflow
  • blog/use-case: A comprehensive overview of a real-world project that leverages MLflow
  • blog/best-practices: A comprehensive tutorial that covers usage patterns of MLflow, focusing on an MLOps journey
  • blog/tips: A short blog covering tips and tricks for using MLflow APIs or the MLflow UI components
  • blog/features: A feature-focused announcement that introduces a significant new feature that is recently or not-yet released
  • blog/meetup: A report on an MLflow community event or other Linux Foundation MLflow Ambassador Program event
  • blog/news: Summaries of significant mentions of MLflow or major initiatives for the MLflow project

Topics Covered in Blog

  • topic/genai: Highlights MLflow's use in training, tuning, or deploying GenAI applications
  • topic/tracking: Covering the use of Model Tracking APIs and integrated Model Flavors
  • topic/deployment: Featuring topics related to the deployment of MLflow models and the MLflow Model Registry
  • topic/training: Concerned with the development loop of training and tuning models using MLflow for tracking
  • topic/mlflow-service: Topics related to the deployment of the MLflow Tracking Service or the MLflow Deployments Server
  • topic/core: Topics covering core MLflow APIs and related features
  • topic/advanced: Featuring guides on Custom Model Development or usage of the plugin architecture of MLflow
  • topic/ui: Covering features of the MLflow UI
  • topic/other: < please fill in >

Thank you for your proposal! An MLflow Maintainer will reach out to you with next steps!

@github-actions github-actions bot added ack/guide I have read through and am familiar with the contributing guide ack/legal I have read and understand the legal considerations for blog posting ack/readme I have configured my local development environment for building the website locally blog/deep-dive I want to write an in-depth guide blog blog/how-to I want to write a how-to guide blog topic/core I'm writing about MLflow public APIs or core features topic/genai I'm writing about GenAI use cases or features topic/tracking I'm writing about MLflow tracking labels Oct 17, 2024
@iRahulPandey iRahulPandey changed the title [BLOG] Natural Language to SQL: Developing a Multi-Lingual Query Engine [BLOG] Natural Language to SQL: Building a Multi-Lingual Query Engine Oct 17, 2024
@iRahulPandey
Copy link
Author

@BenWilson2 I am thinking of mlflow integration maybe in two ways:

  1. Tracking
  2. Logging Langraph in mlflow

If you have any other ideas which we can implement, then let me know :)

@BenWilson2
Copy link
Member

The only addition I would add is to ensure that we're adding tracing support to this agent :) Other than that, this sounds like a great end to end use case!

@iRahulPandey
Copy link
Author

iRahulPandey commented Oct 17, 2024

@BenWilson2 Will do Thanks! So, we will start writing and submit the first draft!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack/guide I have read through and am familiar with the contributing guide ack/legal I have read and understand the legal considerations for blog posting ack/readme I have configured my local development environment for building the website locally blog/deep-dive I want to write an in-depth guide blog blog/how-to I want to write a how-to guide blog topic/core I'm writing about MLflow public APIs or core features topic/genai I'm writing about GenAI use cases or features topic/tracking I'm writing about MLflow tracking
Projects
None yet
Development

No branches or pull requests

2 participants