Royal Audit Authority auditors can ask questions about approved documents and follow citations back to the source. I led the four-person team and worked on the interface, backend, document search and answer evaluation. The project reached a demonstration deployment.
- Royal Audit Authority, Bhutan
- Team lead, full-stack & AI/ML development
- Four-person project team
- Built and evaluated · demonstration deployment.
Making approved audit material easier to search
Auditors consult Acts, rules, circulars and manuals. We built a way for them to ask a question in ordinary language, see relevant material and check the original document before using an answer in their work.
My work on the application and search
I worked on the React and TypeScript interface, the FastAPI backend, and access controls. I helped prepare documents for search, rank the most relevant passages, and generate answers with citations.
Our four-person team shared requirements, design, implementation, testing and documentation.
Giving auditors a source they can check
The chat workspace supports follow-up questions and conversation history. Citations link answers to the relevant section or page. Separate roles control who can ask questions, maintain the approved documents or administer the system.
- Auditors
- Ask questions, review cited material, and continue a conversation without administrative access to change the knowledge base.
- Knowledge management administrators
- Upload approved PDF and DOCX documents and maintain metadata such as titles, categories, and effective dates, alongside access to the assistant.
- System administrators
- Manage users and permissions, review audit records, and monitor application and AI activity.
Preparing documents and retrieving evidence
The assistant uses retrieval-augmented generation (RAG). It searches approved material for relevant passages before generating an answer. Document processing runs in the background, separately from interactive queries.
Ingest and extract
An authorised administrator uploads a PDF or DOCX file. Background processing extracts the text and retains the document metadata needed to identify the source later.
Split with context
Documents are divided into searchable passages while preserving enough surrounding context to support useful retrieval and source references.
Embed and index
Passages are prepared for semantic search and remain linked to the original document so retrieved evidence can be identified and inspected.
Retrieve and rerank
The question is used to retrieve candidate passages, which are ranked for relevance before selected evidence is used to prepare an answer.
Generate and cite
The assistant produces an explanation from the retrieved context, with references that connect the answer back to its source material.
Handle missing evidence
The intended response when the repository does not support a question is to say that no verified information is available, rather than supply a speculative answer.
Keeping retrieved passages tied to their sources
We evaluated dense reference material and narrative documents separately when deciding how to split and index them. Original document references are kept with each passage so auditors can inspect the evidence.
The application uses React, TypeScript, FastAPI and PostgreSQL. Access controls and document approval determine which material the assistant can use.
What the answer evaluation found
We used RAGAS to compare retrieval and document-splitting strategies on audit questions. In the comparison with the baseline, the reranked setup scored 0.90 for faithfulness and 0.89 for answer relevancy. Both scores improved, while context precision fell.
The scores describe that evaluation set. They don’t establish general accuracy or how the assistant would perform on every question.
Demonstration deployment and evaluation
The team demonstrated document upload, cited answers and role-based administration in one application. The report records functional, integration, browser and device checks. The demonstration and evaluation do not establish institutional rollout or acceptance.
The Royal Audit Authority recognised my contribution with a Certificate of Appreciation in July 2026.
