Prepare multimodal RAG data in batches with a workflow¶
MOI provides workflow templates for RAG data preparation that can read documents, parse layouts, split text into chunks, generate embeddings, and build text and image indexes in a single batch run. You can apply the same processing rules repeatedly to a collection of files, making these templates suitable for continuously building a knowledge base containing text, tables, and images.
This tutorial uses 3 illustrated Landsat reports published by the U.S. Geological Survey (USGS), covering Landsat applications in Alaska, California, and Florida. Each PDF contains text, maps, satellite imagery, or thematic maps, allowing you to validate text parsing, image descriptions, and image indexing together. You will use the Document Knowledge Base Preparation (with Image Indexing) template to prepare multimodal RAG data in a batch, then verify cross-document Q&A and image retrieval. The tutorial takes approximately 30 minutes; actual processing time depends on the number of files, page counts, and model speed.
Screenshots use the Chinese interface. The downloadable sample documents and their filenames are unchanged from the Chinese tutorial.
What You Will Accomplish¶
Upload multiple PDFs containing text and images to Catalog in a batch.
Create a multimodal RAG data preparation workflow from a system template.
Configure document parsing, text indexing, and image indexing.
Run the workflow once to process all sample files.
Verify cross-document Q&A and figure retrieval results in the knowledge base.
Before You Begin¶
Have an MOI account. You can sign in or register for MOI Cloud.
Confirm that you can create and run workflows in the current workspace.
Download and extract the multimodal RAG tutorial sample package.
The sample package contains the following public materials:
File |
Text and Visual Content |
Official Source |
|---|---|---|
|
Text, a near-surface permafrost distribution map, satellite imagery of flooding, and false-color wildfire imagery |
|
|
Text, false-color wildfire imagery, and a vegetation ecoregion map |
|
|
Text, a map showing fire years, mangrove photographs, and satellite imagery of Miami Beach |
These files are provided for convenience when following the tutorial. For your own use, you can replace them with your PDF, Word, PowerPoint, web page, spreadsheet, or image materials.
Steps¶
1. Upload the Sample Files to Catalog in a Batch¶
Sign in to MOI and select Import Tasks under Data Connect in the left navigation.
Click New Import Task and select Unstructured.
Select Local Upload as the data source, then select the extracted
USGS.Alaska-and-Landsat.pdf,USGS.California-and-Landsat.pdf, andUSGS.Florida-and-Landsat.pdffiles together.Select the current workspace’s Catalog as the target and save the files to:
<Current workspace Catalog> / tutorial_data / multimodal_rag / source
Here,
tutorial_datais the catalog,multimodal_ragis the database, andsourceis the data volume. If they do not exist, create each one while selecting the target location.Keep the remaining settings at their defaults and confirm that all 3 PDFs appear in the import file list.
Click Create and Start Import.
Wait until the import task status changes to Completed and confirm that all 3 PDFs are available at the following location:
Resource Center > Catalog > tutorial_data > multimodal_rag > source
2. Create a Multimodal RAG Workflow¶
Select Workflow under Data Processing in the left navigation.
Click Create Workflow.
Find the Document Knowledge Base Preparation (with Image Indexing) template and click Use Template.
Enter
landsat_visual_ragas the workflow name.
The template already includes nodes for reading files, parsing documents, splitting text, building text and image indexes, saving parsing results, and registering data lineage. You do not need to add these nodes individually.
3. Configure the Workflow¶
Select the Source Files for Batch Processing¶
Open the workflow’s run configuration and select Catalog Data Source on the left.
Under Source Files, select the
tutorial_data / multimodal_rag / sourcedata volume.Set File Scope to By File and select
USGS.Alaska-and-Landsat.pdf,USGS.California-and-Landsat.pdf, andUSGS.Florida-and-Landsat.pdf.
Selecting all files at once lets the workflow process them in a batch during the same run.
Create a Knowledge Base¶
Select Build Knowledge Base Index on the left.
Enter
landsat_environment_knowledgeunder Knowledge Base and click Create Knowledge Base.Keep the default text Embedding model, turn on Enable Image Indexing, and keep the default image Embedding model.
Keep the three-level index and remaining parameters at their defaults.
Save to Catalog¶
Select Save to Catalog on the left.
Set Output Location to
tutorial_data / multimodal_rag / source.Click Confirm to save the run configuration.
Keep the template’s default configuration for the remaining steps, including Document Parsing, Split Documents by Length, Engineering Drawing Parsing, Build Drawing Knowledge Base Index, and Write Document Files. You do not need to modify each step individually.
4. Save and Run the Workflow in a Batch¶
Return to the workflow canvas and click Save and Enable.
Click Run on the workflow page.
Confirm that both the source and output locations are
sourceand that all 3 PDFs are selected.After the run starts, click Jobs on the right side of the workflow page.
Find this run in the job list and wait until the job statuses for all 3 files change to Completed.
Only one run is needed. The workflow processes all input files using the same parsing and indexing rules.
5. Start a Conversation in the Knowledge Base¶
Select Knowledge Base in the left navigation and open
landsat_environment_knowledge.
Click Chat on the knowledge base card and send a cross-document question:
What environmental issues are monitored using Landsat in Alaska, California, and Florida? Summarize them by region.
Click the sources in the answer to view the cited materials and the original passages.
Send another question about the figures:
Find the false-color satellite image of California's August Complex wildfire and explain what yellow and dark brown represent in the image.
Click the page or image sources in the answer to view the captions and source information.
Tutorial Complete¶
You have used a system template to prepare multimodal RAG data in a batch. All 3 public documents were parsed, chunked, and indexed for both text and images by the same workflow. The parsing results are saved to Catalog and can be used in the knowledge base for cross-document Q&A and figure retrieval.