Fintech & AI Engineering

Paham Pajak

Co-founder & Product Engineer

An Indonesian AI tax agent with 110+ users since launching in March 2026. It answers from hybrid retrieval over 2023–2026 tax regulations, declines questions its corpus does not cover, and checks every citation against the passages it was given. Ten deterministic tax calculators sit alongside the chat.

Core Technologies

Next.js 16React 19pgvectorPostgreSQL FTSTool callingDrizzle ORMDocker
Paham Pajak Preview
Quick Preview
Information Architecture

Hybrid RAG
& Grounding Checks

Tax laws are dense and change every year. Retrieval fuses pgvector embeddings and PostgreSQL full-text search with Reciprocal Rank Fusion in one query, behind a curated rule engine where every rule links to its source article.

Knowing what it doesn't know

Hybrid retrieval always returns its top results, even for a question about rendang, and RRF scores are only ranks. So the gate that decides whether the corpus covers a question uses the one absolute signal available: the cosine distance to the nearest chunk, with the threshold measured on in-corpus and out-of-corpus questions.

The LLM client talks to OpenRouter with a failover endpoint, enforces token budgets and meters cost per message. Every retrieval and answer is logged, PII is masked before text reaches the model, and a golden Q&A set plus regression cases gate every prompt or corpus change.

01 REWRITE

Turn a follow-up into a standalone question and detect which tax year applies.

▼

02 HYBRID RETRIEVAL

pgvector and PostgreSQL full-text search, fused with Reciprocal Rank Fusion.

▼

03 CORPUS GATE & STREAM

Decline if the nearest chunk is too far; otherwise stream the answer over SSE.

▼

04 VERIFY & LOG

Check every citation against retrieved chunks → log latency, outcome and cost.

Feature 01

Tax Planner Dashboard

Personalized Financial Strategy

The central user hub combining interactive quick estimating tools and financial summaries. It features a dedicated Tax Planner interface that hooks directly into the AI consultation engine to generate personalized, data-driven tax strategies.

  • Interactive Tax Planner interface
  • Real-time financial metric summaries
  • Direct routing to AI Consultation
  • Responsive grid layout via Tailwind v4
Tax Planner Dashboard
Tax Planner Dashboard
Feature 02

AI Tax Consultation

Hybrid RAG + verified citations

Conversational tax assistant grounded in official 2023–2026 regulations through hybrid retrieval. A citation post-check validates every cited regulation and scores grounding confidence, PII is masked before text reaches the model, and step-by-step navigation cards guide complex tax-filing workflows.

  • Hybrid retrieval (pgvector + full-text, RRF)
  • Citation post-check with grounding score
  • Out-of-corpus gate on cosine distance
  • SSE streaming with provider failover
AI Tax Consultation
AI Tax Consultation
Feature 03

Comprehensive Tax Calculators

Complex Financial Logic

Includes 10 interactive tax calculators (PPh 21 TER, PPh Badan, PPh UMKM, PPN, etc.). They handle TER rate tables and PTKP (non-taxable income) values through a server-side calculation API.

  • 10 calculation modules
  • TER tables and PTKP values
  • Server-side calculation API
  • shadcn/ui forms
Comprehensive Tax Calculators
Comprehensive Tax Calculators
Technology

Core Technologies

Next.js 16

Framework

React 19

Library

pgvector

Vector search

OpenRouter

LLM gateway

PostgreSQL

Database

Drizzle ORM

Schema/Types

Gemini Embedding

Embeddings

Better Auth

Security

Tailwind v4

Styling

Recharts

Data Viz

Explore

Architecture & Implementation

Paham Pajak is live with 110+ users. Try the assistant and the calculators yourself.

Visit Live App