KatInterview

Multimodal RAG for Financial Documents and Charts

Machine LearningModel answer
MediumModel answerMachine Learningragmultimodalretrieval

Last updated

Design a provenance-tracked hybrid retrieval system over text PDFs and chart images, with reranking, ACL/PII controls, calibrated abstention, and staged evaluation.

Scenario

You are designing a question-answering system for a financial research platform. Analysts ask natural-language questions, and the system must answer them from two kinds of internal material:

  • Long internal PDFs that mix prose, tables, and embedded charts.
  • Standalone market-data images (candlestick charts, heatmaps, time-series plots).

Answers must be grounded in retrieved evidence, and every statement must be traceable to an exact location in a specific document version.

Requirements

  1. Ingestion and provenance. Every indexed unit — whether a text passage or a cropped figure — must carry enough metadata to recover its source document, version, page, and bounding box. Re-ingesting a changed document must not silently overwrite history.
  2. Cross-modal retrieval. A text query must be able to surface both relevant prose and relevant visual content.
  3. Hybrid retrieval. Combine dense/semantic search with lexical keyword search so exact identifiers — ticker symbols, CUSIPs, metric names, filing labels — are not lost in embedding space.
  4. Reranking. Apply a stronger, slower scoring model to a shortlist before anything reaches the generator.
  5. Security and abstention. No personally identifiable information may reach the index or the output. The system must be able to refuse — returning a clear "insufficient evidence" response — when retrieval confidence is too low, and must respect per-user document entitlements.

Deliverables

  • An end-to-end description of the pipeline, from raw document to final cited answer.
  • The schema for the indexed multimodal chunk record.
  • An evaluation plan that scores retrieval quality and generation quality separately.
  • A discussion of at least two hard sub-problems (for example, abstention calibration or access-control enforcement) with trade-offs.

State your assumptions about corpus size, query volume, and latency targets explicitly, since the design follows from them.

Hints

Hint 1

Fix numbers first — corpus size, pages per document, share of pages with figures, queries per second, latency budget. Every storage and sharding decision downstream depends on them.

Hint 2

Charts are hard to find with a text query unless you give them a text shadow: a caption plus extracted axis labels, series names, and values, indexed alongside the image embedding.

Hint 3

For abstention, raw reranker scores are not probabilities. Calibrate on a labeled set, then pick the threshold from a risk-coverage curve against a target answer precision.

Hint 4

Enforce ACLs as a pre-filter inside the vector search, not after it — post-filtering both leaks existence of restricted documents and can starve the top-k.