The Problem
Work-winning teams sit on years of hard-won evidence—past case studies, winning and lost tender submissions, lessons learned, and staff CVs—scattered across Markdown notes, table-heavy Word documents, and PDFs. Under tender deadlines, teams either spend days hunting for verified outcomes or fall back on generic boilerplate that fails evaluation criteria.
Standard vector RAG struggles on bid questions that require multi-hop reasoning or strict filtering (for example, finding verified safety or carbon outcomes delivered for a specific client using a particular construction method, led by named personnel—and abstaining cleanly when the evidence does not exist).
How It Works (Architecture & Stack)
WWH Graph combines a schema-enforced Neo4j 5.26 knowledge graph, multi-format document ingestion, hybrid entity resolution, and a dedicated Bid Builder workspace.
[.md / .docx / .pdf Corpus]
│
▼
┌─────────────────────────────────────────────────────────┐
│ Zero-Frontmatter Ingestion + Character-Offset Spans │
│ 7-Node Pydantic Ontology (Project, Client, Tender, │
│ Method, Risk, Outcome, Person + Document/Chunk links) │
└──────────────────────────┬──────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────┐
│ 3-Stage Hybrid Entity Resolution │
│ Exact/Acronym ("NR" → "Network Rail") → RapidFuzz │
│ (≥88%) → Neo4j Entity Vector Cosine (≥0.90 auto-merge) │
└──────────────────────────┬──────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────┐
│ Hybrid GraphRAG + Bid Builder Workspace │
│ QueryPlanner → Dual Vector Search + Degree-Damped │
│ Traversal → Evidence Matrix → Citation-Audited Draft │
└─────────────────────────────────────────────────────────┘
| Layer | Implementation |
|---|---|
| Ontology & Ingestion | Strict Pydantic v2 (extra="forbid") across 7 core entity types + provenance (MENTIONED_IN); ingests .md, table-heavy .docx (python-docx), and .pdf (pypdfium2 + Docling fallback) with character offsets. |
| Hybrid GraphRAG | Structured LLM QueryPlanner, dual Neo4j vector indexes (chunk_embeddings + entity_embeddings), filter-guided Cypher, hub-safe degree-damped subgraph traversal, and strict abstention guardrails. |
| Bid Builder & Benchmark | Paste an ITT question, constraints, and scoring criteria → curate an Evidence Matrix → generate a word-count-bounded, citation-audited draft → export .docx or .md. Evaluated via a 24-question stress benchmark against baseline Vector RAG. |
| Tech Stack | Neo4j 5.26 (Docker + APOC), FastAPI, Pydantic v2, rapidfuzz, swappable Gemini/OpenAI providers, React 18, Vite, TypeScript, Tailwind CSS v4, and react-force-graph-2d. |
What I Learned
- Entity resolution makes or breaks construction graphs: Infrastructure documents constantly mix acronyms and names (
NR/Network Rail,EA/Environment Agency,TfL/Transport for London); combining alias rules, lexical fuzzy matching, and semantic vector thresholds stops the graph from fragmenting. - Abstention is a first-class feature in work winning: A bid system that invents an unverified metric creates commercial and reputational risk; explicit verification flags and abstention checks matter as much as recall.
- Benchmarking against equal-budget vector RAG keeps architecture honest: Measuring fact recall, citation completeness, citation faithfulness, and abstention across simple, multi-hop, hard-filter, and abstention queries shows exactly where the graph earns its complexity.