Supplier GSTIN typo (O vs 0, I vs 1)
pr_gstin_raw2b_gstin_candidatelevenshtein_scoreoperator_decisionTwenty reconciliation edge cases, a one-pager IMS PRD, a 7-tier matching algorithm with pseudo-code and confidence bands, and a RAG-style AI knowledge-base architecture with six guardrails. Cited against CGST sections and CBIC norms where relevant. Same dataset as Tab 3's working product - the spec and the product reinforce each other.
For each: the failure pattern, the detection rule a recon engine should run, an auto-resolution decision (with confidence), the customer prompt when human attention is required, and the audit-trail fields the engine must persist so an ASMT-10 or DRC-01 response can reconstruct what happened.
pr_gstin_raw2b_gstin_candidatelevenshtein_scoreoperator_decisionpr_invoice_no_raw2b_invoice_no_rawnormalized_invoice_nonormalization_stepsfy_token_beforefy_token_aftersubstitution_rulepr_invoice_no_rawstripped_charsnormalized_invoice_nopr_amount2b_amounttolerance_appliedtolerance_bandsupplier_state_coderecipient_state_codepr_tax_split2b_tax_splitpr_period2b_period_foundperiod_drift_monthssupplier_filing_dateinvoice_fyfiling_fycutoff_dateineligibility_reasoncredit_note_idcancellation_dateirn_cancellation_statusoriginal_match_idamendment_2b_idamount_deltaprevious_ims_stateoriginal_invoice_idcredit_note_idnet_itcmerge_rulehsn_sacblocked_categoryoperator_overrideoverride_reasonrcm_applicableself_invoice_idcash_payment_idclaim_periodcomposition_statusas_of_dateblocking_ruleirngstr1_invoice_noirp_invoice_nomismatch_typeirnirn_activecredit_note_ideffective_statusb2c_section_amountb2c_periodamendment_requested_atisd_distribution_noisd_invoice_idbranch_gstinadvance_voucher_idfinal_invoice_idpaired_attds_amounttcs_amountgstr_2x_periodThe user, the problem, the metrics, the workflow, the bulk-action UX for 100K+ invoices, edge cases, the GSTN/Cygnet integration model, and an explicit V1 vs cut list with reasoning.
Without product support, IMS at 100K invoices/month is a 30-person spreadsheet operation. Operators miss the 14th-day lock, deemed-acceptance silently inflates ITC, disputed invoices accept by inaction, and audit defense becomes archaeology.
Pattern: Filter-then-bulk, never select-then-action.
Each tier is a strict superset of the previous in expense; if a cheaper tier matches, stop. Confidence drops as we relax constraints. Below 60% - mandatory operator review. Engineers can read the pseudo-code; auditors can read the rule strings.
function match(prInvoice: InvoicePR, candidates2B: Invoice2B[]): MatchResult {
// Tier 1 - Exact
const exact = candidates2B.find(c =>
c.supplier_gstin === prInvoice.supplier_gstin &&
c.invoice_no === prInvoice.invoice_no &&
c.invoice_amount === prInvoice.invoice_amount
);
if (exact) return { type: 'exact', confidence: 100, matched: exact };
// Tier 2 - Normalized invoice_no
const norm = normalize(prInvoice.invoice_no); // lowercase + strip non-alphanumeric
const normMatch = candidates2B.find(c =>
c.supplier_gstin === prInvoice.supplier_gstin &&
normalize(c.invoice_no) === norm &&
c.invoice_amount === prInvoice.invoice_amount
);
if (normMatch) return { type: 'normalized', confidence: 95, matched: normMatch };
// Tier 3 - FY-token substitution
for (const variant of fyVariants(prInvoice.invoice_no)) {
const m = candidates2B.find(c =>
c.supplier_gstin === prInvoice.supplier_gstin &&
normalize(c.invoice_no) === normalize(variant) &&
c.invoice_amount === prInvoice.invoice_amount
);
if (m) return { type: 'fy_aware', confidence: 90, matched: m };
}
// Tier 4 - Tolerance bands
const tolerance = candidates2B.find(c =>
c.supplier_gstin === prInvoice.supplier_gstin &&
normalize(c.invoice_no) === norm &&
abs(c.invoice_amount - prInvoice.invoice_amount) <= max(1, 0.0001 * max(c.invoice_amount, prInvoice.invoice_amount)) &&
abs(daysBetween(c.invoice_date, prInvoice.invoice_date)) <= 7
);
if (tolerance) {
const categories = detectMismatchCategories(prInvoice, tolerance);
return { type: 'tolerance', confidence: 85, matched: tolerance, mismatchCategories: categories };
}
// Tier 5 - Multi-month lookback
const multiMonth = findInPeriodWindow(prInvoice, candidates2B, { months: 3 });
if (multiMonth) return { type: 'multi_month', confidence: 70, matched: multiMonth };
// Tier 6 - Fuzzy GSTIN (last resort before unmatched)
const fuzzy = candidates2B.find(c =>
samePAN(c.supplier_gstin, prInvoice.supplier_gstin) &&
levenshtein(c.supplier_gstin, prInvoice.supplier_gstin) <= 1 &&
normalize(c.invoice_no) === norm
);
if (fuzzy) return { type: 'fuzzy_gstin', confidence: 60, matched: fuzzy };
return { type: 'unmatched', confidence: 0, matched: null };
}The information architecture, content sources, per-persona usage, the six guardrails that keep this from hallucinating tax law, and the six-month metrics that prove it earned its keep.
| Source | Owner | Cadence | Volume | Authority |
|---|---|---|---|---|
| CBIC circulars | CBIC | weekly | ~150/year | interpretive |
| CBIC notifications | CBIC | weekly | ~80/year | binding |
| CBIC instructions | CBIC | ad-hoc | ~40/year | internal |
| GSTN portal advisories | GSTN | ad-hoc | ~100/year | operational |
| CGST/IGST/UTGST Acts | Parliament | rare | ~150 sections | binding |
| GST Rules | Govt | ad-hoc | ~170 rules | binding |
| AAR / Court rulings | Judiciary | weekly | ~500/year | precedential |
| Finkraft SOPs | Internal | weekly | ~100 | operational |
| Customer scenario library | Internal | daily | growing | experiential |
The KB is only as good as its refusal rate. A knowledge base that answers everything confidently is a liability dressed as a feature. The win condition is: Sales calls it before chasing PM, BAs design integrations from cited evidence, customers self-serve common GST questions, and when the right answer doesn't exist in the corpus - the system says so, cites the closest reference, and tells the user a practitioner should review.
The four parts above describe a product. The next tab - Product - is that product, running on seeded synthetic data. The recon engine implements the 7-tier cascade. The IMS workspace implements the bulk-action UX. The knowledge base runs the RAG pipeline with the guardrails described. Reading is half of it. Using it is the other half.
↑ Independent educational project by Kaushal Khodifad. Finkraft.ai is a real company in the enterprise GST compliance and reconciliation space; this design and the underlying prototype were built by Kaushal as a portfolio study. Not affiliated with, endorsed by, or representative of Finkraft.ai's actual product. Data is from public sources. Figures are estimates.