How H6.ai builds AI-powered financial automation with Lakebase Postgres
H6.ai uses Lakebase Postgres database branching to automate financial processes while ensuring accuracy and compliance, isolating customer data for reliable regression testing.
H6.ai automates accounts payable by reading invoices, matching them to purchase orders, assigning accounts, and enforcing company policies using AI and deterministic logic. The company faced challenges in regression testing due to dynamic customer data, where invoice matches could change even without code modifications. To address this, H6.ai adopted Lakebase Postgres, which separates storage from compute and enables branching, allowing isolated customer data snapshots for accurate testing.
Each H6.ai customer maintains a dedicated Lakebase Postgres database containing their financial context, including purchase orders, suppliers, chart of accounts, and policies. Database branching creates copy-on-write snapshots that preserve the state of invoices, purchase orders, and supplier data at specific points in time, enabling reliable regression testing without altering live systems.
H6.ai’s test harness uses these snapshots to run test cases against preserved database states, ensuring consistent starting points for testing across customers, ERPs, and invoice formats. Tests execute against isolated branches, preventing writes to live databases and allowing safe, repeatable validation of AI-driven financial automation without impacting production environments.
By leveraging Lakebase Postgres, H6.ai can test new models, improve extraction, and modify matching engines while detecting regressions before they reach production. The approach ensures that financial automation remains accurate and compliant, with permanent test cases created from real customer scenarios to maintain reliability as the platform scales.