Taxbit Engineering Practice: Retrieval and Security Strategies for Building Reliable AI Assistants in Regulated Industries
The Taxbit team shares engineering practices for building the AI assistant Taxbit Assist in regulated industries, focusing on specific methods to ensure answer reliability and security through context chunking, code-bound identity, and continuous quality monitoring.
Taxbit is a digital asset tax and accounting compliance platform founded in 2018, serving enterprise clients such as exchanges, payment services, and brokers. Its newly launched AI assistant, Taxbit Assist, is embedded in the product dashboard, helping compliance teams obtain reliable answers in regulated environments. This practice demonstrates how specific engineering measures can ensure the credibility and security of answers when building AI assistants in sensitive fields.
When building Taxbit Assist, the team faced four core constraints: answers must be grounded and citable; the assistant must possess role and organization awareness to avoid guiding users into workflows they do not have permission to access; there must be a strict distinction between product documentation and tax advice; and regional data residency requirements must be supported. To meet these requirements, the team selected Amazon Bedrock AgentCore as the underlying platform, leveraging its managed agent runtime, built-in memory capabilities, and session isolation features, thereby allowing them to focus primarily on retrieval and security work.
Improvements in retrieval quality were mainly due to two key engineering practices. The first is the context chunking strategy: the team adopted semantic chunking and added the title and lead paragraph of the document to which each chunk belongs before every chunk via custom transformation hooks, ensuring that each chunk carries information about its scope. This change proved to be the most impactful retrieval optimization, effectively preventing misleading results caused by chunks losing their context. The second is retrieval process optimization: at query time, the system first obtains a large number of candidate passages through vector search, then uses a reranking model for fine-grained ranking, and limits the number of chunks returned per source document, thereby balancing recall and precision.