ArangoDB Graph Model Architecture

Enterprise RAG Document Chatbot

Intelligent Knowledge Retrieval System

AWS Bedrock ArangoDB N8N Graph Database Claude AI Titan Embeddings Docker

An end-to-end AI-powered document chatbot enabling brokers to query a large library of operational documents — checklists, bank-specific guides, templates, and settlement procedures — using natural language. Designed for source-attributed, grounded responses with full document traceability and hallucination prevention.

Private Client Project — Active Development

Australian Mortgage Broker Industry — Feb 2026 – Ongoing

5
Document Formats Supported (PDF, DOCX, XLSX, CSV, Images)
Graph + Vector
Hybrid Dual-Retrieval Architecture
Zero Hallucination
Strictly Grounded Response Design
12x
AI Cost Reduction via Strategic Model Selection

Project Overview

Built for a leading Australian mortgage broker company, this system solves a critical operational problem: brokers spend excessive time manually searching through checklists, bank-specific guides, templates, settlement procedures, and forms to answer time-sensitive client questions. The Enterprise RAG Document Chatbot replaces that manual process with an AI-powered natural language interface that retrieves source-attributed answers from the correct document — with full traceability and no AI fabrication.

Problem Statement

  • Operational Bottleneck: Brokers manually searching a large, growing document library for time-critical information during client calls and settlements
  • Accuracy Risk: Outdated documents or incorrect manual lookups introduced compliance and settlement risk
  • No Source Attribution: Standard keyword search returned lists of documents — not answers — requiring brokers to read and interpret content themselves
  • Hallucination Risk: Generic AI tools fabricated procedural details, unacceptable in a regulated financial services environment
  • Scale: Document library spans PDF, DOCX, XLSX, CSV, and image formats with continuous updates from lenders

Document Ingestion Pipeline

  1. Source: Documents stored in AWS S3 across multiple lender-specific folders
  2. Extraction: AWS Bedrock Data Automation (BDA) processes PDF, DOCX, XLSX, CSV, and image files into structured markdown
  3. Semantic Chunking: N8N workflow splits documents into semantically coherent chunks (not fixed token splits) to preserve context boundaries
  4. AI Enhancement: Claude Haiku enriches each chunk with contextual metadata — document type, lender, relevant process stage, and inferred intent
  5. Entity Extraction: Claude Haiku identifies named entities (lenders, forms, conditions, deadlines) and their relationships
  6. Graph Insertion: Documents, chunks, lenders, forms, and entities stored as ArangoDB vertices; relationships stored as directed edges enabling graph traversal queries
  7. Vector Embedding: AWS Titan Text Embeddings V2 generates vector representations for each chunk, stored alongside the graph for hybrid search

Query Pipeline

  1. Natural Language Query → Intent classification determines query type (procedural, document lookup, lender-specific, comparison)
  2. Hybrid Retrieval: Vector similarity search (Titan Embeddings) combined with AQL graph traversal — graph paths surface related entities keyword search cannot find
  3. Confidence Scoring: Each retrieved chunk assigned a confidence score based on vector similarity, graph path depth, and entity match count
  4. Context Assembly: Top-ranked chunks assembled into a grounded context window with source attribution metadata
  5. Verbatim Generation: Claude Haiku generates responses anchored strictly to retrieved content — no inference beyond source material
  6. Source Attribution: Every response includes document name, section, and lender origin so brokers can verify and cite the source

State Manager — Document Lifecycle Control

A centralised N8N State Manager workflow governs the entire document lifecycle with atomic locking to prevent concurrent processing conflicts — critical when multiple document updates arrive simultaneously from different lenders:

  • Detects new/updated/deleted documents via S3 event triggers
  • Acquires an atomic lock on the document record before processing begins
  • Coordinates the full pipeline: extract → chunk → enhance → embed → upsert graph
  • Releases lock and updates document status on completion or failure
  • Handles version conflicts — newer versions supersede older ones without manual intervention

Strategic Model Selection — 12x Cost Reduction

A deliberate model selection strategy reduced AI inference costs by 12x compared to using a single frontier model throughout:

  • AWS Bedrock Data Automation: Handles document parsing (PDF, images) — purpose-built, no LLM cost per page
  • Claude Haiku: Used for contextual enhancement, entity extraction, and response generation — high throughput, low cost, sufficient accuracy for structured tasks
  • Titan Embeddings V2: Vector generation at AWS-native pricing, no third-party API calls
  • Claude Sonnet reserved only for complex multi-document synthesis queries where higher reasoning is demonstrably needed

Project Information

Project Type

Private Client Project

Australian Mortgage Broker Industry

Timeline

Feb 2026 – Ongoing

Role

AI/ML Engineer & Solutions Architect

Document Formats

PDF DOCX XLSX CSV Images

Technologies Used

AWS Bedrock Bedrock Data Automation Claude Haiku Titan Embeddings V2 ArangoDB AQL N8N AWS EC2 AWS S3 AWS IAM Docker Compose Caddy PostgreSQL JavaScript Python AWS SigV4

Skills Demonstrated

  • RAG System Architecture
  • Graph Database Design
  • AWS Bedrock Integration
  • N8N Workflow Orchestration
  • Document Processing Pipelines
  • Vector & Graph Hybrid Search
  • AI Cost Optimisation
  • Cloud Infrastructure (AWS)

Technical Highlights

Graph + Vector Hybrid Retrieval

AQL graph traversals surface related entities and document chains that pure vector search cannot find. Combined with Titan Embeddings vector search, the hybrid approach achieves confidence scores above 0.9 — up from a 0.3 baseline with vector-only retrieval.

AWS Bedrock Data Automation

AWS BDA handles multi-format document extraction (PDF, DOCX, XLSX, CSV, images) into structured markdown without per-page LLM costs, processing at scale before AI enhancement stages begin.

Atomic State Manager

Centralised N8N State Manager workflow with atomic locking prevents race conditions when concurrent document updates arrive from multiple lenders simultaneously — critical for a continuously updating document library.

Verbatim, Source-Attributed Answers

Responses are grounded strictly in retrieved document content — no inference beyond source material. Every answer includes document name, section, and lender origin for compliance traceability in a regulated financial services environment.

12x AI Cost Reduction

Strategic model selection — BDA for extraction, Claude Haiku for enhancement and generation, Titan for embeddings — reduced AI inference costs by 12x compared to using a frontier model end-to-end, without sacrificing retrieval accuracy.

Multi-User Architecture

Designed for concurrent broker team access — Docker Compose deployment on AWS EC2 with Caddy reverse proxy, N8N workflow queuing, and ArangoDB connection pooling to handle simultaneous queries without contention.

System Architecture & Workflows

ArangoDB Graph Model

ArangoDB Graph Model

Vertices and edges representing documents, chunks, lenders, forms, and entity relationships

AWS S3 Document Ingestion

AWS S3 Document Ingestion

N8N workflow reading and routing documents from S3 into the processing pipeline

Document Extraction Workflow

Document Extraction Workflow

AWS Bedrock Data Automation processing multi-format documents into structured markdown

Semantic Chunking Pipeline

Semantic Chunking Pipeline

N8N workflow for semantic chunking, AI contextual enhancement, and entity extraction

Entity Relationship Extraction

Entity-to-Entity Relationship Extraction

Graph edges connecting lenders, forms, conditions, and procedures extracted by Claude Haiku

Back to All Projects