Case study
Road Trauma RAG Assistant
A retrieval-augmented generation assistant that answers road safety questions from a public annual trauma report, with citations.
- RAG
- LLMs
- Vector Search
- Python
- Evidence Retrieval
Context
Road Trauma in Victoria: 2024 Statistical Summary, published by Victoria’s Department of Transport and Planning, contains dense evidence: definitions, trends, tables, and caveats. A retrieval-augmented generation (RAG) assistant can make this kind of material easier to search, query, and explain in plain English.
Problem
Readers need accurate, plain-English answers to specific questions, such as figures on lives lost, serious injuries, or definitions, without manually searching a long report. Any answer also needs to stay grounded in the source text rather than the model’s general knowledge.
Approach
I built a local proof-of-concept chatbot that answers questions from the report using retrieval-augmented generation. Report text was extracted and split into page-anchored chunks, then indexed using a combination of vector search and keyword (BM25) search. Answers are generated by a large language model constrained to the retrieved passages, with citations back to the report year and page number.
Outcome
The proof of concept runs locally and answers road safety questions, including on rural roads, serious injuries, and definitions, with citations to the source report. It performed particularly well on definition-based questions, where grounding in the source matters most, and has been discussed informally with road safety colleagues for feedback.
It has not been deployed as a public tool. A cloud-hosted version, to allow broader access, is a planned next step that has not yet been built.
What This Demonstrates
- Applied AI and RAG system design
- Evidence retrieval with citation grounding
- Responsible use of language models: avoiding unsupported claims
- Translating a public dataset into an accessible tool
Tools & Methods
- Retrieval-augmented generation (RAG)
- Hybrid retrieval: vector search combined with BM25 keyword search
- PyMuPDF for PDF text extraction
- Chroma vector store
- OpenAI
text-embedding-3-smallfor embeddings - OpenAI GPT-4o-mini and GPT-4o for answer generation
- Streamlit for the local interface
Limitations & Notes
This proof of concept used only the 2024 report; broader coverage would need more source documents. Table and chart extraction are not yet handled by a dedicated document-intelligence tool, so figures presented only in tables may be missed. It is not production-hardened: there is no authentication, rate limiting, or monitoring.
This is a personal proof of concept, not an official or production system. It does not replace official reporting channels or subject-matter experts, and only public or approved material is used in any demo.