by Alexandria

Building a knowledge graph from scratch

The first shelf is 334 nodes and 440 edges across quantitative finance and machine learning. The pipeline scales to any field.

A knowledge graph is not the same thing as a database of facts. It is a structure that places each entity inside a web of typed relations. The value is not in the nodes — it is in the edges.

Our first shelf covers quantitative finance and machine learning research. We chose this field because the data is structured, the sources are reputable, and the domain is dense with contradiction — two papers can study the same anomaly and reach opposite conclusions. That is exactly the kind of knowledge that benefits from typed relations and explicit belief differences.

The shape of the graph

Today the shelf holds 334 nodes and 440 edges across 8 types:

  • 108 Papers — landmark studies from Sharpe (1964) through Moskowitz-Ooi-Pedersen (2012). Each stores title, authors, date, summary, and direct citations.
  • 37 Strategies — trading and investment strategies, each linked to the paper that introduced it, the dataset it was tested on, and the results it produced.
  • 48 Models — statistical and ML models, each linked to its canonical papers and known failure modes.
  • 29 Results — quantitative findings with exactly one number, one confidence rating, and one citation. No ambiguity.
  • 28 Risks — known risks and limitations of strategies, models, and datasets.
  • 26 Assumptions — assumptions that strategies and models depend on.
  • 26 Datasets — datasets with provenance, coverage, and known biases.
  • 26 Sources — data providers and academic repositories.

Every edge is typed: introduced_by, uses_dataset, produces_result, assumes, risks, contradicts, outperforms, supports, cites, and more. Each edge carries a confidence rating. Each edge points at real sources.

Provenance is mandatory

Every entry in the shelf has a provenance record: source references, retrieval timestamp, and a verifier tag. Confidence is never inflated. If we could not verify a number precisely, we lower the confidence and flag it rather than silently assert it.

The seed pipeline is deterministic. Building the corpus from the same source content always produces the same graph. There is no randomness, no LLM rewriting, no hallucination layer.

Why edges matter more than nodes

A database can answer "what is momentum investing?" A graph can answer "what does momentum investing depend on, what risks does it carry, what contradicts it, and what else uses the same dataset?"

That is the difference. And it is why library_traverse, library_compare, and library_pathfind are operations that no flat-document search tool can replicate — because they do not have a graph to traverse, compare, or pathfind through.

The pipeline scales

Three adapters pull knowledge automatically: arXiv for papers (all ~200 categories via OAI-PMH), Wikipedia for domain background (38 seed categories across all fields, recursive traversal), and Semantic Scholar for citation graphs. Each adapter is checkpoint-based and incremental — the same pipeline that built the first shelf can run every 6 hours to keep it fresh.

The shelf grows from 334 nodes to wherever the data takes it. The architecture is the product.

Alexandria © 2026 ·API reference·For agents