AI Video Search Engine (RAG) avse.vercel.app
README.md
# AI Video Search Engine (AVSE) ## A video search engine powered by the latest tools in AI ## Why? With the rise of short form content with TikTok and Youtube. A lot more knowledge is in videos than ever before. Finding specific answers within millions of videos can be difficult for any one person to go through. So the question is if there is Google that indexes text on website making it easier to find based on the context of on your question, why is there no Google that indexes video content making it easier for users to find answers within them. So I built this to showcase that it's very much possible with the technology and infrastructure that is readily available. ## Tech Stack - [Supabase](https://supabase.com/) (PostgreSQL, PG_Vector, Auth) - [Hasura](https://hasura.io/) (GraphQL layer, permissions) - [Fly](https://fly.io/) (Hosting of Hasura) - [JigsawStack](https://jigsawstack.com/) ([Summary AI](https://jigsawstack.com/ai-summary), [Prompt engine AI](https://jigsawstack.com/prompt-engine), [Embedding model](https://jigsawstack.com/embedding)) - [Vercel](https://vercel.com/home) (NextJS hosting, Serverless functions) Note: The previous version used a smaller embedding model that only supports english but can be easily ran in your serverless function. Check out `archive/v1` branch for the older version. ## How it works? ### Storing of videos - Video transcription is extracted from youtube video - Other elements of the video like thumbnail, description, title and more is extracted - Transcription and other data is passed to [JigsawStack's multimodal embedding model](https://jigsawstack.com/embedding) to generate vector embedding of all content - Transcriptions is chunked along with timestamp based on https://huggingface.co/Supabase/gte-small dimension size - Stored in [PostgresDB (Supabase)](https://supabase.com/docs/guides/ai) with use of pg_vector extension and indexing ### Searching - Vector cosine search across the db based on question to return the relevant results - Each video in the result wi…