GithubHelp home page GithubHelp logo

ativitbenz / multi-modal-vector-retrieval-astra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mukundha/multi-modal-vector-retrieval-astra

1.0 0.0 0.0 10 KB

Multi-Modal Vector Retrieval with Astra

License: Apache License 2.0

Python 100.00%

multi-modal-vector-retrieval-astra's Introduction

Multi-Modal Vector Retrieval with Astra

Demonstrates how to perform multi modal vector retrieval with Astra and langchain with flickr-8k dataset

Get started

Download flickr-8k dataset from https://www.kaggle.com/datasets/adityajn105/flickr8k

Extract here, folder structure would look like

./flickr
./flickr/captions.txt
./flickr/Images
pip install -r requirements.txt

Init Astra

export ASTRA_DB_APPLICATION_TOKEN=
export ASTRA_DB_DATABASE_ID=
export ASTRA_DB_KEYSPACE=
python3 multimodal_demo.py

With langchain

python3 multimodal_langchain.py

How it works

CLIP Embeddings are generated based on this paper Key idea is representing text and image in the same vector space

langchain doesn't have good support for multi-modal embeddings yet, so if you want to use it with langchain, here is a sample on how to do that clip_embedding.py. It uses a json encoded string to support text and images

Usecases

As MultiModal generative models become more accessible, usecases to retrieve multimodal content for RAG usecases will follow.

There are some fun projects out there to caption images, text guided image generation etc.

One of the usecase, I'm trying to solve in Edtech / learning space -

Students can take a picture of their work (partially completed), either they are trying to sktech a plant cell or electronic circuitry for a Adder and ask a Generative model to help complete.

Student provides the Initial state (A), RAG can supplement the final state (B), Generative model shows the path from A -> B

Cool? What will you build with MultiModal retrieval?

multi-modal-vector-retrieval-astra's People

Contributors

mukundha avatar

Stargazers

benzativit 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.