# RAG Finance

> A finance and tax research assistant connecting Indonesian regulations to article-level evidence, official sources, and clear uncertainty.

Keep the sources close to the answer.

- URL: https://weaveward.com/work/finance-tax-regulatory-research-assistant
- Stage: Prototype
- Year: 2026
- Industry: Finance and tax research
- Context: Internal product
- Capabilities: AI solutions, Web apps
- Technologies: Python, FastAPI, PostgreSQL + pgvector, Tesseract OCR, fastembed + ONNX Runtime, Next.js, React, TypeScript, Docker Compose

## The challenge

Finance and tax teams work with rules spread across official portals, lengthy documents and amendments. Finding a plausible answer is easier than checking which provision supports it and whether later wording changes the conclusion.

A useful research assistant needs to show its evidence, preserve the context around an article and admit when the indexed sources do not answer the question.

## What we built

RAG Finance combines a searchable regulatory library with a research chat workspace.

- **Questions in Indonesian or English.** Conversation context and query planning turn everyday wording into targeted searches across finance or tax sources
- **Answers with references.** Article and page evidence, document metadata and official-source links let the user inspect the material behind a grounded answer
- **Amendment-aware research.** Retrieval considers document status and brings in later amended wording found in the index. It distinguishes the old provision from the indexed change
- **A reusable document library.** Resources and hybrid search work independently of the chat, with filters for source, domain, document type and status
- **Controlled ingestion.** Source adapters cover Bank Indonesia, OJK, SIKePO, DJP and the Ministry of Finance, alongside administrator uploads. File validation, incremental processing and reusable embeddings avoid repeating unchanged work
- **Tools for review.** Administrators can inspect ingestion progress and retrieval traces, compare search results and configure model providers

## How it works

### Combined search, validated citations

The system combines vector search, full-text search and direct regulation lookups. A sufficiency check decides whether the selected material supports an answer, and the server validates citation markers against that evidence.

### Clearly labelled answer modes

The interface distinguishes grounded, hybrid, general and no-answer modes. When optional general-knowledge fallback is enabled, the answer is visibly labelled; it does not acquire official-source status simply because it appears in the same conversation.

## Current stage

This is a working internal prototype, with no production user deployment claimed. An early documented benchmark used 25 labelled questions and 693 regulatory chunks: retrieval reached hit@5 of 0.96 and MRR of 0.84 using a local embedding model.

That small historical test measures retrieval, not legal correctness, full-corpus coverage or the quality of every generated answer. Only documents actually indexed can support research, and later wording found in the index is not a guarantee that every relevant amendment has been collected. The user remains responsible for checking authoritative sources and interpretation.

## Where this fits

The same architecture can help teams research internal policies, standards or contracts with references they can inspect. Explore our [AI solutions](/services/ai-solutions) and [web applications](/services/web-apps), or [discuss your knowledge workflow](/contact).
