An examples hub for running Multimodal AI Workloads on Daft
This repository is organized into three sections:
- Usage Patterns - Small atomic demonstrations of core features.
- Use Cases - Entire Pipelines built in Daft.
- Notebooks - End to End tutorials on working with Daft in an interactive Jupyter Notebook
To get started, run the following in your terminal.
git clone https://github.com/Eventual-Inc/daft-examples.git
cd daft-examples
make setupThis project leverages uv scripts for dependency management isolation. This is because many of the scripts in this repository have different requirements. The venv that is created by the setup make target is just for type hints and notebooks.
You can run any script like:
uv run usage_patterns/prompt/prompt.pyIf you don't have uv, check out this installation guide.
- Some examples leverage libraries like
soundfileorPyAvto process audio and video files which requiresffmpeg.
prompt/prompt.py- Basic prompt example using OpenRouter with anime quote classificationprompt/prompt_chat_completions.py- Use chat completions with personas from Nemotron dataset via LM Studioprompt/prompt_files_images.py- Multimodal prompting with images and PDFs using Gemini 2.5 Flash via OpenRouterprompt/prompt_github.py- Analyze markdown files from GitHub repositories with GPT-5prompt/prompt_openai_web_search.py- Perform web searches using OpenAI GPT-5 with web_search tools and store results in Supabaseprompt/prompt_pdfs.py- Analyze PDF documents with GPT-5-nano reasoning modelsprompt/prompt_personas.py- Multi-persona business strategy analysis with web search and collective intelligence synthesisprompt/prompt_session.py- Use custom OpenRouter provider through Daft sessionsprompt/prompt_structured_outputs.py- Get structured outputs using Pydantic models with OpenRouterprompt/prompt_synthetic_customer_discovery.py- Generate synthetic customer discovery responses from diverse personas using structured outputs
embed/embed_images.py- Generate image embeddings using Apple's AIMv2 modelembed/embed_pdf.py- Extract text from PDFs, chunk with spaCy, and embed sentencesembed/embed_text_providers.py- Compare text embeddings across providers (Transformers, OpenAI, LM Studio)embed/embed_video_frames.py- Extract and embed video frames from YouTube videosembed/shot_boundary_detection.py- Detect scene cuts and dissolves in videos using frame embeddingsembed/similarity_Search.py- Semantic search using cosine distance between text embeddings
classify/classify_image.py- Classify images using CLIP model with custom labelsclassify/classify_text.py- Multi-label text classification using BART model
commoncrawl/chunk_embed.py- Process Common Crawl data: chunk text with spaCy and embed sentencescommoncrawl/show.py- Query and display MIME types from Common Crawl datasets
udfs/cls_with_types.py- Class-based UDFs with TypedDict, Pydantic, batch processing, and async functionsudfs/udf.py- Simple UDF example to extract file names from File objects
io/read_audio_file.py- Read and resample audio files, write to MP3 formatio/read_pdfs.py- Discover and download PDF files from URLsio/read_video_files.py- Extract video metadata, keyframes, and audio from video files
transcribe/faster_whisper_schema.py- Schema definitions for Faster Whisper transcription resultstranscribe/key_moments_extraction.py- Extract key moments from transcripts and clip audio for short-form contenttranscribe/transcribe_faster_whisper.py- Transcribe audio with Faster Whisper and Voice Activity Detection (VAD)
voice_ai_analytics/voice_ai_analytics.py- Complete pipeline: transcription, summarization, translation to Chinese, segment embeddings, and RAG Q&Avoice_ai_analytics/voice_ai_analytics_openai.py- Voice analytics with OpenAI Whisper, GPT-5 summarization, and Spanish translationvoice_ai_analytics/voice_ai_tutorial.py- Voice AI analytics tutorial: transcription, summarization, Chinese translation, and embeddings
notebooks/getting_started_with_common_crawl.ipynb- Interactive Common Crawl tutorialnotebooks/voice_ai_analytics.ipynb- Voice AI analytics walkthroughnotebooks/window_functions.ipynb- Window functions examples and usage