[HN Gopher] Show HN: EVA - AI-Relational Database System
       ___________________________________________________________________
        
       Show HN: EVA - AI-Relational Database System
        
       Hi friends,  We are building EVA, an AI-Relational database system
       with first-class support for deep learning models. Our goal with
       EVA is to create a platform that supports AI-powered multi-modal
       database applications operating on structured (tables, feature
       vectors, etc.) and unstructured data (videos, podcasts, pdf, etc.)
       with deep learning models. EVA comes with a wide range of models
       for analyzing unstructured data, including models for object
       detection, OCR, text summarization, audio speech recognition, and
       more.  The key feature of EVA is its AI-centric query optimizer.
       This optimizer is designed to speed up AI-powered applications
       using a collection of optimizations inspired by relational database
       systems. Two of the most important optimizations are:  + Caching:
       EVA automatically reuses previous query results (e.g., inference
       results), eliminating redundant computation and saving you money on
       inference.  + Predicate Reordering: EVA optimizes the order in
       which query predicates are evaluated (e.g., running faster, more
       selective deep learning models first), leading to faster queries.
       Besides saving money spent on inference, EVA also makes it easier
       to write SQL queries to set up multi-modal AI pipelines. With EVA,
       you can quickly integrate your AI models into the database system
       and seamlessly query structured and unstructured data.  We are
       constantly working on improving EVA and would love to hear your
       feedback!
        
       Author : jarulraj
       Score  : 130 points
       Date   : 2023-04-30 16:52 UTC (6 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | startupsfail wrote:
       | Could you turn this into a psql extension? If this is integrated
       | into an actual database that can be used in production, this may
       | have a future. Otherwise no one will touch this, and it'd be yet
       | another useless and cute experiment from the academia.
        
         | jarulraj wrote:
         | Thanks for the helpful suggestion! EVA uses an SQL database
         | system for managing structured data using sqlalchemy. It runs
         | on PostgreSQL out of the box. You only need to provide the
         | database connection url in the EVA configuration file.
         | 
         | Thanks for your candid comment. We take it very seriously. EVA
         | is already being used in production by some collaborators and
         | we would love to support more early adopters :) Please let me
         | know if I can DM you to get more feedback.
        
       | la64710 wrote:
       | Very nice... any plans for supporting self hosted LLMs like BERT
       | LLAMA etc?
        
         | [deleted]
        
         | jarulraj wrote:
         | Great question! We will be adding a ChatGPT-based user-defined
         | function this week (https://github.com/georgia-tech-
         | db/eva/pull/655/).
         | 
         | With LLM-based functions, EVA will support more interesting
         | queries like this:                 SELECT
         | ChatGPT(TextSummarizer(SpeechRecognizer(audio)),
         | "Is this video related to the Russia-Ukraine war?")       FROM
         | VIDEO_CLIPS;
         | 
         | Here, EVA sends the audio of each video clip to a speech
         | recognition model on Hugging Face. It then sends the recognized
         | text to a text summarizer model. EVA executes both models on
         | local GPUs. Lastly, EVA sends the text summary to ChatGPT as a
         | part of the prompt. The ChatGPT UDF is executed remotely.
         | 
         | The critical feature of EVA is that the query optimizer factors
         | the dollar cost of running models for a given AI task (like a
         | question-answering LLM). It picks the appropriate model
         | pipeline with the lowest price that satisfies the user's
         | accuracy requirement.
        
           | la64710 wrote:
           | Great but personally I am interested in locally runnable LLM
           | models instead of sending data to the cloud service like
           | chatGPT.
        
             | jarulraj wrote:
             | Got it! EVA is designed for the local use case. You can
             | define a Python function that wraps around the LLM model
             | and use it anywhere in the query (we refer to such
             | functions as user-defined functions or UDFs).
             | 
             | This notebook illustrates a UDF that wraps around a custom
             | PyTorch vision model: https://evadb.readthedocs.io/en/stabl
             | e/source/tutorials/04-c...
             | 
             | These functions can be written quickly (~50 lines of Python
             | code). Here is the built-in Resnet50 UDF in EVA:
             | https://github.com/georgia-tech-
             | db/eva/blob/master/eva/udfs/...
             | 
             | This page describes the steps involved in writing a UDF in
             | EVA: https://evadb.readthedocs.io/en/stable/source/referenc
             | e/udf....
             | 
             | Please open an issue on the Github repo; we will gladly
             | support your use case :)
        
       | potatoman22 wrote:
       | I'm having trouble understanding what this does. Does it let you
       | compose models via a SQL-like syntax?
        
         | jarulraj wrote:
         | That's correct! You can compose multiple models in a single
         | query to set up useful AI pipelines.
         | 
         | Here is an illustrative query that chains together multiple
         | models:                  -- Analyse emotions of faces in a
         | video        SELECT id, bbox, EmotionDetector(Crop(data, bbox))
         | FROM MovieVideo JOIN LATERAL UNNEST(FaceDetector(data)) AS
         | Face(bbox, conf)          WHERE id < 15;
        
       | ericlewis777 wrote:
       | Very cool. Also, love seeing rambling wrecks from Georgia Tech
       | here!
       | 
       | While this is a very cool project, making a very obvious demo
       | that people can use to leverage it would make this stand out in
       | the current ecosystem of tools like this.
        
         | jarulraj wrote:
         | Thanks! Likewise :)
         | 
         | Thanks for the suggestion! I just added links to the demo
         | applications earlier in the README. All applications are
         | Jupyter notebooks that you can open in Google Colab.
         | 
         | * Examining the emotion palette of actors in a movie:
         | https://evadb.readthedocs.io/en/stable/source/tutorials/03-e...
         | 
         | * Analysing traffic flow at an intersection:
         | https://evadb.readthedocs.io/en/stable/source/tutorials/02-o...
         | 
         | * Classifying images based on their content:
         | https://evadb.readthedocs.io/en/stable/source/tutorials/01-m...
         | 
         | * Recognizing license plates: https://github.com/georgia-tech-
         | db/license-plate-recognition
         | 
         | * Analysing toxicity of social media memes:
         | https://github.com/georgia-tech-db/toxicity-classification
        
       | catiopatio wrote:
       | How are you guarding against prompt injection attacks, e.g.
       | either in the queried data, or in untrusted query parameters?
        
         | jarulraj wrote:
         | Honestly, we have not extensively thought about prompt
         | injection attacks -- the equivalent of SQL injection attacks in
         | AI-Relational database systems :)
         | 
         | If you have any thoughts on addressing this, please do share!
         | We will incorporate that in the LLM-based functions in EVA.
        
       | unixhero wrote:
       | Global Defence Initiative selected
        
       ___________________________________________________________________
       (page generated 2023-04-30 23:00 UTC)