Skip to content

BizComp Intelligence

AI Conversational Agent and Analytics Engine for Belgian Enterprise Data

01

Overview

BizComp Intelligence is the AI analytics layer built on top of the BizComp data platform. It integrates an official Belgian data ingestion pipeline (BCE/KBO and annual financial balance sheets) with a real-time conversational agent. Users explore company records in natural language ('Show me Colruyt's financials', 'Compare Delhaize and Carrefour'), with automatic intent classification, entity resolution, parallel tool orchestration, and live streaming dashboard composition.

02

System Architecture

The system follows a layered architecture centered on a high-throughput Fastify (Node.js) backend and PostgreSQL on Google Cloud SQL. The processing pipeline coordinates LLM-powered intent classification, BCE registry entity resolution, asynchronous tool query planning, optimistic session concurrency, and dynamic financial dashboard assembly streamed via Server-Sent Events (SSE).

  1. 01
    User QueryNatural language prompt
  2. 02
    Intent ClassifierLLM-driven, 12 intent types
  3. 03
    Entity ResolverBCE lookup, speculative parallel resolution
  4. 04
    Query PlannerTool selection and orchestration
  5. 05
    Tool ExecutorParallel calls with retry and abort
  6. 06
    Layout ComposerDashboard assembly + follow-up suggestions
  7. 07
    Streaming OutputSSE stream to client
Every stage supports abort propagation and request budget monitoring

03

Core Features

  1. 01Natural language intent classification across 12 structured types (financial analysis, liquidity ratios, risk flags, company overview, sector comparison)
  2. 02Asynchronous tool orchestration with parallel execution (get_company_card, get_financials, get_risk_flags, search_companies)
  3. 03Real-time Server-Sent Events (SSE) streaming delivering partial responses as each pipeline phase completes
  4. 04Multi-path extraction pipeline for Belgian balance sheets (text Fast Path, OCR fallback, structured multimodal LLM, and Donut model)
  5. 05Optimistic session concurrency control with PostgreSQL versioning to handle simultaneous user queries without context loss
  6. 06LLM queue manager with token bucket rate limiting and load shedding to prevent API saturation during peak traffic
  7. 07Comprehensive trilingual support (French, Dutch, English) with localized financial terminology
  8. 08Interactive visualization widgets: trend charts (Recharts), comparative metrics grids, solvency badges

04

Tech Stack

Next.js 15 · TypeScript · Fastify (Node.js) · Google Gemini AI · PostgreSQL · Google Cloud SQL · Docker · Tailwind CSS · Server-Sent Events · Recharts

05

Technical Challenges & Solutions

01

Reliable Intent Classification & Entity Resolution

User queries are often ambiguous: 'Colruyt finances' could mean a quick health check or a deep ratio analysis. I built a classifier mapping requests to one of 12 structured intent types with conversational context normalization. The entity resolver queries the Crossroads Bank for Enterprises in parallel with classification to minimize response latency.

02

Streaming Pipeline with Safe Abort Propagation

Each request flows through more than 5 asynchronous stages (classify, resolve, plan, execute tools, compose). I implemented request budgets with abort propagation: if the client disconnects or times out, in-flight LLM calls and SQL queries are cancelled immediately, preserving backend server resources.

03

Optimistic Session Concurrency

When multiple rapid or concurrent requests hit the same session, state corruption is a significant risk. I implemented optimistic concurrency control with a version column on PostgreSQL. In the event of a lock conflict, the system reloads the newest session state and retries up to 3 times automatically.

04

LLM Rate Limiting & Queue Management

To prevent hitting provider inference quotas under heavy load, I created a shared LLM queue manager with token bucket rate limiting and intelligent load shedding. The system prioritizes interactive user sessions and gracefully sheds low-priority traffic before downstream saturation occurs.