TORQUE — Multimodal RAG for Formula Student

A next-generation RAG pipeline built for the EPFL Racing Team — replacing their legacy regulation-lookup system with layout-aware parsing, exact citation retrieval, and a transparent reasoning chain. Developed as ML Engineer at the EPFL AI Team (Industry Track).

Context

The EPFL AI Team is a 110-member student association structured across four tracks (Robotics, Industry, Research, Foundations). The Industry Track takes on product delivery projects for EPFL entities and external partners — not pure research, but shipped systems. TORQUE is an Industry Track project built for the EPFL Racing Team (Formula Student).

Formula Student regulations span hundreds of technical pages. The team's previous lookup system (CORSA) relied on basic keyword search and couldn't handle table-heavy documents, cross-section dependencies, or quiz-style validation. TORQUE is its replacement.

What Makes TORQUE Different

  • Layout-aware parsing (LlamaParse): Regulation documents contain tables, schemas, and figures. Standard chunking destroys their structure. LlamaParse preserves layout context, enabling accurate retrieval from complex pages.
  • PageIndex Navigation Module: A "vectorless" exact-citation layer that maps queries to specific page/section references — not just semantically similar chunks. Engineers can trust citations.
  • Motorsport-tuned reranking: Custom cross-encoder reranking calibrated on Formula Student vocabulary — terms like "accumulator container", "tractive system", and "EV safety" have very different semantics from general engineering text.
  • Transparent reasoning chain: Inspired by Cluely/Ezzi — TORQUE exposes its retrieval and reasoning steps to the user. Answers include the source sections they came from.
  • Browser integration: Reads and answers technical quizzes directly in the browser — no copy-pasting regulation text.

Architecture

The pipeline is structured in four layers: ingestion (parsing + embedding), retrieval (PageIndex + vector search + reranking), agent (gatekeeper → reasoning chain → auditor), and evaluation (BERTScore benchmarks on past quiz questions).

ingestion/ → parser.py (LlamaParse) + embedder.py + indexer.py
retrieval/ → page_index.py + reranker.py + graph_search.py
agent/ → gatekeeper.py + reasoning_chain.py + auditor.py
extension/ → browser integration
evaluation/ → BERTScore + pass rate on FS quiz dataset

Model strategy: prototype on frontier models (Gemini/GPT-4/Claude) first, then transition to local/open-source for final deployment. Phase 1 is text-only; Phase 2 adds multimodal vision embeddings for diagram-heavy regulation sections.

Open Source Path

TORQUE is currently an internal EPFL AI Team project. The generalised version — a domain-agnostic multimodal RAG framework — is planned for public open-source release. The architecture is being designed with that in mind from day one.

EPFL AI Team