Retrieval
What is multimodal RAG?
Multimodal RAG retrieves pages, frames, or transcript windows, not only plain-text passages, and passes those pieces to a language model at question time. Each retrieved unit keeps a pointer to its source, so the answer can cite a PDF page, a video timestamp, or a spoken line instead of an ungrounded paragraph.
Updated · Part of What is RAG?
How it works
- Each modality is stored as a typed value, not a filename in a string.
- Retrieval units are passages, frames, or transcript windows that still point at the source.
- The model sees the retrieved piece and a pointer to its source, then writes the answer.
What it is not
It is not text-only RAG with images stored as unused attachments.
multimodal RAG: this, and the thing it is confused with
| This | Not this | |
|---|---|---|
| Evidence | Page, frame, or transcript | Text chunks only |
| Unused media | A failure of the pipeline | Normal, if images are just attachments |
| Index | One per modality you intend to search | A single text index over filenames |
Where Pixeltable fits
Pixeltable keeps each modality on the table and retrieves from the view that holds the pieces. The model call is another column or a query. A video search engine is the same shape: frames, a CLIP index, and a query that returns the moment.
import pixeltable as pxtfrom pixeltable.functions.huggingface import clipfrom pixeltable.functions.video import frame_iteratorTableModel = pxt.model_base()clip_embed = clip.using(model_id='openai/clip-vit-base-patch32')class Videos(TableModel, name='videos'):video: pxt.Videoclass Frames(TableModel,name='frames',base=Videos,iterator=frame_iterator(video=Videos.video, fps=1),):__indexes__ = [pxt.EmbeddingIndex(frame, embedding=clip_embed),]@pxt.querydef retrieve_moments(question: str, limit: int = 5):sim = Frames.frame.similarity(string=question)return (Frames.order_by(sim, asc=False).limit(limit).select(Frames.video, Frames.frame, Frames.frame_attrs, sim))
Questions
Is multimodal RAG just text RAG with images attached?
Can multimodal RAG search video?
Do I still need a separate vector database?
Next step
Install the Pixeltable skill, or sign up for Cloud and run the same file on a hosted database.