AI & LLM Applications
QueryMate & Oxtract — Document Intelligence
AI-powered document parsing, summarization, and semantic retrieval built at The CodeWise — QueryMate for LLM-powered document summarization, Oxtract applying the same pipeline pattern to parsing pension documents.
01
Overview
Raw documents aren't queryable. QueryMate turns them into a system that can answer questions and produce summaries grounded in their actual content. Oxtract applies the same pipeline shape to a harder document type: multi-stage pension-document parsing, extracting and organizing key insights via semantic search.
02
Challenge
Getting retrieval right matters more than the model: the pipeline has to chunk and embed documents in a way that preserves meaning, then retrieve the right passages before the LLM ever sees the question — otherwise the model answers confidently and wrongly. Pension documents raise the bar further — dense, multi-section, and inconsistent in structure — which is why Oxtract needed a multi-stage pipeline rather than a single parse-and-embed pass.
03
Architecture
A FastAPI service (async SQLAlchemy, JWT auth, file uploads) accepts document uploads and runs them through LangChain for parsing and chunking before embedding content into Weaviate. At query time the same pipeline embeds the question, retrieves the most relevant chunks, and grounds the LLM's summary or answer in them. A separate, lighter pipeline — Ollama plus scraping — handles domain enrichment and industry classification where a full RAG pass isn't needed.
- Document Upload
- Processing Pipeline
- Embedding / Vector Store
- Semantic Retrieval
- LLM Response
- Result
04
Implementation
- Built AI-powered document parsing and summarization (QueryMate) using LLMs, LangChain, and Weaviate as the vector store.
- Built Oxtract's multi-stage pipeline for pension documents — parse, segment, embed, retrieve — to extract and organize key insights via semantic search.
- Integrated a lightweight GenAI pipeline (Ollama + scraping) for domain enrichment and industry classification, kept separate from the full RAG path for latency and cost.
- Deployed FastAPI backends with async SQLAlchemy, JWT auth, file uploads, and external API integrations.
05
Technologies
06
Engineering Decisions
Why FastAPI?
Async-first and lightweight for an I/O-bound pipeline (document parsing, embedding calls, retrieval) without the overhead of a heavier framework.
Why Weaviate as the vector store?
A managed vector database with built-in hybrid search meant not having to hand-roll index management for two different document pipelines (QueryMate and Oxtract) sharing the same retrieval infrastructure.
Why a separate Ollama pipeline instead of routing everything through the full RAG stack?
Domain enrichment and industry classification don't need grounded, cited retrieval — a lighter local-inference pass is faster and cheaper, and keeps the heavier LangChain/Weaviate pipeline reserved for where grounding actually matters.
07
Reliability
- Retrieval is grounded in the document's own content — responses reference retrieved passages rather than unconstrained generation.
- Pipeline stages (parse → chunk → embed → retrieve → respond) are separated so a failure in one stage doesn't silently corrupt the others.
- Oxtract's multi-stage structure isolates pension-document parsing failures from the retrieval and extraction stages downstream.
08
Outcome
Two working document-intelligence pipelines — QueryMate for general document summarization and retrieval, Oxtract for structured pension-document extraction — sharing a common FastAPI/LangChain/Weaviate foundation.