Multimodal Macro-Reasoning RAG for Colonoscopy Analysis with LlamaIndex and Together AI
Standard RAG systems often fail on complex technical documents like medical reports because they focus on 'micro-matching' (finding specific text chunks) while ignoring 'macro-reasoning' (understanding the overall procedural context). Inspired by the 'DualG-MRAG' and colonoscopy foundation model research, this challenge requires you to build a multimodal RAG pipeline using LlamaIndex. You will implement a dual-graph approach where one graph tracks the high-level medical procedure (macro) and the other handles specific visual/textual findings (micro). You will use Together AI's high-speed inference for Llama 3.2 Vision to process both medical imagery and textual routine reports.
What you are building
The core problem, expected build, and operating context for this challenge.
Standard RAG systems often fail on complex technical documents like medical reports because they focus on 'micro-matching' (finding specific text chunks) while ignoring 'macro-reasoning' (understanding the overall procedural context). Inspired by the 'DualG-MRAG' and colonoscopy foundation model research, this challenge requires you to build a multimodal RAG pipeline using LlamaIndex. You will implement a dual-graph approach where one graph tracks the high-level medical procedure (macro) and the other handles specific visual/textual findings (micro). You will use Together AI's high-speed inference for Llama 3.2 Vision to process both medical imagery and textual routine reports.
Shared data for this challenge
Review public datasets and any private uploads tied to your build.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Phase Alignment
Fails if findings from the 'Insertion' phase are misattributed to 'Withdrawal'.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Retrieval Precision
Percentage of retrieved chunks that are clinically relevant. • target: 0.88 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Configure LlamaIndex for Multimodal RAG: Set up a MultiModalVectorStoreIndex to handle both colonoscopy images and report text.
Integrate Together AI Inference: Use Together AI's API to run Llama 3.2 Vision for rapid image feature extraction and grounding.
Build the Macro-Reasoning Graph: Use LlamaIndex Property Graphs to model the standard phases of a colonoscopy (insertion, withdrawal, inspection).
Implement Micro-Matching Retrieval: Develop a specialized retriever that finds high-resolution visual evidence for specific polyps or lesions.
Orchestrate Dual Retrieval: Write a custom query engine that fuses findings from the macro-graph (contextual severity) and micro-matching (exact location).
Grounding via Foundation Models: Apply techniques from the 280,000-report vision-language model research to align agent responses with clinical standards.
How this agent runs
The system must accurately identify the 'withdrawal phase' findings across 5 different colonoscopy reports, correctly linking visual polyp images to the textual size description.
Challenge input
Zip file containing 10 images and 5 report PDFs.
LlamaIndex
Expertly handles the dual-graph retrieval and multimodal indexing required for medical data.
Together AI
Provides low-latency access to large vision-language models for procedural analysis.
Evaluated output
Structured Diagnostic Summary (JSON).
- Fails if findings from the 'Insertion' phase are misattributed to 'Withdrawal'.
- Percentage of retrieved chunks that are clinically relevant. • target: 0.88 • range: 0-1
- Benchmark: Med-RAG Benchmark
- Retrieval Precision target: 0.88
- 1 public reference case
- Docker execution harness
- Python sandbox
View technical recipe
Configured tools
- Modal · Optional
- RAI · Required
- Llama Index · Optional
- Modal · Optional
Evaluation contract
- Phase Alignment · Weight 1
- Retrieval Precision · Weight 1
Recipe state
This is a preview. The configuration can change before the evaluation recipe is locked.
Run this agent on your dataset and AI stack
Bring your dataset, model providers, and success criteria. We will scope the right managed run for your team.
Scope a managed run[ok] Wrote CHALLENGE.md
[ok] Wrote .versalist.json
[ok] Wrote eval/examples.json
Requires VERSALIST_API_KEY. Works with any MCP-aware editor.
DocsFind another challenge
Jump to a random challenge when you want a fresh benchmark or a different problem space.