Back to projects
AXIOM logo

AXIOM

self-hosted AI research system

A research system for documents, web evidence, and cited drafts.

AXIOM is the tool I built for document-heavy research. It ingests PDFs and web sources, builds a searchable evidence layer, runs agentic research missions, and helps turn the gathered material into structured papers and drafts with visible citations.

AXIOM system overview

system

What connects inside AXIOM

AXIOM is not just a chat interface over a vector database. It combines a document pipeline, a retrieval layer, model routing, research agents, writing workflows, and self-hosted deployment boundaries so the research process remains inspectable.

Research workspace

AXIOM gives one place to upload sources, chat with documents, start research missions, inspect notes, and turn evidence into structured drafts.

Backend orchestration

The backend owns missions, API calls, WebSocket updates, queues, document state, report artifacts, and the controller that coordinates the agent workflow.

Model dispatcher

LLM calls are routed through role-based model slots: fast, mid, intelligent, and verifier. Providers can be hosted or local as long as they expose an OpenAI-compatible API.

Evidence layer

Documents become chunks with metadata, page labels, dense and sparse embeddings, BM25 search records, entities, relationships, and image embeddings.

Document processor

A background processor converts PDFs, Word files, Markdown, and web material into searchable evidence with metadata enrichment and citation-ready page context.

GPU worker boundary

Embedding, reranking, and entity extraction are GPU-accelerated through an isolated worker, with device placement tuned for constrained local GPUs. Heavy PDF and relation models run in short-lived subprocesses so VRAM can be released cleanly.

model stack

Models are selected by job

AXIOM separates reasoning models from retrieval models. LLM providers are used through role slots, while local ML models handle embeddings, reranking, entity extraction, relation extraction, image search, and PDF conversion.

Fast model

Used for lower-latency work such as planning support, note assignment, query strategy, metadata extraction, and small structured decisions.

Mid model

Used for core research and writing tasks where AXIOM needs stronger synthesis without spending the most capable model on every step.

Intelligent model

Used for reflection, query preparation, deeper reasoning, and quality-sensitive parts of the mission loop.

Verifier model

Used for focused validation and checks where deterministic judgment matters more than broad generation.

AXIOM model roles and local ML model overview
BGE-M3

Dense and sparse text embeddings for document chunks and queries.

BGE-reranker-v2-m3

Cross-encoder reranking after vector, BM25, and graph candidates are merged.

GLiNER

Zero-shot entity extraction for people, organizations, locations, concepts, works, and methods.

mREBEL

Multilingual relation extraction for knowledge-graph triples.

CLIP

Image embeddings for figures and extracted PDF images.

Marker

PDF-to-Markdown conversion with page markers, tables, formulas, and optional LLM-enhanced OCR.

evidence pipeline

From source material to research output

A research mission can use local documents, web search, fetched web pages, and arXiv imports. The output stays tied to the evidence layer: notes, page numbers, source metadata, citation style, and draft versions remain visible instead of disappearing into a single model response.

  • Collect sources: AXIOM works with uploaded PDFs, Word files, Markdown, document groups, web search results, fetched pages, and arXiv papers.
  • Extract evidence: Metadata extraction, CrossRef/OpenLibrary/OpenAlex enrichment, page-label detection, Markdown conversion, chunking, and image extraction happen before research starts.
  • Index retrieval paths: BGE-M3 creates dense and sparse vectors, pgvector stores semantic search data, OpenSearch adds BM25 matching, and graph extraction adds entity relationships.
  • Run the mission loop: Planning, research, reflection, note assignment, and writing agents use document search, web search, page fetching, file reading, and calculator tools.
  • Produce cited output: The result is not just a chat answer. AXIOM keeps notes, source references, page numbers, citation profiles, outlines, drafts, and report versions visible.
AXIOM evidence to research draft pipeline

research agents

The mission loop

AXIOM decomposes a research question into work that can be inspected: initial questions, searches, relevant notes, reflection output, outline changes, note assignments, writing passes, and report versions.

The agents are supported by tools rather than free-form prompting alone: document search, web search, page fetching, arXiv ingestion, file reading, calculator calls, structured document access, writing tools, and reference integration.

Self-hosted deployment shape

React frontend behind Nginx as the browser-facing workspace
Python backend for APIs, WebSockets, mission orchestration, and model dispatch
PostgreSQL with pgvector for documents, chunks, embeddings, graph data, and state
OpenSearch for lexical BM25 retrieval when enabled
Background document processor for import and indexing jobs
GPU worker RPC over a Unix socket for shared embedder, reranker, and GLiNER access
Short-lived Marker and mREBEL subprocesses for heavy import-time model work
CPU, CUDA, ROCm, and Apple Silicon/MPS-oriented device configuration