Cite-Exact: Multi-Hop RAG on ROCm

Cite-Exact: Multi-Hop RAG on ROCm

Created by team Takumu Hata on October 12, 2026

RAG solution for Mini-Challenge 3: retrieval-augmented question answering over a mixed-type document corpus with exact-set citations. Architecture: a persistent server holds a vision-language model (Qwen3-VL-8B-Instruct) and a BGE-small embedder resident behind a Unix socket, so each fresh query process answers in seconds without reloading. The --index pass parses PDF (with encrypted-file detection), DOCX, XLSX, CSV, logs and source code, runs VLM OCR on images, and persists chunks and embeddings. Broken or unreadable files are caught per file and recorded, never aborting the walk. Retrieval fuses BM25 and dense embeddings via reciprocal-rank fusion, then runs a second hop that re-queries identifier tokens (ticket ids, part numbers) discovered in the top chunks to pull linked files into context for multi-hop questions. The VLM answers with a strict JSON contract; a salvage parser recovers truncated output, units are normalised against evidence, and a hallucination guard refuses when the answer is unsupported, returning the required empty answer and empty citations. Citations are graded as necessity, not relevance: a NEEDED/UNNEEDED check prunes extras, a completeness check adds missing bridge files, and image-derived answers are verified against the pixels and cited automatically.

Category tags: