Skip to content

v0.7.0

Choose a tag to compare

@robert-mcdermott robert-mcdermott released this 12 Sep 07:08
· 8 commits to main since this release
6698b3d

The biggest release since the project started: a hardened extraction pipeline, inference that adds knowledge instead of noise, and a completely new interactive graph explorer. The demo has been regenerated: https://robert-mcdermott.github.io/ai-knowledge-graph/

Upgrading from 0.6.x

  • Install with pip install -e . (or uv sync). The package is now knowledge_graph; the generate-graph command is unchanged.
  • Python 3.11 or newer is required.
  • Check your config.toml against the README: max_tokens now defaults to 32768 (reasoning models need it), temperature to 0.2, and rule-based transitive inference is off by default. New optional [extraction] section and [visualization] keys.
  • Old .json outputs still load with --from-json; new ones add entity types, source sentences and inference methods.

What's new

Extraction you can trust

  • The LLM client detects truncated or empty answers, a common failure with reasoning models that spend their whole token budget thinking, and stops with an explanation instead of silently producing a near-empty graph. Retries with back-off, automatic max_completion_tokens fallback for newer OpenAI models, env:VAR API keys, reasoning_effort, json_mode and extra_body pass-through.
  • Sentence-aware chunking, parallel chunk extraction, and an on-disk response cache: re-running the same document with the same settings makes no API calls.
  • Every extracted relationship now carries entity types (person, organization, place, event, technology, product, work, date, concept) and the sentence it came from.

Inference that adds knowledge, not noise

  • In testing, the old transitive and lexical rules generated about 70 % of all edges and hid the real ones. They are now opt-in and constrained.
  • New LLM passes connect every isolated part of the graph to the main body and add well-known relationships between the most central entities ("internet enabled e-commerce"), plus a deterministic taxonomy rule ("quantum computing" is a "computing"). Inferred edges are capped relative to extracted ones and every one records its method.
  • Communities are named by the LLM ("First Industrial Revolution Textiles", "Blockchain and Decentralized Finance").

A new explorer page

  • One self-contained HTML file that works offline (PyVis is gone; vis-network is embedded).
  • Click a node to highlight its neighbourhood and see every relationship with its source sentence; search with autocomplete; a shortest-path finder between any two entities; a communities panel with entity-type filters and a minimum-connections slider; edge labels for all edges, none, or only around the selection; stats, physics controls, PNG/JSON/CSV export, keyboard shortcuts, shareable #node= links, light and dark themes, responsive layout.
  • Fixes the network is not defined error, invalid vis.js options and dropped parallel edges of the old page; 20 community colours instead of 8.

More inputs and outputs

  • .txt, .md, .rst, .pdf (pip install "ai-knowledge-graph[pdf]") and .docx ([docx]) inputs, multiple files or whole directories, and extraction.language for non-English documents.
  • --export csv,graphml,cypher: GraphML for Gephi, yEd and Cytoscape, and an idempotent Neo4j MERGE script.
  • --from-json re-renders any saved graph without LLM calls; --continue-on-error and --no-cache for control over runs.

Under the hood

  • src/ package layout, dependencies reduced to networkx, jinja2 and requests, 124 tests that need no LLM, ruff, and CI on Python 3.11–3.13.
  • README rewritten with a full configuration reference, provider examples and troubleshooting.

Resolved issues

#7 (non-English output), #9 (encoding errors and PDFs), #15 (gpt-5 max_completion_tokens), #17 (Gemini configuration), #18 (Neo4j export). #11 (readability) is addressed by the new explorer.

Thanks

To everyone who filed issues and opened pull requests since 0.6; most of the feedback in the tracker shaped this release.