<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Denis MacPherson</title>
    <description>The latest articles on DEV Community by Denis MacPherson (@dmacpherson).</description>
    <link>https://dev.to/dmacpherson</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4108762%2F9b165685-2162-4df7-b80c-aa419fa137bc.png</url>
      <title>DEV Community: Denis MacPherson</title>
      <link>https://dev.to/dmacpherson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dmacpherson"/>
    <language>en</language>
    <item>
      <title>Read a .ccx Knowledge Package in Python with Nothing Installed but ccx-format</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Mon, 23 Nov 2026 14:41:59 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/read-a-ccx-knowledge-package-in-python-with-nothing-installed-but-ccx-format-310m</link>
      <guid>https://dev.to/chaoscypherinc/read-a-ccx-knowledge-package-in-python-with-nothing-installed-but-ccx-format-310m</guid>
      <description>&lt;p&gt;An export format earns the word "open" when a program that has never heard of the tool that wrote the file can still read it. For &lt;code&gt;.ccx&lt;/code&gt;, that is now a short Python script.&lt;/p&gt;

&lt;p&gt;This post is that script. You open a knowledge package, list what is in it, print the exact source passages behind each entity, and hand the graph to networkx or pandas. Chaos Cypher doesn't need to be installed or running. You need one library, and the script never touches the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll have at the end
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;.ccx&lt;/code&gt; file opened and validated in plain Python, with the validator telling you which parts of it you can rely on&lt;/li&gt;
&lt;li&gt;Every entity and relationship in the package, by name&lt;/li&gt;
&lt;li&gt;For each entity, &lt;strong&gt;the sentence in the original document it was extracted from&lt;/strong&gt;, read back out of the package itself&lt;/li&gt;
&lt;li&gt;The whole graph as a &lt;code&gt;networkx.MultiDiGraph&lt;/code&gt; and as a pandas DataFrame, ready for whatever you already do with graphs and tables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://chaoscypher.com/blog/ccx-open-format" rel="noopener noreferrer"&gt;open-format post&lt;/a&gt; covered &lt;em&gt;what&lt;/em&gt; is in a &lt;code&gt;.ccx&lt;/code&gt; file and why the format is written down. This one is the &lt;em&gt;do it&lt;/em&gt; version: code you can paste.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; a &lt;code&gt;.ccx&lt;/code&gt; file is your knowledge graph plus the documents it came from, and any Python program can read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 0 — get a package
&lt;/h2&gt;

&lt;p&gt;You need a &lt;code&gt;.ccx&lt;/code&gt; file. If you already use Chaos Cypher, export one. In the app, open &lt;strong&gt;Settings → General → Import &amp;amp; Export&lt;/strong&gt; and click &lt;strong&gt;Export&lt;/strong&gt;. Keep &lt;strong&gt;sources&lt;/strong&gt; included, because they carry the citations this tutorial reads.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tjk220eylo5g0zdhsbd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tjk220eylo5g0zdhsbd.png" alt="Settings → General with the Import &amp;amp; Export row and its Export and Import buttons"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the terminal, the same export is one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chaoscypher graph package &lt;span class="kd"&gt;export&lt;/span&gt; --output my-graph.ccx --title &lt;span class="s2"&gt;"My Research"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't run Chaos Cypher yet and want a package of your own, start the published image, add a few documents, and export:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run -d --name chaoscypher \
  -p 80:80 \
  -p 443:443 \
  -v chaoscypher-data:/data \
  --add-host=host.docker.internal:host-gateway \
  ghcr.io/chaoscypherinc/chaoscypher:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also skip the app entirely. The last section of this post &lt;em&gt;writes&lt;/em&gt; a small &lt;code&gt;.ccx&lt;/code&gt; in about fifteen lines, and every snippet here runs against that file too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 — install the reader and open the file
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install ccx-format        &lt;span class="c"&gt;# import name: ccx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ccx-format&lt;/code&gt; is the Apache-2.0 reference reader and writer (&lt;a href="https://pypi.org/project/ccx-format/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;, &lt;a href="https://github.com/chaoscypherinc/ccx" rel="noopener noreferrer"&gt;source&lt;/a&gt;). Its only dependencies are &lt;code&gt;rdflib&lt;/code&gt; and &lt;code&gt;jsonschema&lt;/code&gt;. It does not import anything from Chaos Cypher.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ccx&lt;/span&gt;

&lt;span class="n"&gt;pkg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ccx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open_package&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"my-graph.ccx"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;validate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manifest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manifest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;package_version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manifest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;license&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a full Chaos Cypher export that prints something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;True ('core', 'sources', 'shapes')
chaoscypher/default 1.0.0 CC-BY-SA-4.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at &lt;code&gt;report.classes&lt;/code&gt; before you trust anything else. &lt;code&gt;core&lt;/code&gt; means the container, manifest, checksums and graphs all check out. &lt;code&gt;sources&lt;/code&gt; means every chunk's character offsets land inside the source text it points to, so the citations in Step 4 are real ranges in a real document. A package without &lt;code&gt;sources&lt;/code&gt; is still valid. It just has no passages for you to cite.&lt;/p&gt;

&lt;p&gt;There is a CLI as well, if you'd rather check a file before writing code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ccx inspect my-graph.ccx
ccx validate my-graph.ccx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name:    chaoscypher/default
version: 1.0.0 (ccx 3.0)
license: CC-BY-SA-4.0
graphs:  4
  - ccx.knowledge [default]  (knowledge.jsonld)
  - chaoscypher.templates  (graphs/chaoscypher.templates.jsonld)
  - chaoscypher.lenses  (graphs/chaoscypher.lenses.jsonld)
  - chaoscypher.statistics  (graphs/chaoscypher.statistics.jsonld)
assets:  3
VALID (core)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI's last line reports the base level only. Call &lt;code&gt;validate()&lt;/code&gt; from Python to get the full list of classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; one &lt;code&gt;pip install&lt;/code&gt;, one function call, and the file tells you whether it is intact and whether its citations hold up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — list the entities
&lt;/h2&gt;

&lt;p&gt;The knowledge lives in the package's &lt;strong&gt;default graph&lt;/strong&gt;, a JSON-LD document whose &lt;code&gt;@graph&lt;/code&gt; array holds one object per entity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;kg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;graph_documents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;members&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;kg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@graph"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;entities&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"ccx:Relationship"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;iri&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;'{node["@type"]:&amp;lt;14} {node["name"]}'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a small example package, built from two sentences about the Analytical Engine, the outputs from here on look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Person         Ada Lovelace
Person         Charles Babbage
Machine        Analytical Engine
Place          London
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each entity has an &lt;code&gt;@id&lt;/code&gt; (an IRI, such as &lt;code&gt;urn:ccx:chaoscypher:node/…&lt;/code&gt;), an &lt;code&gt;@type&lt;/code&gt; (the most specific type extraction assigned), a &lt;code&gt;name&lt;/code&gt;, and any properties it carries. The other graphs (&lt;code&gt;chaoscypher.templates&lt;/code&gt;, &lt;code&gt;chaoscypher.statistics&lt;/code&gt; and so on) belong to Chaos Cypher, under its own namespace. A generic reader can ignore them, and this one does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; every entity is a small JSON object with an ID, a type and a name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — list the relationships
&lt;/h2&gt;

&lt;p&gt;Relationships come in two shapes, and a reader has to handle both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;simple&lt;/strong&gt; relationship is a key on its subject entity whose value is a reference: &lt;code&gt;"worked with": {"@id": "urn:…"}&lt;/code&gt;. If the same predicate appears more than once, the value becomes a list.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;reified&lt;/strong&gt; relationship is a standalone object with &lt;code&gt;"@type": "ccx:Relationship"&lt;/code&gt; and &lt;code&gt;ccx:subject&lt;/code&gt; / &lt;code&gt;ccx:predicate&lt;/code&gt; / &lt;code&gt;ccx:object&lt;/code&gt;. The exporter uses this shape when a relationship carries its own properties or would otherwise collide with another key.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;refs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Yield the IRIs in a {"@id": ...} reference or a list of them."""&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;triples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"ccx:Relationship"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;triples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ccx:subject"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ccx:predicate"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ccx:object"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"cc:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ccx:"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;triples&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;refs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;iri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;iri&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;iri&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;entities&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;iri&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;triples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{name(s)} --{p}--&amp;gt; {name(o)}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ada Lovelace --worked with--&amp;gt; Charles Babbage
Charles Babbage --designed--&amp;gt; Analytical Engine
Analytical Engine --designed in--&amp;gt; London
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prefix filter skips JSON-LD keywords (&lt;code&gt;@id&lt;/code&gt;, &lt;code&gt;@type&lt;/code&gt;) and producer metadata such as &lt;code&gt;cc:template&lt;/code&gt;, which records the schema template an entity was filed under. It is not a relationship.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; a relationship is either a link stored on the entity or its own small record, and twenty lines turns both into &lt;code&gt;(subject, predicate, object)&lt;/code&gt; rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 — print the passages that cite each entity
&lt;/h2&gt;

&lt;p&gt;This is the part a plain graph export can't do. Alongside the graph, a package carries &lt;code&gt;sources.jsonl&lt;/code&gt;, with one record per source document and one per chunk. A source record points at the document's full text, stored as a content-addressed asset inside the package. A chunk record points into that text by character offset and lists the entities extracted from it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;records&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;texts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asset_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"ccx:Source"&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="s2"&gt;"text"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"ccx:Chunk"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"selector"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;passage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;texts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;sel&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;sel&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;sel&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;cite&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ccx:citation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;'{name(cite["ccx:citation"]["@id"])!r} &amp;lt;- "{passage.strip()}"'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight r"&gt;&lt;code&gt;&lt;span class="s1"&gt;'Ada Lovelace'&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="s2"&gt;"Ada Lovelace worked with Charles Babbage on the Analytical Engine."&lt;/span&gt;
&lt;span class="s1"&gt;'Charles Babbage'&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="s2"&gt;"Ada Lovelace worked with Charles Babbage on the Analytical Engine."&lt;/span&gt;
&lt;span class="s1"&gt;'Analytical Engine'&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="s2"&gt;"Babbage designed the Analytical Engine in London."&lt;/span&gt;
&lt;span class="s1"&gt;'London'&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="s2"&gt;"Babbage designed the Analytical Engine in London."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few details worth knowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A chunk carries either a &lt;code&gt;selector&lt;/code&gt; (offsets into the retained full text, which is what Chaos Cypher writes) or inline &lt;code&gt;content&lt;/code&gt;. The &lt;code&gt;else&lt;/code&gt; branch covers packages from other writers that use &lt;code&gt;content&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Each citation can also carry &lt;code&gt;ccx:confidence&lt;/code&gt; and &lt;code&gt;ccx:extractionMethod&lt;/code&gt;, so you can filter out low-confidence extractions before you trust them.&lt;/li&gt;
&lt;li&gt;Chaos Cypher exports also record which chunks justify each &lt;em&gt;relationship&lt;/em&gt;, under &lt;code&gt;cc:relationshipCitation&lt;/code&gt;. That key is producer-specific, so it is out of scope for a generic reader. The &lt;a href="https://chaoscypher.com/docs/reference/ccx-format" rel="noopener noreferrer"&gt;spec page&lt;/a&gt; has the fields if you want them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; for any entity in the file, you can print the exact sentence it came from, read out of the same file, with no server and no database involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 — hand it to the tools you already use
&lt;/h2&gt;

&lt;p&gt;Neither of these is needed to &lt;em&gt;read&lt;/em&gt; the package. They are where the data usually goes next:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install networkx pandas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;networkx&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;nx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;

&lt;span class="no"&gt;G&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;MultiDiGraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;iri&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="no"&gt;G&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;iri&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;triples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="no"&gt;G&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;predicate&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;G&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number_of_nodes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"nodes,"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;G&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number_of_edges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"edges"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;triples&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="n"&gt;columns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"subject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"predicate"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4 nodes, 3 edges
             subject    predicate             object
0       Ada Lovelace  worked with    Charles Babbage
1    Charles Babbage     designed  Analytical Engine
2  Analytical Engine  designed in             London
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From here it's ordinary graph and table work: centrality, shortest paths, &lt;code&gt;df.predicate.value_counts()&lt;/code&gt;, a join against your own data.&lt;/p&gt;

&lt;p&gt;If you prefer RDF, &lt;code&gt;pkg.dataset()&lt;/code&gt; returns an &lt;code&gt;rdflib.Dataset&lt;/code&gt; you can query with SPARQL. It has one gap. A simple relationship whose predicate is free text, like &lt;code&gt;worked with&lt;/code&gt;, has no IRI in the package's context, so it doesn't appear in the RDF projection. Reified relationships, names and types do. To get every relationship, read the JSON-LD as Step 3 does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; a few more lines turn the package into a networkx graph or a spreadsheet-shaped table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;Steps 1–5 above make one script of about forty-five lines. Paste the Python blocks into &lt;code&gt;read_ccx.py&lt;/code&gt; in order and run it against any &lt;code&gt;.ccx&lt;/code&gt; you have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install ccx-format networkx pandas
python read_ccx.py          &lt;span class="c"&gt;# opens my-graph.ccx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have no package to hand, the next section writes one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a tool that &lt;em&gt;writes&lt;/em&gt; &lt;code&gt;.ccx&lt;/code&gt; needs
&lt;/h2&gt;

&lt;p&gt;Reading is half of what makes a format open. The other half is a second program that &lt;em&gt;writes&lt;/em&gt; it. The same library has a builder, and a minimal package with one cited relationship looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ccx&lt;/span&gt;

&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ccx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PackageBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"me/papers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;package_version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0.1.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;license&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"CC-BY-4.0"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_graph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ccx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"knowledge"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@graph"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:ada"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Ada Lovelace"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="s2"&gt;"worked with"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:babbage"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:babbage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Charles Babbage"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:src/notes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ccx:Source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"notes.md"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="s2"&gt;"Ada Lovelace worked with Charles Babbage."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;source_mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"derived-only"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:src/notes#chunk-0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ccx:Chunk"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:src/notes"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"selector"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"TextPositionSelector"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;41&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"ccx:citation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"ccx:citation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"urn:me:ada"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"papers.ccx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"wb"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# build() validates; it raises on a non-conformant package&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That file validates as &lt;code&gt;core&lt;/code&gt; and &lt;code&gt;sources&lt;/code&gt;, and the reader script above prints its entity, its relationship, and the sentence that cites it. A writer of your own, in Python or any other language, needs to do the same things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A ZIP with a fixed first entry.&lt;/strong&gt; The archive starts with an uncompressed &lt;code&gt;mimetype&lt;/code&gt; entry containing &lt;code&gt;application/vnd.ccx+zip&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A manifest with two checksums per member.&lt;/strong&gt; Each graph and asset is listed with both a SHA-256 and a SHA-512 digest, base64-encoded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON-LD with no remote context.&lt;/strong&gt; The context ships inside the file. A reader must never need the network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sources as offsets, not copies.&lt;/strong&gt; Store the full text once as a content-addressed asset, and point chunks into it by character range. That's what lets a citation survive the trip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stable IRIs.&lt;/strong&gt; Mint identifiers once and keep them across exports, so an import updates in place instead of creating duplicates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Everything beyond that, such as templates, statistics, or your own namespaced graphs, is optional, and a generic reader skips what it doesn't understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; the builder does the bookkeeping for you, and the format is small enough to write from scratch in another language.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest framing
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;.ccx&lt;/code&gt; is an &lt;strong&gt;open, documented format&lt;/strong&gt; with one implementation. We wrote both the spec and the reader. It isn't a standard, and we won't call it one until something we didn't write reads or writes it. The spec is a draft revised in place, so check the revision line at the top of the &lt;a href="https://chaoscypher.com/docs/reference/ccx-format" rel="noopener noreferrer"&gt;spec page&lt;/a&gt; and pin the version you tested against (&lt;code&gt;ccx-format&amp;gt;=0.1,&amp;lt;0.2&lt;/code&gt; today).&lt;/p&gt;

&lt;p&gt;That is also the invitation. A LlamaIndex or LangChain loader, an exporter from your notes app, a validator in Rust or TypeScript: any of those, written by someone who isn't us, is what turns a documented format into a shared one. The &lt;a href="https://github.com/chaoscypherinc/ccx" rel="noopener noreferrer"&gt;reader's repository&lt;/a&gt; is the place to start, and questions and issues there are welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; the format is open and documented, the code above is all it takes to read it, and the next implementation could be yours.&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>selfhosted</category>
      <category>graphrag</category>
    </item>
    <item>
      <title>Chaos Cypher v0.7.2: Chat Searches by Tag, Plus Headers for OpenAI-Compatible Proxies</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:43:11 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/chaos-cypher-v072-chat-searches-by-tag-plus-headers-for-openai-compatible-proxies-289l</link>
      <guid>https://dev.to/chaoscypherinc/chaos-cypher-v072-chat-searches-by-tag-plus-headers-for-openai-compatible-proxies-289l</guid>
      <description>&lt;p&gt;Chaos Cypher v0.7.2 is out. It is a small release with two features. The chat assistant can now search by tag, under the same rule the MCP tools follow. The OpenAI provider can send extra HTTP headers, so an OpenAI-compatible proxy can route requests on them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax02jopz0ihmszz4b587.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax02jopz0ihmszz4b587.png" alt="Chat page with an AI answer listing the top-10 entities by PageRank and graph stats" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How the chat assistant uses tags, and why a tag it picks can only narrow a search&lt;/li&gt;
&lt;li&gt;One behavior change: a chat scoped to tags that match nothing is now refused&lt;/li&gt;
&lt;li&gt;How to send extra headers to an OpenAI-compatible proxy&lt;/li&gt;
&lt;li&gt;How to upgrade&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chat can search by tag
&lt;/h2&gt;

&lt;p&gt;v0.7.0 added document tags and let MCP clients, the CLI and the API search inside a tag set. In 0.7.2 the chat assistant gets the same option. Its two search tools, GraphRAG Search and Semantic Search, now take &lt;code&gt;tags&lt;/code&gt; and &lt;code&gt;match&lt;/code&gt; (&lt;code&gt;any&lt;/code&gt; or &lt;code&gt;all&lt;/code&gt;), with the same descriptions as the MCP tools, and the chat prompt tells the model they exist. Ask "what do my &lt;code&gt;harbour&lt;/code&gt; notes say about the lantern?" and the assistant can search only the documents carrying that tag.&lt;/p&gt;

&lt;p&gt;A tag the assistant picks only ever narrows the search:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No chat scope:&lt;/strong&gt; the search covers only the documents carrying the tags. GraphRAG Search then takes its graph only from those documents, as the MCP tool does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A scoped chat&lt;/strong&gt; (&lt;code&gt;chat --tag&lt;/code&gt;, &lt;code&gt;tag_ids&lt;/code&gt; or &lt;code&gt;source_ids&lt;/code&gt;): the search covers the documents that are in the chat's scope &lt;em&gt;and&lt;/em&gt; carry the tags. The chat's scope always applies, so a tag can never bring in a document from outside it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No match:&lt;/strong&gt; if no document in reach carries the tags, the search returns nothing. It never falls back to searching everything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A tag name the tag rule refuses comes back to the model as a tool error it can read. The details are in &lt;a href="https://chaoscypher.com/docs/user-guide/chat#tags-the-assistant-picks" rel="noopener noreferrer"&gt;Chat — Tags the Assistant Picks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In plain terms: you can ask the assistant about one tagged set of documents, and its searches stay inside that set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Behavior change: a tag scope that matches nothing is refused
&lt;/h2&gt;

&lt;p&gt;Before 0.7.2, creating a chat or changing its scope (&lt;code&gt;POST /api/v1/chats&lt;/code&gt;, &lt;code&gt;PATCH /api/v1/chats/{id}/scope&lt;/code&gt;) with &lt;code&gt;tag_ids&lt;/code&gt; that carried no document, and no &lt;code&gt;source_ids&lt;/code&gt;, gave you a chat that searched every document. It is now refused with a 400 error naming the problem, as &lt;code&gt;chaoscypher chat --tag&lt;/code&gt; already refused. A refused re-scope keeps the chat's current scope. See &lt;a href="https://chaoscypher.com/docs/user-guide/chat#combining-scopes" rel="noopener noreferrer"&gt;Chat — Combining Scopes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In plain terms: an empty tag scope used to mean "everything", and now it is an error you can see.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extra headers for the OpenAI provider
&lt;/h2&gt;

&lt;p&gt;If you point the OpenAI provider at an OpenAI-compatible proxy, the proxy may need a header to decide where a request goes, for example to keep it on a local model. The new setting &lt;code&gt;llm.openai_default_headers&lt;/code&gt; sends extra HTTP headers with every OpenAI chat, extraction and import-summary request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;llm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;openai_default_headers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;X-Example-Route&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;local&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the environment, give it as a JSON object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CHAOSCYPHER_LLM__OPENAI_DEFAULT_HEADERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'{"X-Example-Route": "local"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Empty, the default, sends nothing. Header values are masked like API keys in the Settings page, &lt;code&gt;chaoscypher config show&lt;/code&gt; and the diagnostic bundle, and they are never logged. Names must be plain HTTP tokens with no line breaks, and &lt;code&gt;Authorization&lt;/code&gt; is refused because the client sends it from the API key. OpenAI embeddings are configured separately and do not get these headers. See &lt;a href="https://chaoscypher.com/docs/getting-started/configuration#openai" rel="noopener noreferrer"&gt;Configuration — OpenAI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In plain terms: you can route Chaos Cypher's OpenAI calls through your own proxy, and the header values are treated as secrets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dependencies
&lt;/h2&gt;

&lt;p&gt;The Docker images build on Python 3.14.9 (was 3.14.8). The web interface's build tools clear three advisories: &lt;code&gt;minimatch&lt;/code&gt;, &lt;code&gt;glob&lt;/code&gt; and the docs site's &lt;code&gt;serialize-javascript&lt;/code&gt; move to fixed releases. They run only when the interface and docs are built, never in a running server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrading
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Before upgrading, let the queue go idle.&lt;/strong&gt; Stop new submissions and wait until &lt;code&gt;/api/v1/queue/stats&lt;/code&gt; reports 0 pending tasks on every queue, then swap the image. This release changes no queue payloads and adds no migrations. Draining first is still the safe default, because the worker cannot negotiate payload versions yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull ghcr.io/chaoscypherinc/chaoscypher:latest
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; chaoscypher-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The full notes are in the &lt;a href="https://chaoscypher.com/docs/about/changelog#v072-2026-11-06" rel="noopener noreferrer"&gt;changelog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;New to Chaos Cypher? &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;GraphRAG with Ollama in 10 Minutes&lt;/a&gt; runs the whole stack locally, so your documents and the graph built from them stay on your machine.&lt;/li&gt;
&lt;li&gt;Already tagging documents? Open a chat and ask about one tag. The assistant can search only the documents carrying it.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>selfhosted</category>
      <category>opensource</category>
      <category>ai</category>
      <category>llm</category>
    </item>
    <item>
      <title>Chaos Cypher v0.7: Tag Your Documents, Then Search Only Those</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 06 Nov 2026 14:44:32 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/chaos-cypher-v07-tag-your-documents-then-search-only-those-8ml</link>
      <guid>https://dev.to/chaoscypherinc/chaos-cypher-v07-tag-your-documents-then-search-only-those-8ml</guid>
      <description>&lt;p&gt;Once a knowledge base holds more than a few dozen documents, "search everything" stops being what you want. You want the answer from &lt;em&gt;these&lt;/em&gt; papers, &lt;em&gt;this&lt;/em&gt; client's files, &lt;em&gt;that&lt;/em&gt; project's notes, and you want to know the graph behind the answer came from those documents and nothing else.&lt;/p&gt;

&lt;p&gt;Chaos Cypher v0.7.0 adds that: document tags that follow one rule everywhere, search scoped to a tag set, and a one-line summary for every document you add. v0.7.1 followed a day later with fixes to the MCP tool schemas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tags, under one rule
&lt;/h2&gt;

&lt;p&gt;A tag is trimmed and lower-cased, then may use only &lt;code&gt;a-z&lt;/code&gt;, &lt;code&gt;0-9&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, &lt;code&gt;_&lt;/code&gt; and &lt;code&gt;-&lt;/code&gt;, must start with a letter or digit, and is at most 64 characters. A document carries at most 32.&lt;/p&gt;

&lt;p&gt;The same rule, with the same refusal text, holds in every place you can tag:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP:&lt;/strong&gt; &lt;code&gt;add_document&lt;/code&gt;, &lt;code&gt;add_site&lt;/code&gt;, and the new &lt;code&gt;tag_document&lt;/code&gt; tool, which adds, removes or replaces a document's tags and answers with its tags after.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST API:&lt;/strong&gt; &lt;code&gt;tags&lt;/code&gt; on uploads, batch and URL import, and &lt;code&gt;PATCH /api/v1/sources/{id}/tags&lt;/code&gt; to add, remove or replace by name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI:&lt;/strong&gt; &lt;code&gt;--tag&lt;/code&gt; on &lt;code&gt;source add&lt;/code&gt;, and the new &lt;code&gt;chaoscypher source tag&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Packages:&lt;/strong&gt; a package's &lt;code&gt;keywords&lt;/code&gt; become tags on import (a keyword the rule refuses is skipped with a warning).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A site's tags reach every page, including pages a later refresh finds.&lt;/p&gt;

&lt;p&gt;In plain terms: you label documents once, the same way from any tool, and the labels stick.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search inside a tag set
&lt;/h2&gt;

&lt;p&gt;MCP &lt;code&gt;search_chunks&lt;/code&gt; and &lt;code&gt;graphrag_search&lt;/code&gt;, &lt;code&gt;chaoscypher source search&lt;/code&gt; and &lt;code&gt;GET /api/v1/sources&lt;/code&gt; take &lt;code&gt;tags&lt;/code&gt; and &lt;code&gt;match&lt;/code&gt; (&lt;code&gt;any&lt;/code&gt; or &lt;code&gt;all&lt;/code&gt;). The web UI's sources list gets a tag filter with the same any/all choice.&lt;/p&gt;

&lt;p&gt;Two details matter more than they look:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The filter runs inside the search, before the result limit.&lt;/strong&gt; A scoped search returns a full page of results, not the scraps left after filtering an unscoped one. A tag set no document carries returns nothing; it never falls back to searching everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In MCP &lt;code&gt;graphrag_search&lt;/code&gt;, the graph under a tag scope comes only from the tagged documents&lt;/strong&gt; — seeds, neighbours and relationships alike. An entity you made by hand, one no document backs, or a relationship that only an untagged document states is left out.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also fixes &lt;code&gt;search_chunks&lt;/code&gt; with a source scope coming back short: it used to search everything and drop other documents' chunks afterwards. Every chunk in those replies now carries &lt;code&gt;source_title&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In plain terms: when you ask about a set of documents, the answer and the graph behind it come from that set, and you can see which document each piece came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  One-line summaries
&lt;/h2&gt;

&lt;p&gt;When a model is configured, each document you add gets a one-line summary written by that model once it is indexed: one call, limited to 60 seconds, never retried, and no placeholder text when it fails. Turn it off with &lt;code&gt;source_processing.import_summaries: false&lt;/code&gt;. For documents added earlier, &lt;code&gt;chaoscypher source summarize --missing&lt;/code&gt; fills in the gaps.&lt;/p&gt;

&lt;p&gt;You can also type a summary yourself (&lt;code&gt;--summary&lt;/code&gt;, the &lt;code&gt;summary&lt;/code&gt; field, or MCP &lt;code&gt;summary&lt;/code&gt;), up to 300 characters. Summaries show in the sources list, &lt;code&gt;source list&lt;/code&gt;, the new MCP &lt;code&gt;list_documents&lt;/code&gt; tool and the API's source responses, and travel in packages as &lt;code&gt;abstract&lt;/code&gt;. Package import and &lt;code&gt;compose build&lt;/code&gt; never call a model.&lt;/p&gt;

&lt;p&gt;In plain terms: every document gets a sentence saying what it is, so an assistant listing your documents can pick the right ones without opening each.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two new MCP tools (46 in all)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tag_document&lt;/code&gt;&lt;/strong&gt; — add, remove or replace a document's tags, and optionally set its summary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;list_documents&lt;/code&gt;&lt;/strong&gt; — documents newest first, with title, summary, tags and date added, filtered by tags and paged, without calling a model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://chaoscypher.com/docs/user-guide/mcp#documents-tags-and-summaries" rel="noopener noreferrer"&gt;MCP guide&lt;/a&gt; has the details, and &lt;a href="https://chaoscypher.com/docs/user-guide/sources#tags" rel="noopener noreferrer"&gt;Sources — Tags&lt;/a&gt; and &lt;a href="https://chaoscypher.com/docs/user-guide/sources#summaries" rel="noopener noreferrer"&gt;Sources — Summaries&lt;/a&gt; cover the rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  v0.7.1: MCP schemas that match the code
&lt;/h2&gt;

&lt;p&gt;v0.7.0 checks a tool's arguments against its advertised schema before the tool runs. That exposed &lt;code&gt;create_template&lt;/code&gt;, whose schema listed only six property types, so &lt;code&gt;datetime&lt;/code&gt;, &lt;code&gt;integer&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt;, &lt;code&gt;json&lt;/code&gt;, &lt;code&gt;node_reference&lt;/code&gt; and &lt;code&gt;node_reference_list&lt;/code&gt; were refused. v0.7.1 lists every property type, describes each property the way templates store it, and builds the enums in the MCP and workflow tool schemas from the same definitions the code uses, so they cannot fall behind again. &lt;code&gt;confirm_extraction&lt;/code&gt; now lists its six filtering presets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrading
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull ghcr.io/chaoscypherinc/chaoscypher:latest
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; chaoscypher-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read this before you swap the image:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Let the queue go idle first.&lt;/strong&gt; Stop new submissions and wait until &lt;code&gt;/api/v1/queue/stats&lt;/code&gt; reports 0 pending tasks on every queue. The worker cannot negotiate payload versions yet, so draining first is the safe default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migration 0026 renames tags to fit the rule, and may ask first.&lt;/strong&gt; Existing tags are lower-cased and every run of other characters becomes one &lt;code&gt;-&lt;/code&gt; (&lt;code&gt;Work Docs&lt;/code&gt; → &lt;code&gt;work-docs&lt;/code&gt;); tags that then share a name are merged into the oldest. When it would change any tag, 0026 waits and lists every rename and merge — on the upgrade page, in &lt;code&gt;chaoscypher db migrate status&lt;/code&gt; and in MCP &lt;code&gt;upgrade_status&lt;/code&gt; — until you apply it. Renames and merges are not reversed on downgrade. An automatic backup of the database is taken before it applies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;chaoscypher upgrade&lt;/code&gt; asks before a data-changing or held migration.&lt;/strong&gt; Scripts pass &lt;code&gt;--yes&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composed databases:&lt;/strong&gt; a &lt;code&gt;compose build --no-clean&lt;/code&gt; onto a pre-0.7 build whose tags don't fit the rule stops until 0026 is confirmed on the composed database (&lt;code&gt;chaoscypher compose run chaoscypher db migrate apply&lt;/code&gt;). A clean build, the default, is unaffected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full list, including the API's new &lt;code&gt;422&lt;/code&gt;/&lt;code&gt;409&lt;/code&gt; answers for tag names, is in the &lt;a href="https://chaoscypher.com/docs/about/changelog#v070-2026-11-05" rel="noopener noreferrer"&gt;changelog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;New to Chaos Cypher? The &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;ten-minute quickstart&lt;/a&gt; runs it locally with Ollama: your documents and the graph built from them stay on your machine. Add a few documents with &lt;code&gt;--tag&lt;/code&gt;, then ask your assistant to search just that tag.&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>opensource</category>
      <category>mcp</category>
      <category>ai</category>
    </item>
    <item>
      <title>Which Local Model Should Build Your Knowledge Graph? A Reproducible Leaderboard</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 06 Nov 2026 14:43:51 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/which-local-model-should-build-your-knowledge-graph-a-reproducible-leaderboard-5gml</link>
      <guid>https://dev.to/chaoscypherinc/which-local-model-should-build-your-knowledge-graph-a-reproducible-leaderboard-5gml</guid>
      <description>&lt;p&gt;Most local-model leaderboards score chat. A knowledge graph hands a model a different job first: read a passage, name the entities and relationships in a strict format, and point at the sentence that proves each one. Then, later, answer a question from what was extracted without inventing anything. Models rank differently on those two jobs, and a model that chats well can still build a messy graph.&lt;/p&gt;

&lt;p&gt;So the &lt;a href="https://chaoscypher.com/leaderboard" rel="noopener noreferrer"&gt;leaderboard&lt;/a&gt; scores both, for 22 local models pulled from Ollama, with checks you can read and a command that produces the board.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is being measured
&lt;/h2&gt;

&lt;p&gt;The board has two columns of work and one blend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extraction: does the model do what the extraction prompt says?&lt;/strong&gt; Each probe is a short hand-written passage plus one instruction under test, run through the real extraction prompts and parser. Pure-function checks decide pass or fail; there is no judge model. The instructions cover the output format, evidence discipline (cite the right sentence, use no outside knowledge), entity discipline (names, not roles) and relationship discipline. There are 65 of them in isolation, and then 39 spliced into real extraction-sized passages of &lt;em&gt;War and Peace&lt;/em&gt; ("in chunks"), because a model that follows an instruction in a tidy passage does not always follow it in real text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chat: does the model answer from the graph?&lt;/strong&gt; Every model answers the same questions about Book One of &lt;em&gt;War and Peace&lt;/em&gt;, from the same reference graph and the same retrieved context, so the only thing that changes between rows is the chat model. An answer passes only if it names what was asked, names nothing the context does not hold, and declines when the book does not answer the question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overall&lt;/strong&gt; blends the two: 0.6 of extraction plus 0.4 of chat, with in-chunks extraction counted twice and isolated once, since in chunks is the number that carries over to your documents. Extraction runs with thinking off, chat with thinking on, both at temperature zero with a fixed seed.&lt;/p&gt;

&lt;p&gt;In plain English: one column asks "can this model build a clean graph?", the other asks "can it answer from one without making things up?", and Overall weighs the first a bit more.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to read the board
&lt;/h2&gt;

&lt;p&gt;Three things on the page matter more than the rank.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every score carries a 90% interval&lt;/strong&gt;, shown as ± beside it. It comes from resampling the row's tasks 2,000 times, and it says how far the score could move if the suite had drawn other tasks of the same kind. Sorted by Overall, a ≈ marks a row the board cannot tell apart from the one above it, and plenty of neighbouring rows are ties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flags beat ranks.&lt;/strong&gt; A row is flagged when answers were cut off at the output limit, when the runaway-repetition detector stopped the model, or when it thought anyway after being told not to. A flagged row is scored on what it actually produced, so its number is real, but the flag tells you why it is low.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"No tools" means no chat in the app.&lt;/strong&gt; The app's chat loop always passes tools to the model, so a model whose Ollama manifest lacks tool calling can score here but cannot be your chat model. The board marks it.&lt;/p&gt;

&lt;p&gt;In plain English: read the ± and the flags first; two rows whose ranges overlap are a coin toss, and a flag explains a low score before you blame the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the board says
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Extraction is where models differ.&lt;/strong&gt; The chat column is bunched; the extraction column spreads wide. If you are choosing a model to build the graph, that is the column to sort by.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Size is a weak predictor.&lt;/strong&gt; Gemma 4 12B sits among models that need far more GPU memory, and several 30B-class models sit near the bottom because their in-chunks extraction falls apart. Following a strict output format and keeping sentence references straight is a training property more than a size property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the flags before the rank.&lt;/strong&gt; GPT-OSS 20B and DeepSeek-R1 14B both thought despite the thinking-off setting, so their answers spend the output budget on reasoning before they reach the entities, and many of GPT-OSS 20B's are cut off. Llama 3.1 8B and GLM 4.7 Flash hit the output limit on many probes. Their rows are honest about what they produced, and not comparable to rows that finished cleanly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The model at the top also builds the chat column's graph.&lt;/strong&gt; Gemma 4 31B leads by Overall, with no flag on either extraction suite, and it is the model that built the reference graph every chat row answers from.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A few Claude rows appear for reference.&lt;/strong&gt; They ran through Claude Code against the same probes and checks, on extraction only, with the client's own settings instead of our pins and part of the in-chunks suite. The page marks them, and they are not a like-for-like comparison with the pinned local rows.&lt;/p&gt;

&lt;p&gt;In plain English: pick the extraction model by the extraction column and its flags, not by parameter count, and treat the top handful as a cluster rather than a podium.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the graph matters
&lt;/h2&gt;

&lt;p&gt;The same page carries a second section: the same questions answered three ways by every model, with plain vector RAG (LlamaIndex's standard tutorial pipeline), hybrid keyword + vector search, and graph + vector retrieval. That section states a headline only when it holds across the models measured. It has its &lt;a href="https://chaoscypher.com/docs/reference/extraction-benchmark#where-the-graph-matters-the-three-rung-retrieval-comparison" rel="noopener noreferrer"&gt;own write-up on the methods page&lt;/a&gt;, with the bars each headline has to clear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;chaoscypher-cli
chaoscypher setup        &lt;span class="c"&gt;# once: pick Ollama as the provider&lt;/span&gt;
chaoscypher benchmark run probes &lt;span class="nt"&gt;--local-only&lt;/span&gt;
chaoscypher benchmark run chat-probes &lt;span class="nt"&gt;--local-only&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;benchmark&lt;/code&gt; needs a configured provider, so a fresh install asks you to run &lt;code&gt;chaoscypher setup&lt;/code&gt; first; that is the second line. &lt;code&gt;probes&lt;/code&gt; produces the extraction columns and &lt;code&gt;chat-probes&lt;/code&gt; the chat column; &lt;code&gt;--local-only&lt;/code&gt; runs the local models in each config and skips the hosted ones. Pull the models you want first (&lt;code&gt;ollama pull gemma4:12b&lt;/code&gt;, and so on). &lt;code&gt;--estimate&lt;/code&gt; prints the call count before you commit an evening to it, &lt;code&gt;--model-timeout&lt;/code&gt; caps a hung model and moves on, and &lt;code&gt;chaoscypher benchmark list&lt;/code&gt; prints every config and dataset.&lt;/p&gt;

&lt;p&gt;Results land as a JSON file plus a rendered Markdown table in your data directory; &lt;code&gt;chaoscypher benchmark show &amp;lt;results.json&amp;gt;&lt;/code&gt; re-renders one later. To score your own documents, add a dataset folder next to the built-in ones; the &lt;a href="https://chaoscypher.com/docs/reference/extraction-benchmark" rel="noopener noreferrer"&gt;methodology page&lt;/a&gt; shows the layout.&lt;/p&gt;

&lt;p&gt;Your numbers will not match ours to the decimal: Ollama versions, quantizations and the release you install move them. The clusters should hold. If they do not, that is worth a GitHub issue, because it means one of us has a different model than we think.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this benchmark is not
&lt;/h2&gt;

&lt;p&gt;It is not a model-intrinsic benchmark: it scores each model together with ChaosCypher's prompts and pipeline, which is the pragmatic point, and those live in the repository as part of the method. It is local models on one novel for the chat column. And it tells you which models to shortlist, not which one to marry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The full methodology, including every check and why, is in the &lt;a href="https://chaoscypher.com/docs/reference/extraction-benchmark" rel="noopener noreferrer"&gt;benchmark reference&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;ten-minute quickstart&lt;/a&gt; gets one of these models extracting your own documents.&lt;/li&gt;
&lt;li&gt;If you run the board on models we did not, open a discussion with your results file. We fold reproductions into the next round.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ollama</category>
      <category>graphrag</category>
      <category>selfhosted</category>
      <category>ai</category>
    </item>
    <item>
      <title>Chaos Cypher v0.6.0: Memory for Agents That Says Who Said It</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 30 Oct 2026 15:21:11 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/chaos-cypher-v060-memory-for-agents-that-says-who-said-it-1jod</link>
      <guid>https://dev.to/chaoscypherinc/chaos-cypher-v060-memory-for-agents-that-says-who-said-it-1jod</guid>
      <description>&lt;p&gt;An agent that works with you for a week learns a lot, and almost all of it is gone the next time it starts. The usual fixes are a notes file it rereads or a vector store it searches, and neither can tell you who said a thing, when, or what it replaced.&lt;/p&gt;

&lt;p&gt;Chaos Cypher v0.6.0 is the agent-memory release. It has three themes: memory for agents, retrieval that reads the question, and sources you can keep current. It also carries breaking changes for MCP clients, custom domain plugins and databases from before the core entity types, so if you run any of those, read the upgrade notes before you pull the image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory for agents
&lt;/h2&gt;

&lt;p&gt;Five new MCP tools let an agent hand Chaos Cypher a sentence or a note in plain words and get it back later as facts with where they came from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;remember&lt;/code&gt;&lt;/strong&gt; stores the text as a source of type &lt;code&gt;memory&lt;/code&gt;. It is kept whole and searchable at once, and its facts are extracted against the entities the graph already knows, so a later "Pierre" lands on the same Pierre node. A text that looks like a key or a password is refused and nothing is stored.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;recall&lt;/code&gt;&lt;/strong&gt; answers in the shape of the question — an entity card, a grouped list, a relation chain, or a digest — with every fact tagged &lt;code&gt;[who DATE]&lt;/code&gt;, &lt;code&gt;[doc TITLE]&lt;/code&gt; or &lt;code&gt;[pack NAME]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;forget&lt;/code&gt;&lt;/strong&gt; previews the matches first, then removes one memory and the facts only it stated, and leaves an audit row with the counts — never the text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;list_memories&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;digest&lt;/code&gt;&lt;/strong&gt; show what is stored and what a window of time added, replaced and forgot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A later memory on a single-valued relation (where someone lives) replaces the earlier fact and keeps it as history, and &lt;code&gt;recall(as_of=…)&lt;/code&gt; shows the facts as they stood on a date.&lt;/p&gt;

&lt;p&gt;Three things make this practical on a small local setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No embedding model required.&lt;/strong&gt; With &lt;code&gt;search.enable_vector_search: false&lt;/code&gt;, the CLI, the Python API and &lt;code&gt;chaoscypher mcp&lt;/code&gt; make no embedding call; search answers with keyword results and every memory tool works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Several agents, one database.&lt;/strong&gt; One &lt;code&gt;chaoscypher mcp -m write&lt;/code&gt; per agent can share a database on the same machine and a local disk. No write is lost; a write that cannot get the lock in 60 seconds answers one fixed "database is busy" line instead of hanging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing is dropped when linking is slow.&lt;/strong&gt; &lt;code&gt;remember&lt;/code&gt; stores the memory before it links it into the graph; if the model does not answer in time, the memory is kept as a note, says why, and links later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;chaoscypher mcp --profile memory&lt;/code&gt; serves only these five tools, which keeps a small model's tool list short, and &lt;code&gt;chaoscypher memory export&lt;/code&gt; writes memories to a &lt;code&gt;.ccx&lt;/code&gt; package another database can load. The &lt;a href="https://chaoscypher.com/docs/user-guide/memory" rel="noopener noreferrer"&gt;Memory guide&lt;/a&gt; walks through it.&lt;/p&gt;

&lt;p&gt;In plain terms: your agent can now keep what it learns between sessions, and every fact it recalls tells you who said it and when.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieval that reads the question
&lt;/h2&gt;

&lt;p&gt;Before chat builds its graph context, it now decides what kind of question it was asked: a lookup, an aggregate (everything sharing a relation with a named entity), a path (how two named things are connected) or a global question. An aggregate gets the entity's relationships grouped by label, each with the sentence that states it; a path gets the shortest relation chains between the two entities, each hop with its sentence. The default router uses rules, with no extra model call.&lt;/p&gt;

&lt;p&gt;The graph is also handed to the model in a tighter shape (40 triples instead of 200 by default), an identity resolver merges one entity written under two names after every commit, and hybrid search gains a real keyword half: chunks now have a full-text index.&lt;/p&gt;

&lt;p&gt;In plain terms: chat looks for the kind of evidence your question needs, and shows the model the sentences behind it rather than a wall of triples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources you can keep current
&lt;/h2&gt;

&lt;p&gt;Paste a documentation site's address and each of its pages is imported as its own source under one site, found through the site's &lt;code&gt;llms.txt&lt;/code&gt;, its sitemaps, or a three-link-deep crawl that never leaves the address you gave. &lt;strong&gt;Check for updates&lt;/strong&gt; re-fetches every page: unchanged pages are left alone, changed ones re-imported in place, new ones added, and a page the site no longer lists is marked &lt;strong&gt;Gone from site&lt;/strong&gt;, never deleted. Pages you left out stay out. The crawler sends its own user agent and honours &lt;code&gt;robots.txt&lt;/code&gt;. See &lt;a href="https://chaoscypher.com/docs/user-guide/site-import" rel="noopener noreferrer"&gt;Import a Docs Site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In plain terms: a docs site becomes one source you can refresh, and your citations keep pointing at the page they came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Also in this release
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nothing that says something is deleted by a filter.&lt;/strong&gt; Entities and relationships the extraction filters used to drop are now kept with a flag (&lt;code&gt;unevidenced&lt;/code&gt;, &lt;code&gt;low_plausibility&lt;/code&gt;) when they carry a description or evidence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pinned decoding by default:&lt;/strong&gt; temperature 0 and seed 42 for chat and extraction, so re-imports and retries give the same output for the same input (only Ollama honours the seed). Regenerate still gives a different answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; the PyPI packages carry PEP 740 attestations, chat runs only the tools it offered the model, and a failed MCP tool call answers a fixed sentence and a code, never the error's own text.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Upgrading
&lt;/h2&gt;

&lt;p&gt;Upgrade with the published image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull ghcr.io/chaoscypherinc/chaoscypher:0.6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or &lt;code&gt;pip install -U chaoscypher-cli&lt;/code&gt;. Before you swap the image, drain the queue (wait for &lt;code&gt;/api/v1/queue/stats&lt;/code&gt; to report 0 pending). Eighteen migrations run on first start, six of them &lt;code&gt;needs_confirmation&lt;/code&gt;. Read &lt;strong&gt;Breaking changes&lt;/strong&gt; and &lt;strong&gt;Upgrade advisory&lt;/strong&gt; in the &lt;a href="https://chaoscypher.com/docs/about/changelog#v060-2026-10-27" rel="noopener noreferrer"&gt;v0.6.0 changelog&lt;/a&gt; first if you run custom domain plugins, MCP clients that match error strings, API clients that threshold the hybrid search &lt;code&gt;score&lt;/code&gt;, or a database extracted before the core entity types — that last one is not migrated in place: export with v0.5.0, upgrade, then import.&lt;/p&gt;

&lt;p&gt;New here? The &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;ten-minute quickstart&lt;/a&gt; runs the whole stack locally with Ollama, and nothing leaves your machine unless you choose.&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>opensource</category>
      <category>ai</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Build It Once, Mount It Anywhere: One Knowledge Package, Any MCP Client</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 30 Oct 2026 15:17:52 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/build-it-once-mount-it-anywhere-one-knowledge-package-any-mcp-client-26hb</link>
      <guid>https://dev.to/chaoscypherinc/build-it-once-mount-it-anywhere-one-knowledge-package-any-mcp-client-26hb</guid>
      <description>&lt;p&gt;The local AI stack has a runtime, a model format, a model hub, and an agent protocol. It does not yet have a portable knowledge layer. The graph you spent an afternoon building is trapped in whichever app built it, and the assistant you actually work in cannot see it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;chaoscypher mount&lt;/code&gt; is the smallest thing we could ship that fixes that. One command pulls a knowledge package, imports it into a database of its own, indexes it, and serves it over MCP. Put that command in an assistant's config and the assistant has the knowledge every time it launches.&lt;/p&gt;

&lt;p&gt;This post builds a package on one machine, moves it to another, and mounts the same file into two different assistants, with the same command ready for any other MCP client. Nothing about the package changes between them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Build
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A knowledge graph extracted from a set of documents, exported as a single &lt;code&gt;.ccx&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;That file mounted into Claude Desktop and Claude Code on a second machine&lt;/li&gt;
&lt;li&gt;The same multi-hop question answered by both, each citing from the same evidence base&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The package format is &lt;a href="https://chaoscypher.com/docs/reference/ccx-format" rel="noopener noreferrer"&gt;CCX&lt;/a&gt;, an open, documented format with a standalone reader. What travels is the graph, the source text, the chunks, and the citations. What does not travel is any dependency on the machine that built it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Build the graph, then export it
&lt;/h2&gt;

&lt;p&gt;On the build machine, run Chaos Cypher and add your documents. The &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;ten-minute quickstart&lt;/a&gt; covers this with Ollama; the &lt;a href="https://chaoscypher.com/blog/claude-builds-its-own-knowledge-graph" rel="noopener noreferrer"&gt;previous post&lt;/a&gt; does it with Claude doing the extraction. Either way you end up with a graph in a database.&lt;/p&gt;

&lt;p&gt;Export it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chaoscypher graph package &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; research.ccx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default export carries everything a mount needs: templates, entities, relationships, sources, chunks, and citations. The archive is deterministic and checksummed, so the same graph produces the same bytes and a tampered file fails validation on the other side.&lt;/p&gt;

&lt;p&gt;Copy &lt;code&gt;research.ccx&lt;/code&gt; to the second machine however you like, or publish it to the &lt;a href="https://chaoscypher.com/docs/lexicon-hub" rel="noopener noreferrer"&gt;Lexicon Hub&lt;/a&gt; with &lt;code&gt;chaoscypher push research.ccx&lt;/code&gt; and pull it by name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Mount it
&lt;/h2&gt;

&lt;p&gt;On the second machine, install the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;chaoscypher-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then mount the package once, without serving, to see what it does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chaoscypher mount ./research.ccx &lt;span class="nt"&gt;--no-serve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the real output for a package built from fourteen of Chaos Cypher's own architecture pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Importing: archdocs.ccx
✓ Mounted ./archdocs.ccx → database archdocs: 177 entities, 205 relationships, 14 sources, 178 citations
Indexing for search with the local embedding model (Qwen/Qwen3-Embedding-0.6B); the first use downloads it.
✓ Indexed 14 sources and 177 nodes for search

Serve it with: chaoscypher mcp --database archdocs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things happened. The package went into a database named after it, so it does not mix with anything else on the machine. The sources and citations came along, not just the entities, which is what keeps answers traceable. And a &lt;code&gt;mount.json&lt;/code&gt; marker was written with the package's SHA-256, so the next mount of the same file skips the import.&lt;/p&gt;

&lt;p&gt;That last point is the whole design. An MCP host runs its server command on every launch. &lt;code&gt;mount&lt;/code&gt; is safe to run on every launch.&lt;/p&gt;

&lt;p&gt;There is no &lt;code&gt;chaoscypher setup&lt;/code&gt; in this step either. Mounting needs no chat or extraction model; the assistant's own model asks the questions. With vector search on (the default) the mount is indexed for semantic search with the configured embedding model (by default a local one, downloaded on first use); if vector search is off, it is keyword-searchable only.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Mount it into your assistants
&lt;/h2&gt;

&lt;p&gt;The command is the same each time. Only the config file changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Desktop&lt;/strong&gt; (&lt;code&gt;claude_desktop_config.json&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"research"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"chaoscypher"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mount"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/home/me/research.ccx"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Claude Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add research &lt;span class="nt"&gt;--&lt;/span&gt; chaoscypher mount /home/me/research.ccx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Any other MCP client.&lt;/strong&gt; The &lt;a href="https://chaoscypher.com/docs/user-guide/mcp" rel="noopener noreferrer"&gt;MCP user guide&lt;/a&gt; has the Cursor configuration alongside Claude's; for any client that launches a stdio MCP server, point its server list at the same &lt;code&gt;chaoscypher mount&lt;/code&gt; command. The knowledge on the other end is identical.&lt;/p&gt;

&lt;p&gt;If the package came from the Hub, replace the path with the reference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mount"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"acme/research"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Ask both the same question
&lt;/h2&gt;

&lt;p&gt;Pick a question that needs two hops, so the graph has something to do:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which components depend on the queue client, and which ADR governs changing it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each assistant calls &lt;code&gt;graphrag_search&lt;/code&gt;. The tool embeds the question, seeds a Personalized PageRank walk from the closest entities, and fuses two evidence lists: the chunks the top entities were cited from, and the chunks a hybrid keyword-and-vector search would return. The response carries the graph context and the chunks with aliases the assistant uses for inline citations.&lt;/p&gt;

&lt;p&gt;Because the citations traveled inside the package, every assistant cites from the same sources and chunks the graph was built from. Each host's model picks which chunks to cite; the evidence it picks from is identical. Two assistants, one set of receipts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; you built the knowledge once. Every assistant that mounts it gets the same facts and the same evidence, without re-reading a single document.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a mount and not an import
&lt;/h2&gt;

&lt;p&gt;Chaos Cypher already had &lt;code&gt;chaoscypher graph package load&lt;/code&gt;, which merges a package into the database you are working in. That is the right tool when you want the knowledge in &lt;em&gt;your&lt;/em&gt; graph, alongside everything else you have built.&lt;/p&gt;

&lt;p&gt;A mount is different in two ways. It goes into its own database, so it cannot collide with your work and can be thrown away with &lt;code&gt;chaoscypher db delete&lt;/code&gt;. And it is idempotent, so it belongs in a config file rather than a runbook.&lt;/p&gt;

&lt;p&gt;The metaphor is deliberate. You mount a volume; you do not copy its contents into your home directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do yet
&lt;/h2&gt;

&lt;p&gt;A mount is read-only by default. Pass &lt;code&gt;--mode write&lt;/code&gt; if you want the assistant to be able to add to the mounted database, but the package on disk does not change when it does. There is no &lt;code&gt;unmount&lt;/code&gt; command; deleting the database is the unmount. And the default export leaves embedding vectors out, so with vector search on, the mounting machine re-embeds the package with whatever embedding model is configured there; that happens once, on the first launch, and takes a moment. With vector search off, nothing is embedded and the mount is keyword-only. Pass &lt;code&gt;--embeddings&lt;/code&gt; at export time if both machines use the same model and you want to skip it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="https://chaoscypher.com/docs/reference/cli/mount" rel="noopener noreferrer"&gt;Mount command reference&lt;/a&gt; lists every option and the mount-versus-load comparison.&lt;/li&gt;
&lt;li&gt;Packages compose. An &lt;code&gt;axiomatize.yaml&lt;/code&gt; can merge several packages into one served database with &lt;code&gt;chaoscypher compose&lt;/code&gt;. That is a post of its own.&lt;/li&gt;
&lt;li&gt;If you publish a package to the Hub, the same &lt;code&gt;mount&lt;/code&gt; line works for everyone who pulls it.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>graphrag</category>
      <category>mcp</category>
      <category>selfhosted</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GraphRAG with Ollama in 10 Minutes: The Local-First Quickstart</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Mon, 28 Sep 2026 14:50:48 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/graphrag-with-ollama-in-10-minutes-the-local-first-quickstart-48h5</link>
      <guid>https://dev.to/chaoscypherinc/graphrag-with-ollama-in-10-minutes-the-local-first-quickstart-48h5</guid>
      <description>&lt;p&gt;You don't need a cloud API key to try GraphRAG. Ten minutes, one document, and a laptop with a decent GPU (or none at all, for the first few steps) is enough to see a full knowledge graph form and answer a question with a citation you can click through to the source page.&lt;/p&gt;

&lt;p&gt;This is the fast version. If you want the reasoning behind running everything locally -- privacy, VRAM presets, multi-GPU load balancing -- that's in &lt;a href="https://chaoscypher.com/blog/local-ai-knowledge-graph" rel="noopener noreferrer"&gt;Build a Private AI Knowledge Graph That Never Leaves Your Machine&lt;/a&gt;. This post is the "just show me" version: install, upload, watch the graph build, ask a question, done.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Build
&lt;/h2&gt;

&lt;p&gt;By the end of this walkthrough you'll have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chaos Cypher running locally via Docker&lt;/li&gt;
&lt;li&gt;A local LLM (Ollama) doing the entity extraction and chat&lt;/li&gt;
&lt;li&gt;One document imported, chunked, and embedded&lt;/li&gt;
&lt;li&gt;A knowledge graph of entities and relationships extracted from that document&lt;/li&gt;
&lt;li&gt;A chat answer with a citation that traces back to the exact chunk it came from&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing leaves your machine. No OpenAI key, no Anthropic key, no usage bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install Ollama and Start the Model Download
&lt;/h2&gt;

&lt;p&gt;Grab Ollama from &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;ollama.com&lt;/a&gt; for your platform, then pull the default chat/extraction model in a terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull qwen3:30b-instruct
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the long pole of the whole setup -- roughly 18-20 GB. Kick it off now and let it run in the background while you do the next steps; indexing and search don't need it, only extraction and chat do.&lt;/p&gt;

&lt;p&gt;If you're on a smaller GPU or just want to see the pipeline move faster for this first run, point &lt;code&gt;ollama_chat_model&lt;/code&gt; at a smaller &lt;code&gt;qwen3&lt;/code&gt; tag instead -- you can always switch to the full model afterward from Settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Start Chaos Cypher
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; chaoscypher &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 80:80 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 443:443 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; chaoscypher-data:/data &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/chaoscypherinc/chaoscypher:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Linux Docker Engine (not Docker Desktop), add &lt;code&gt;--add-host=host.docker.internal:host-gateway&lt;/code&gt; so the container can reach Ollama on your host -- Docker Desktop resolves this automatically.&lt;/p&gt;

&lt;p&gt;Open &lt;a href="http://localhost" rel="noopener noreferrer"&gt;http://localhost&lt;/a&gt;. A startup page shows each service (Nginx, Cortex, Valkey, Neuron) coming online -- usually 30-60 seconds. Set a username and password on first run, and you land on the Dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Upload a Document
&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Sources&lt;/strong&gt; in the sidebar and drag in a PDF, DOCX, or text file -- a 10-20 page document is a good first run so you can watch the whole pipeline complete in a couple of minutes.&lt;/p&gt;

&lt;p&gt;Indexing starts immediately (chunking + embedding for search) and finishes in about 30 seconds per 100 pages -- this step downloads a small embedding model (~600 MB) the first time, but doesn't need Ollama at all. Once indexing finishes, a &lt;strong&gt;Review&lt;/strong&gt; dialog proposes an extraction domain (technical, medical, legal, and so on) detected from the content. Click &lt;strong&gt;Confirm&lt;/strong&gt; to queue entity extraction.&lt;/p&gt;

&lt;p&gt;If the Ollama model pull from Step 1 is still running, the source will sit at &lt;strong&gt;extracting&lt;/strong&gt; until it finishes -- indexing and search still work while you wait.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Watch the Graph Form
&lt;/h2&gt;

&lt;p&gt;Once extraction commits, open &lt;strong&gt;Graph&lt;/strong&gt; in the sidebar. You'll see nodes for the people, organizations, concepts, and events the model found in your document, connected by edges representing the relationships it inferred between them. For a 100-page document on a 30B-class model, expect roughly 5-10 minutes of extraction time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F02uolct3m935zqakcdhn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F02uolct3m935zqakcdhn.png" alt="Knowledge graph visualization showing extracted entities and relationships" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click any node to see its properties, its connections, and the source text it was extracted from -- that link back to source evidence is the same mechanism the chat citations use in the next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Ask a Cited Question
&lt;/h2&gt;

&lt;p&gt;Open &lt;strong&gt;Chat&lt;/strong&gt;, start a new conversation, and ask something specific about the document you just uploaded. Chaos Cypher retrieves the relevant chunks and graph context, hands them to your local model, and streams back an answer with citations attached to the sentences that came from your source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax02jopz0ihmszz4b587.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax02jopz0ihmszz4b587.png" alt="Chat page with an AI answer ranking the top entities by PageRank, with entity chips" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click a citation and it jumps straight to the exact chunk in the source document the sentence was grounded in -- not a link to "the document," the specific paragraph. That's the difference between an AI answer you have to take on faith and one you can verify in a click.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Go From Here
&lt;/h2&gt;

&lt;p&gt;That's the whole loop: install, upload, extract, ask, verify. A few directions once you're comfortable with it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bigger documents, bigger graphs.&lt;/strong&gt; Upload a set of related documents as a single archive (a zip) and the graph connects entities across everything inside it. Today each separate upload builds its own graph; cross-source entity resolution is on the roadmap, not in the box.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tune for your hardware.&lt;/strong&gt; The VRAM preset table and multi-instance GPU setup in the &lt;a href="https://chaoscypher.com/blog/local-ai-knowledge-graph" rel="noopener noreferrer"&gt;privacy-first deep dive&lt;/a&gt; cover getting the most out of local hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mix local and cloud.&lt;/strong&gt; Keep chat and search local for privacy, and switch just the extraction pass to a cloud provider if you want maximum quality on a hard document -- it's a single settings change, same pipeline either way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In plain English: you can run a real knowledge graph, end to end, on your own machine, in about the time it takes to read this post.&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>graphrag</category>
      <category>ollama</category>
      <category>python</category>
    </item>
    <item>
      <title>Claude Built Its Own Knowledge Graph. No Local LLM Was Involved.</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Mon, 28 Sep 2026 14:50:30 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/claude-built-its-own-knowledge-graph-no-local-llm-was-involved-nij</link>
      <guid>https://dev.to/chaoscypherinc/claude-built-its-own-knowledge-graph-no-local-llm-was-involved-nij</guid>
      <description>&lt;p&gt;Every GraphRAG tool I know of has the same shape: the server owns a language model, and the server calls it to turn documents into a graph. That is fine when you have a GPU and a model you like. It is a problem when the best model you have access to is the one already sitting in your editor, and it has no idea your knowledge base exists.&lt;/p&gt;

&lt;p&gt;Chaos Cypher's MCP server flips the direction. The assistant on the other end of the connection does the extraction. Claude Code reads the chunks, decides what the entities and relationships are, submits them back, and commits the graph. The server never calls a model. When it is done, the same assistant can ask the graph questions it could not have answered from its context window.&lt;/p&gt;

&lt;p&gt;This post walks through that flow end to end with Claude Code. It works the same way from Claude Desktop, Cursor, or any MCP client whose model can follow a short set of instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Build
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Chaos Cypher's MCP server connected to Claude Code, in write mode&lt;/li&gt;
&lt;li&gt;A knowledge graph built from a folder of your own markdown, extracted by Claude itself&lt;/li&gt;
&lt;li&gt;A persistent graph on your disk that survives closing the session&lt;/li&gt;
&lt;li&gt;A multi-hop question answered from the graph, with citations back to the sentences that support it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The only model involved is the one Claude Code is already using. Chaos Cypher computes the chunk embeddings locally with sentence-transformers on CPU, and nothing else runs a model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install the CLI and connect it to Claude Code
&lt;/h2&gt;

&lt;p&gt;The MCP server ships in the standalone CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;chaoscypher-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI needs Python 3.14 or newer. Then register the server with Claude Code in &lt;strong&gt;write&lt;/strong&gt; mode, because building a graph means adding documents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add chaoscypher &lt;span class="nt"&gt;--&lt;/span&gt; chaoscypher mcp &lt;span class="nt"&gt;--mode&lt;/span&gt; write
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the whole setup. There is no &lt;code&gt;chaoscypher setup&lt;/code&gt; step here on purpose: the wizard configures a chat and extraction model for the server, and this flow does not use one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Ask Claude to build the graph
&lt;/h2&gt;

&lt;p&gt;Open Claude Code in a project that has some prose in it — design notes, ADRs, meeting notes, a docs folder. Then ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add every markdown file under &lt;code&gt;docs/&lt;/code&gt; to the Chaos Cypher knowledge graph, extract the entities and relationships yourself, and tell me the quality grade when you're done.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is what happens next, tool by tool. You can watch it in Claude Code's tool log.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;add_document&lt;/code&gt;&lt;/strong&gt; takes a file path (or a URL), chunks the text, and embeds the chunks locally. By default it only indexes; it does not ask the server to extract anything. The tool description tells the assistant exactly what to do next, which is why a one-line prompt is enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;confirm_extraction&lt;/code&gt;&lt;/strong&gt; clears the domain gate. Chaos Cypher auto-detects an extraction domain for each source — technical, scientific, legal, and so on — and parks the source until someone confirms it. Claude confirms it, or overrides it if you told it to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;get_extraction_tasks&lt;/code&gt;&lt;/strong&gt; returns the plan: how many chunk groups there are and the extraction instructions, including the output format Claude is expected to produce.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;get_extraction_chunks&lt;/code&gt;&lt;/strong&gt; fetches the text of a chunk group with &lt;strong&gt;numbered sentences&lt;/strong&gt;. This is the part that matters for trust. Every entity and relationship Claude submits has to point at the sentence numbers that support it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;submit_chunk_extraction&lt;/code&gt;&lt;/strong&gt; is where Claude does the work. The format is a compact line protocol rather than JSON, one entity per line with its properties following, then one relationship per line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;E|Alice Smith|Person|Alice; A. Smith|0.95|S1|Lead engineer on the ingest service
P|0|role|Lead Engineer
E|Ingest Service|Component|ingest-svc|0.9|S1-S2|Handles uploads and chunking
R|0|1|works_on|0.9|S1|Alice Smith leads the ingest service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;S1&lt;/code&gt; and &lt;code&gt;S1-S2&lt;/code&gt; fields are sentence references. On the server, an evidence validator checks each one against the numbered text. An entity that does not appear in the sentence it cites is dropped, and the drop is counted so you can see it later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;finalize_extraction&lt;/code&gt;&lt;/strong&gt; deduplicates entities across chunks, matches them to templates, writes the citations, and commits the graph. It returns a quality grade on a 0 to 100 scale with the breakdown behind it.&lt;/p&gt;

&lt;p&gt;That is the whole loop. For a folder of thirty markdown files it takes Claude a few minutes, and the tool log shows every submission.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; Claude reads your documents in numbered chunks, writes down what it found and which sentences prove it, and Chaos Cypher checks the receipts before committing anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Look at what it built
&lt;/h2&gt;

&lt;p&gt;The graph is an ordinary Chaos Cypher database in your data directory. Start the local server and open it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chaoscypher serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every entity is typed, every relationship has a justification, and every one of them links back to the source chunk and the sentence Claude cited. The source page shows the pipeline for each file: loaded, chunked, extracted, indexed, with the quality breakdown and a count of anything the evidence check rejected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58w00hqzu0lp1cdoj8iw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58w00hqzu0lp1cdoj8iw.png" alt="Source overview showing the pipeline stages, extraction counts, and entity distribution for one document" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbiqsfwzj9ink4glhoqsu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbiqsfwzj9ink4glhoqsu.png" alt="Knowledge graph canvas with typed, color-coded entities clustered around their source documents" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If a relationship looks wrong, you can edit or delete it here. The graph is yours to correct, not a black box you have to trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Close the session. Open a new one. Ask a hard question.
&lt;/h2&gt;

&lt;p&gt;This is the part that makes the whole thing worth doing. Quit Claude Code and start it again. The context window is empty. The graph is not.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Using the Chaos Cypher graph, which components depend on the queue client, and which ADR governs changing it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;strong&gt;&lt;code&gt;graphrag_search&lt;/code&gt;&lt;/strong&gt;. That tool embeds the question, finds the entities closest to it, runs Personalized PageRank over the graph from those seeds, and pulls two kinds of evidence: the chunks that the top-ranked entities were &lt;em&gt;cited from&lt;/em&gt;, and the chunks a plain vector search would have returned. The two lists are fused with Reciprocal Rank Fusion and handed back with the graph context, so the answer names the components, the ADR, and the chunks each fact came from.&lt;/p&gt;

&lt;p&gt;A question like that needs two hops: from the queue client to the things that depend on it, and from there to the decision record that governs them. Vector search over chunks tends to return the three chunks that mention "queue client" and stop. The graph walks the edges.&lt;/p&gt;

&lt;p&gt;Chaos Cypher also degrades honestly. If the embedding model is unavailable the tool falls back to keyword search and says so in the response's retrieval mode, rather than returning nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is different
&lt;/h2&gt;

&lt;p&gt;Three things make client-driven extraction more than a party trick.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The server needs no model.&lt;/strong&gt; The assistant you already pay for, or the local one you already run in your editor, does the extraction. A laptop with no GPU can build a graph with Claude doing the reading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The evidence check runs on the server, not in the prompt.&lt;/strong&gt; Whatever the assistant submits is validated against the numbered sentences before it is committed. The graph records what was rejected and why. You do not have to trust the model's confidence number; you can look at the sentence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The graph outlives the session.&lt;/strong&gt; It sits in a SQLite database on your disk. It is inspectable in the UI, exportable as a &lt;code&gt;.ccx&lt;/code&gt; package, and available to the next session, the next tool, or the next machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do yet
&lt;/h2&gt;

&lt;p&gt;Extraction quality is the assistant's quality. A weak model will submit weak extractions; the evidence check catches fabrications, not shallow reading. The server also rate-limits submissions per source (100 per minute by default) and caps each submission's size, so a very large corpus is best fed in batches. And &lt;code&gt;add_document&lt;/code&gt; takes one file at a time; for a whole folder, the assistant loops, or you zip the folder and add the archive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The full tool list, with the client-driven extraction limits, is in the &lt;a href="https://chaoscypher.com/docs/user-guide/mcp" rel="noopener noreferrer"&gt;MCP user guide&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Once the graph is built, &lt;a href="https://chaoscypher.com/docs/user-guide/import-export" rel="noopener noreferrer"&gt;export it as a &lt;code&gt;.ccx&lt;/code&gt; package&lt;/a&gt; and mount it into another assistant with one command. That is the next post.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>graphrag</category>
      <category>ai</category>
      <category>selfhosted</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Chaos Cypher v0.5.0: Mount a Knowledge Package Straight Into Your MCP Host</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Mon, 28 Sep 2026 14:49:57 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/chaos-cypher-v050-mount-a-knowledge-package-straight-into-your-mcp-host-41nj</link>
      <guid>https://dev.to/chaoscypherinc/chaos-cypher-v050-mount-a-knowledge-package-straight-into-your-mcp-host-41nj</guid>
      <description>&lt;p&gt;v0.5.0 is the first feature release since v0.4.0: 30 commits since v0.4.3, 19 of them changing product code. Two themes run through it. &lt;strong&gt;Knowledge in motion&lt;/strong&gt; — a package you build can be mounted straight into an MCP host as a one-line config entry, or stacked with other packages into a single database your agent queries. And &lt;strong&gt;measurement&lt;/strong&gt; — two benchmark boards that score local models pass/fail without a judge model, a &lt;code&gt;/leaderboard&lt;/code&gt; page that blends them into one Overall score, and model pickers in the app that read the same numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F02uolct3m935zqakcdhn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F02uolct3m935zqakcdhn.png" alt="Knowledge graph visualization showing extracted entities and relationships" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;chaoscypher mount&lt;/code&gt; — a package, served over MCP, in one command
&lt;/h2&gt;

&lt;p&gt;The gap this closes: you build a knowledge graph on one machine, export it as a &lt;code&gt;.ccx&lt;/code&gt; package, and then have to write a setup script on the other machine before an assistant can use it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;chaoscypher mount&lt;/code&gt; is one idempotent command. It resolves a &lt;code&gt;.ccx&lt;/code&gt; — a local file, or a Lexicon Hub &lt;code&gt;owner/name&lt;/code&gt; — imports it into a database of its own (templates, knowledge, workflows &lt;strong&gt;and&lt;/strong&gt; sources, chunks and citations), indexes it for search, and hands that database to the stdio MCP server. A &lt;code&gt;mount.json&lt;/code&gt; SHA-256 marker makes every later launch skip the import, which is the property that matters: the command belongs directly in an MCP host's config rather than in a setup script that runs once and is never thought about again.&lt;/p&gt;

&lt;p&gt;It is first-run-safe. No chat or extraction model is needed on the serving side, because the host's model asks the questions. All output goes to stderr, since stdout is the JSON-RPC channel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; you can paste one command into Claude Desktop's config and the graph is there, with its citations, on every launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;chaoscypher compose&lt;/code&gt; now works on CCX 3.0
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;compose&lt;/code&gt; was a pre-3.0 prototype, and it failed quietly in three separate ways: the merger read a &lt;code&gt;data/*.json&lt;/code&gt; layout that no package has, so every build produced 0 entities; &lt;code&gt;up&lt;/code&gt; launched a Cortex entrypoint that exited 0 at import time; and &lt;code&gt;down&lt;/code&gt; could not stop a detached server.&lt;/p&gt;

&lt;p&gt;The merger now imports each resolved package into a real runtime database through &lt;code&gt;CcxImporter&lt;/code&gt; — templates, knowledge, sources, chunks, citations and IRIs intact — counts totals from that database, records its inputs in &lt;code&gt;composition.json&lt;/code&gt;, and runs a best-effort embedding and vector indexing pass afterwards. &lt;code&gt;up&lt;/code&gt; launches Cortex the way &lt;code&gt;serve&lt;/code&gt; does, logs to &lt;code&gt;&amp;lt;output&amp;gt;/server.log&lt;/code&gt;, watches the child through a startup grace period and fails with the log tail if it dies. &lt;code&gt;--detach&lt;/code&gt; records &lt;code&gt;compose.pid&lt;/code&gt; and refuses to stack a second live server. &lt;code&gt;down&lt;/code&gt; does SIGTERM then SIGKILL with the configured grace, cleans stale records, and says "nothing running" instead of claiming success.&lt;/p&gt;

&lt;p&gt;Two new subcommands come with it. &lt;code&gt;compose init [--name] [PACKAGES…]&lt;/code&gt; writes a starter &lt;code&gt;axiomatize.yaml&lt;/code&gt; and refuses to overwrite one without &lt;code&gt;--force&lt;/code&gt;. &lt;code&gt;compose mcp&lt;/code&gt; builds the composition if its database is missing, then replaces the process with &lt;code&gt;chaoscypher mcp&lt;/code&gt; on the composed database — stdio passes straight through and the host sees one pid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; several knowledge packages, one database, one server your agent queries — and the commands now tell you the truth about whether it is running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Citations into audio and video now carry timestamps
&lt;/h2&gt;

&lt;p&gt;The audio and video loaders joined Whisper's transcript and threw the segment times away, so a citation into a recording could say which file but never when. Chunks now carry the seconds of the recording they came from, the way PDF chunks carry a page number, and the position travels everywhere a chunk goes: GraphRAG provenance and vector chunks, &lt;code&gt;search_chunks&lt;/code&gt;, &lt;code&gt;summarize&lt;/code&gt;, the search-engine dicts and chat citation resolution. The interface renders them as time badges — "12:34" beside a chunk number, "At 1:27–2:13" on a chat citation chip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two benchmark boards, scored without a judge
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;chaoscypher benchmark&lt;/code&gt; gains an instruction-probe tier: 65 probes across five sections, one per extraction instruction, each with a passage constructed so the correct extraction is unambiguous and checkable by eye. Probes call the real extractor with the real prompts, settings pins and line parser, so a pass means the product could use the output. A "carrier" tier splices each probe into a real ~3,000-character extraction group from the corpus, testing production density rather than production length.&lt;/p&gt;

&lt;p&gt;The second board is grounded chat. Every labelled question is scored by pure functions: the answer names the terms a correct concise answer must contain, carries no names or numbers the retrieved context does not support, leads with the right entity when two are confusable, declines when the sources cannot answer, and passes a completion gate. A judge model is now optional rather than required. The fixture is &lt;em&gt;War and Peace&lt;/em&gt; Book One — 113,934 characters against a ~7.7k retrieval window, so a question is answered from retrieval and not from the whole corpus — with 80 labelled questions covering single-hop, paraphrase, multi-hop across chapters, fine-grained confusable pairs, and out-of-scope questions with decoys.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/leaderboard&lt;/code&gt; blends the two: Model, Overall, Extraction, Chat, VRAM and Speed. Overall is 0.6 × extraction + 0.4 × chat, and the weights are written into the exported data rather than recomputed per page, so the leaderboard, the homepage teaser and the app's model pickers agree. Each score shows its counts, its pass rule, the retrieval floor and the run time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; the numbers are produced by checks you can read, and every page that shows them shows the same ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  The measurement work found two things that made every earlier number suspect
&lt;/h2&gt;

&lt;p&gt;This is the part worth reading even if you never run a benchmark.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extraction truncation was invisible four layers deep — and a truncated extraction scores &lt;em&gt;higher&lt;/em&gt; than a complete one.&lt;/strong&gt; Measured twice, independent of thinking mode: &lt;code&gt;gemma4:31b&lt;/code&gt; scored 72.09 truncated against 67.02 complete, and &lt;code&gt;qwen3.8:27b&lt;/code&gt; under a forced 300-token budget scored 76.49 against 71.25. Core computed the signal correctly the whole time; it died on the way to anyone who could act on it. The CLI ingest path received the metrics dict from &lt;code&gt;extract_single_chunk&lt;/code&gt; and discarded it, so every &lt;code&gt;chaoscypher load&lt;/code&gt; dropped truncation on the floor and &lt;code&gt;chaoscypher source get&lt;/code&gt; reported a clean ingest for a source whose chunks were cut off. A new &lt;code&gt;get_source_counters&lt;/code&gt; validates against the same allowlist the increment uses, so the read and write sets cannot drift, and the leaderboard warns by name about any model whose extraction did not run to completion.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58w00hqzu0lp1cdoj8iw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58w00hqzu0lp1cdoj8iw.png" alt="Source overview showing the pipeline stages, extraction counts and entity distribution for one document" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benchmark runs advertised determinism they never applied.&lt;/strong&gt; Temperature and seed were pinned behind &lt;code&gt;hasattr&lt;/code&gt; guards keyed on field names &lt;code&gt;LLMSettings&lt;/code&gt; does not have, so both assignments silently no-opped while the result row recorded &lt;code&gt;seed=42, temperature=0.0&lt;/code&gt;. Five identical runs spanned 3.5 score points before the fix and are byte-identical after it. Two product defects surfaced with it: there was no seed plumbing anywhere (&lt;code&gt;LLMSettings.seed&lt;/code&gt; is new and applied by the Ollama provider; the default stays &lt;code&gt;None&lt;/code&gt;, so nothing changes unless you pin it), and &lt;code&gt;thinking_for_extraction&lt;/code&gt; was read by the schema extractor but never passed by the path every &lt;code&gt;chaoscypher load&lt;/code&gt; takes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; if you compared local models on an earlier release, compare them again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preset chat defaults that can actually call tools
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;phi4:14b&lt;/code&gt; does not advertise tool calling in its Ollama manifest, and the product chat loop always passes the graph tools — so anyone on the 16 or 20 GB preset failed on the first turn with &lt;code&gt;ToolCallingNotSupportedError&lt;/code&gt;. Those tiers now ship &lt;code&gt;qwen3.5:9b&lt;/code&gt;, which scores 57/80 on the Book One chat board and is the strongest model under 14B on it. The 24 GB preset moves to &lt;code&gt;qwen3.8:27b&lt;/code&gt; (62/80) and 32/48 GB to &lt;code&gt;qwen3.6:35b-a3b&lt;/code&gt; (63/80) — the top scorers that fit each tier with 4 GB of context headroom. The previous default, &lt;code&gt;qwen3:30b&lt;/code&gt;, had never been benchmarked; the board measured the instruct variant.&lt;/p&gt;

&lt;p&gt;An existing install keeps whatever its &lt;code&gt;settings.yaml&lt;/code&gt; already names. Both model pickers in the app are now generated from the leaderboard data, and a model that cannot call tools, or whose chat run timed out, lands in a "Not recommended" group.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other fixes worth knowing about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exported packages carried zero node templates.&lt;/strong&gt; &lt;code&gt;_templates()&lt;/code&gt; dropped every &lt;code&gt;is_system&lt;/code&gt; template, and extraction files entities under system templates — so every mounted, loaded or composed entity arrived untyped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A CLI-built package silently lost every citation&lt;/strong&gt; across a load or mount: &lt;code&gt;package export&lt;/code&gt; hard-coded &lt;code&gt;include_sources=False&lt;/code&gt; on the false premise that the CLI has no sources repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama ignored &lt;code&gt;llm_request_timeout&lt;/code&gt;.&lt;/strong&gt; A model that produced zero bytes sat 75 minutes at 100% GPU. The timeout is now the httpx read timeout, so silence fails on both the streaming and non-streaming paths while a progressing generation never trips it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The &lt;code&gt;\|&lt;/code&gt; escape the extraction prompt documents never worked&lt;/strong&gt; — the parser split on every &lt;code&gt;|&lt;/code&gt; and unescaped afterwards, so an entity named &lt;code&gt;Rostov \| Bolkonsky &amp;amp; Sons&lt;/code&gt; produced one field too many and the whole line was dropped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entity lines survived neither a missing nor a doubled &lt;code&gt;aliases&lt;/code&gt; field&lt;/strong&gt; — 740 + 18 such lines across the saved probe runs. &lt;code&gt;parse_entity_line&lt;/code&gt; now anchors on the confidence and sentence-reference pair instead of counting fields from the left.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;python -m chaoscypher_cortex.main start&lt;/code&gt; built the app and exited 0&lt;/strong&gt; — no &lt;code&gt;if __name__ == "__main__"&lt;/code&gt; guard, and that is the exact command both &lt;code&gt;chaoscypher serve&lt;/code&gt; and &lt;code&gt;compose up&lt;/code&gt; run.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Upgrading
&lt;/h2&gt;

&lt;p&gt;One migration, &lt;code&gt;0007_chunk_media_timestamps&lt;/code&gt;, is additive only — two nullable &lt;code&gt;REAL&lt;/code&gt; columns on &lt;code&gt;document_chunks&lt;/code&gt;, classified &lt;code&gt;safe_auto&lt;/code&gt;, so it applies on startup with automatic migrations enabled. There are no breaking changes to the product API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull ghcr.io/chaoscypherinc/chaoscypher:0.5.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, if you run the Python packages directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; chaoscypher-core chaoscypher-cortex chaoscypher-neuron chaoscypher-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Starting fresh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; chaoscypher &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 80:80 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 443:443 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; chaoscypher-data:/data &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--add-host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;host.docker.internal:host-gateway &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/chaoscypherinc/chaoscypher:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Three things to read before you upgrade
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Two defaults flipped toward carrying more data.&lt;/strong&gt; &lt;code&gt;chaoscypher package export&lt;/code&gt; and &lt;code&gt;graph package load&lt;/code&gt; now include sources, chunks and citations unless you pass &lt;code&gt;--no-sources&lt;/code&gt;. Exported packages are correspondingly larger, and loading one costs an inline search-indexing pass. This is the fix for silently losing every citation across a package round-trip, but it does change the size and timing of both commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Packages exported before this release carry no node templates&lt;/strong&gt;, and if they were built by the CLI, no sources. Re-export them to get typed entities and citations on the far side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The MCP benchmark tool payloads changed shape late in this release.&lt;/strong&gt; The benchmark tools are new in v0.5.0, so nothing released is broken — but if you built a client against &lt;code&gt;main&lt;/code&gt; while the extraction-probe track was landing, re-read the payloads. &lt;code&gt;get_benchmark_task&lt;/code&gt; now returns &lt;code&gt;task_id&lt;/code&gt;; &lt;code&gt;probe_id&lt;/code&gt; is a deprecated alias kept for one release. &lt;code&gt;submit_benchmark_output&lt;/code&gt; no longer returns a verdict — nothing is scored until &lt;code&gt;finish_benchmark&lt;/code&gt;. And each stage is answered exactly once: re-submitting is refused with &lt;code&gt;TASK_FINAL&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;If you keep knowledge packages, re-export them and try &lt;code&gt;chaoscypher mount&lt;/code&gt; against an MCP host — that is the shortest path from a built graph to an assistant that can query it.&lt;/li&gt;
&lt;li&gt;If you picked a local model from the app's dropdown before this release, check it against &lt;code&gt;/leaderboard&lt;/code&gt;. The truncation and determinism fixes above changed what the numbers mean.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Full details in the &lt;a href="https://chaoscypher.com/docs/about/changelog" rel="noopener noreferrer"&gt;changelog&lt;/a&gt;. Chaos Cypher is AGPL-3.0 and local-first: the graph, the chat, and the import and export paths all run on your own machine. Repo: &lt;a href="https://github.com/chaoscypherinc/chaoscypher" rel="noopener noreferrer"&gt;https://github.com/chaoscypherinc/chaoscypher&lt;/a&gt;&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>opensource</category>
      <category>ai</category>
      <category>python</category>
    </item>
    <item>
      <title>Citation Click-Through: How Chaos Cypher Traces Every Answer to Its Source</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 25 Sep 2026 14:51:36 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/citation-click-through-how-chaos-cypher-traces-every-answer-to-its-source-404i</link>
      <guid>https://dev.to/chaoscypherinc/citation-click-through-how-chaos-cypher-traces-every-answer-to-its-source-404i</guid>
      <description>&lt;p&gt;Most AI chat answers ask you to take them on faith. There's no way to tell which sentence came from your documents and which one the model filled in from its own training. Chaos Cypher takes a different position: every claim in a chat answer that's grounded in your knowledge graph carries a citation, and every citation is a link you can click.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem With Black-Box Answers
&lt;/h2&gt;

&lt;p&gt;Ask a chatbot a question about your own documents and you get an answer that reads well and might be completely right -- or quietly wrong in a way you'd only catch by re-reading the source yourself. The confidence of the answer tells you nothing about how well-grounded it is. That gap between "sounds right" and "is right" is the core trust problem with RAG-backed chat, and it only gets worse as your knowledge graph grows past what you can hold in your head.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Click-Through Looks Like
&lt;/h2&gt;

&lt;p&gt;Ask Chaos Cypher a question in &lt;strong&gt;Chat&lt;/strong&gt; and the streamed answer arrives with small inline markers next to the sentences it pulled from your sources -- a document icon for text, a thumbnail for an image chunk. Hover one and a tooltip shows the source it came from, the page number, and a validation badge: &lt;strong&gt;Verified&lt;/strong&gt; when the cited sentence was actually found in that chunk, &lt;strong&gt;Invalid&lt;/strong&gt; when it wasn't.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax02jopz0ihmszz4b587.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax02jopz0ihmszz4b587.png" alt="Chat page with an AI answer ranking the top entities by PageRank, with entity chips" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the marker and you land on that source's detail page with the exact chunk highlighted -- not "somewhere in this document," the specific paragraph the sentence was grounded in. Answers that pulled from a scanned page or image work the same way: the marker is a thumbnail, and clicking it opens the full image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58w00hqzu0lp1cdoj8iw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58w00hqzu0lp1cdoj8iw.png" alt="Source overview for war_and_peace.txt: entity and relationship counts, pipeline flow, entity distribution" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters More Than a Nice-to-Have
&lt;/h2&gt;

&lt;p&gt;This closes the loop that most RAG chat interfaces leave open. Instead of trusting a generated answer wholesale, you can verify any individual sentence in a click -- confirm it against the source, catch a citation that doesn't hold up, or just read more context around the fact you asked about. It's the same underlying link between graph and source text that powers node detail pages in the graph view; chat citations are that mechanism surfaced at the point where you're actually reading an answer.&lt;/p&gt;

&lt;p&gt;In plain English: if Chaos Cypher tells you something, you can check it -- one click, straight to the sentence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;Ask a question about a document you've already imported and look for the citation markers in the answer. If you haven't imported anything yet, the &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;GraphRAG with Ollama in 10 minutes&lt;/a&gt; quickstart gets you from zero to a cited answer in about ten minutes, fully local.&lt;/p&gt;

</description>
      <category>graphrag</category>
      <category>ai</category>
      <category>rag</category>
      <category>selfhosted</category>
    </item>
    <item>
      <title>GraphRAG Teardown: What the Graph Actually Adds to Naive RAG</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 25 Sep 2026 14:51:30 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/graphrag-teardown-what-the-graph-actually-adds-to-naive-rag-883</link>
      <guid>https://dev.to/chaoscypherinc/graphrag-teardown-what-the-graph-actually-adds-to-naive-rag-883</guid>
      <description>&lt;p&gt;Take three well-known AI agent papers -- chain-of-thought prompting, ReAct, and Reflexion -- drop them into a knowledge base, and ask a question that spans all three: &lt;em&gt;"How does Reflexion's self-reflection loop relate to chain-of-thought prompting?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Naive vector RAG will hand you a competent paragraph about chain-of-thought. The connection you actually asked about -- that ReAct interleaved chain-of-thought-style reasoning traces with actions, and that Reflexion layered verbal self-reflection on top of ReAct-style agents, with two authors carrying across both papers -- is spread across three documents and stated explicitly in none of them.&lt;/p&gt;

&lt;p&gt;This post is a teardown of both retrieval paths over exactly that corpus. Not a leaderboard: a walk through what each one mechanically does, where the vector path stalls, and where the graph earns its keep.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Post Is (And Isn't)
&lt;/h2&gt;

&lt;p&gt;This is a &lt;strong&gt;mechanism teardown&lt;/strong&gt;, not a benchmark. You will not find a table here claiming Chaos Cypher scores X% against a baseline's Y%. Retrieval quality depends enormously on corpus, chunking, embedding model, and question shape, and a number produced by us on a corpus chosen by us would tell you very little.&lt;/p&gt;

&lt;p&gt;What you &lt;em&gt;will&lt;/em&gt; find: the exact retrieval steps both paths take, the real relationships in this three-paper corpus that separate them, and the retrieval statistics Chaos Cypher emits on every query so you can run the same comparison on your own documents and read the receipts yourself.&lt;/p&gt;

&lt;p&gt;It's worth stating the honest version of the research picture up front. The most thorough public analysis of this question -- &lt;a href="https://arxiv.org/abs/2506.05690" rel="noopener noreferrer"&gt;&lt;em&gt;When to use Graphs in RAG: A Comprehensive Analysis for Graph Retrieval-Augmented Generation&lt;/em&gt;&lt;/a&gt; (the GraphRAG-Bench paper, ICLR 2026) -- exists precisely because graph retrieval &lt;strong&gt;frequently underperforms vanilla RAG&lt;/strong&gt; on many real-world tasks. Its contribution is mapping &lt;em&gt;when&lt;/em&gt; graph structure pays off: the benefit concentrates in complex, multi-hop reasoning, and largely evaporates on simple fact retrieval, where a well-tuned vector index is already the right tool.&lt;/p&gt;

&lt;p&gt;That matches our own position, and it's why Chaos Cypher fuses the two rather than replacing one with the other. The graph is not a better vector index. It answers a different question.&lt;/p&gt;

&lt;p&gt;In plain English: graphs help with questions that require connecting things, not with questions that require finding one thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Corpus and the Question
&lt;/h2&gt;

&lt;p&gt;Three papers, all publicly available:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Paper&lt;/th&gt;
&lt;th&gt;arXiv&lt;/th&gt;
&lt;th&gt;Venue&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (Wei et al.)&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2201.11903" rel="noopener noreferrer"&gt;2201.11903&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;NeurIPS 2022&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al.)&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2210.03629" rel="noopener noreferrer"&gt;2210.03629&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;ICLR 2023&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reflexion: Language Agents with Verbal Reinforcement Learning (Shinn et al.)&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2303.11366" rel="noopener noreferrer"&gt;2303.11366&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;NeurIPS 2023&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The relationships between them are real and checkable. ReAct builds directly on chain-of-thought reasoning, interleaving reasoning traces with actions rather than producing reasoning alone. Reflexion builds on that line of work, adding a verbal self-reflection buffer that feeds an agent's own failures back into its next attempt. And the author lists overlap: Shunyu Yao and Karthik Narasimhan appear on both ReAct and Reflexion.&lt;/p&gt;

&lt;p&gt;Now the question: &lt;strong&gt;"How does Reflexion's self-reflection loop relate to chain-of-thought prompting?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Note what makes this hard. No single chunk in any of the three papers contains the answer. The chain runs chain-of-thought → ReAct → Reflexion, and each link lives in a different document.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 1: What Naive Vector RAG Does
&lt;/h2&gt;

&lt;p&gt;The naive path is three steps, and it is genuinely good at what it does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Embed the question&lt;/strong&gt; into a vector.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare&lt;/strong&gt; that vector against every chunk embedding by cosine similarity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Return&lt;/strong&gt; the top &lt;em&gt;k&lt;/em&gt; closest chunks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ask our question and the retrieved chunks will be dominated by passages that &lt;em&gt;talk like the question&lt;/em&gt;. The phrase "self-reflection" pulls hard toward Reflexion's abstract and method section. "Chain-of-thought prompting" pulls toward the Wei et al. paper. You get strong chunks from both ends of the chain.&lt;/p&gt;

&lt;p&gt;What you almost certainly do not get is the middle. ReAct is the load-bearing link -- it's what connects reasoning traces to acting agents -- but a ReAct passage doesn't necessarily &lt;em&gt;sound&lt;/em&gt; like a question about Reflexion and chain-of-thought. Its vocabulary is its own: interleaving, action space, observation. Lexical and semantic similarity to the query is mediocre, so it ranks below chunks that merely restate the question's own terms.&lt;/p&gt;

&lt;p&gt;The failure mode is worth naming precisely: &lt;strong&gt;vector search has no representation of the fact that these three documents are related.&lt;/strong&gt; It sees text, scores text, returns text. Two chunks that describe the same idea in different vocabulary are far apart; two chunks that share vocabulary but no actual relationship are close together. There is no edge between ReAct and Reflexion in a vector index, because a vector index has no edges at all.&lt;/p&gt;

&lt;p&gt;And it fails quietly. There's no error, no "I found the endpoints but not the path." You get a fluent answer built from the two ends of a three-link chain, and it reads exactly as confident as a complete one would.&lt;/p&gt;

&lt;p&gt;In plain English: vector search finds text that sounds like your question, which is not the same as text that answers it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 2: What GraphRAG Does
&lt;/h2&gt;

&lt;p&gt;Chaos Cypher's GraphRAG pipeline runs seven steps. The graph half and the vector half both run, and the last step merges them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Embed the query.&lt;/strong&gt; Identical starting point to the naive path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Match seed entities.&lt;/strong&gt; Before touching document chunks, the query vector is compared against &lt;em&gt;entity&lt;/em&gt; embeddings in the knowledge graph. Entities clearing a cosine-similarity floor (&lt;code&gt;seed_similarity_threshold&lt;/code&gt;, default &lt;code&gt;0.3&lt;/code&gt;) become seeds, up to a &lt;code&gt;seed_limit&lt;/code&gt;. For our question, expect seeds like &lt;code&gt;Reflexion&lt;/code&gt;, &lt;code&gt;self-reflection&lt;/code&gt;, and &lt;code&gt;chain-of-thought prompting&lt;/code&gt; -- the anchor points, not the answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 — Personalized PageRank.&lt;/strong&gt; Standard PageRank finds globally important nodes. &lt;em&gt;Personalized&lt;/em&gt; PageRank restarts its random walk at your seeds, turning a global importance score into a query-specific relevance score. Chaos Cypher runs rustworkx's compiled power iteration with a damping factor of &lt;code&gt;0.85&lt;/code&gt; (&lt;code&gt;ppr_damping&lt;/code&gt;), in-process -- no external graph database. Seed weights come from the Step 2 similarity scores, so the walk is biased toward the entities that actually matter for &lt;em&gt;this&lt;/em&gt; question.&lt;/p&gt;

&lt;p&gt;This is where ReAct surfaces. It was never a strong seed, because it isn't semantically close to the query. It scores well because it sits structurally between two entities that &lt;em&gt;are&lt;/em&gt; -- one or two hops from both &lt;code&gt;Reflexion&lt;/code&gt; and &lt;code&gt;chain-of-thought&lt;/code&gt;. The top &lt;code&gt;ppr_top_k&lt;/code&gt; entities (default &lt;code&gt;20&lt;/code&gt;) carry forward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 — Assemble graph context.&lt;/strong&gt; Seeds, discovered entities, and the relationship triples connecting them are collected into a structured context (capped by &lt;code&gt;max_triples&lt;/code&gt;, default &lt;code&gt;200&lt;/code&gt;) and passed to the model alongside the text. The model gets the &lt;em&gt;map&lt;/em&gt;, not just the territory. On this corpus, extraction should yield edges along the lines of &lt;code&gt;Reflexion --builds_on--&amp;gt; ReAct&lt;/code&gt;, &lt;code&gt;ReAct --extends--&amp;gt; chain-of-thought prompting&lt;/code&gt;, &lt;code&gt;Shunyu Yao --authored--&amp;gt; ReAct&lt;/code&gt;, &lt;code&gt;Shunyu Yao --authored--&amp;gt; Reflexion&lt;/code&gt; -- the exact labels depend on what extraction pulled from your documents, which is the subject of the limitations section below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 — Retrieve provenance chunks.&lt;/strong&gt; The first of two retrieval paths. For every entity the graph surfaced, Chaos Cypher looks up which document chunks that entity was originally extracted from. This is what makes the graph auditable rather than decorative: the ReAct passage arrives with the evidence for why it was retrieved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6 — Retrieve vector chunks.&lt;/strong&gt; The second path is ordinary hybrid search -- semantic plus keyword -- across all chunks. This is the naive path, running unchanged, inside the graph pipeline. It catches relevant passages that never produced graph entities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7 — Merge and rank.&lt;/strong&gt; Two independently ranked lists, two incompatible scoring scales. Chaos Cypher merges them with Reciprocal Rank Fusion (&lt;a href="https://dl.acm.org/doi/10.1145/1571941.1572114" rel="noopener noreferrer"&gt;Cormack, Clarke &amp;amp; Buettcher, 2009&lt;/a&gt;), which discards raw scores and uses only rank position: each chunk scores the sum of &lt;code&gt;1 / (k + rank)&lt;/code&gt; across every list it appears in, with &lt;code&gt;k = 60&lt;/code&gt; per the original paper.&lt;/p&gt;

&lt;p&gt;The property that matters: a chunk appearing in &lt;em&gt;both&lt;/em&gt; lists collects from both. A passage ranked 5th by provenance and 8th by vector search will often outrank one that's 1st by vector search and absent from provenance. Evidence confirmed by two independent signals beats evidence confirmed by one.&lt;/p&gt;

&lt;p&gt;In plain English: the graph finds the path between the things you asked about, the vector index finds text that sounds like your question, and fusion trusts what both agree on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyeha9i1bezyqe2x3nq8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyeha9i1bezyqe2x3nq8e.png" alt="Command palette searching for Pierre, listing entity results with connection counts" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading the Receipts
&lt;/h2&gt;

&lt;p&gt;The part that makes this a teardown rather than a story: every GraphRAG query returns a &lt;code&gt;retrieval_stats&lt;/code&gt; block alongside its results. Six fields, all observable:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;What it tells you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Which pipeline actually ran (see below)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;seed_entities_found&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How many graph entities anchored the walk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ppr_entities_explored&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How many entities PageRank scored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;provenance_chunks&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chunks retrieved via graph provenance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;vector_chunks&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chunks retrieved via hybrid search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deduplicated&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chunks the two paths agreed on and were merged&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;mode&lt;/code&gt; is the honest one. The pipeline degrades rather than failing, and it tells you which rung it landed on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;full_graphrag&lt;/code&gt;&lt;/strong&gt; -- seeds found, PageRank succeeded. Graph context, provenance chunks, vector chunks, fusion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;vector_only&lt;/code&gt;&lt;/strong&gt; -- embeddings worked, but no graph seeds matched (or PageRank produced nothing). Hybrid search, no graph context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;keyword_only&lt;/code&gt;&lt;/strong&gt; -- no embeddings available. SQLite full-text keyword search.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the number to watch when you evaluate GraphRAG on your own corpus. A query returning &lt;code&gt;vector_only&lt;/code&gt; did not get any graph benefit, whatever the answer looked like -- and if most of your queries come back &lt;code&gt;vector_only&lt;/code&gt;, your graph isn't the problem, your &lt;em&gt;extraction&lt;/em&gt; is. Likewise, a &lt;code&gt;deduplicated&lt;/code&gt; count near zero means the two paths found completely disjoint evidence, which is usually a sign the query was single-hop and the graph half was along for the ride.&lt;/p&gt;

&lt;p&gt;In plain English: don't take our word for whether the graph fired -- the response tells you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the Graph Doesn't Help
&lt;/h2&gt;

&lt;p&gt;Being straight about this is more useful than a win column.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single-hop fact lookup.&lt;/strong&gt; "What damping factor does PageRank use?" needs one chunk. The graph adds latency and nothing else. This is the GraphRAG-Bench finding in miniature, and it describes a lot of real queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Small or unstructured corpora.&lt;/strong&gt; Three papers is enough to demonstrate a citation chain; a single document with no cross-references gives PageRank nothing to walk. Below a few interlinked documents, expect &lt;code&gt;vector_only&lt;/code&gt; most of the time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extraction quality is the ceiling.&lt;/strong&gt; The graph is only as good as the entities and relationships pulled out of your text during import. Miss the &lt;code&gt;Reflexion --builds_on--&amp;gt; ReAct&lt;/code&gt; edge at extraction time and no amount of clever retrieval invents it. When GraphRAG disappoints, the fix is usually upstream in extraction, not in retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Very large graphs skip PageRank entirely.&lt;/strong&gt; There's a &lt;code&gt;max_graph_nodes&lt;/code&gt; ceiling (default &lt;code&gt;50,000&lt;/code&gt;) on how much graph gets loaded for a walk. Past it, the pipeline skips PPR rather than stalling on a query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The seed threshold is a real gate.&lt;/strong&gt; Nothing clears &lt;code&gt;0.3&lt;/code&gt; cosine similarity, nothing seeds, and you're in &lt;code&gt;vector_only&lt;/code&gt; no matter how rich the graph is. Vocabulary mismatch between your question and your extracted entities shows up here first.&lt;/p&gt;

&lt;p&gt;In plain English: the graph is a specialist, and a system that pretends otherwise is selling something.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run It Yourself
&lt;/h2&gt;

&lt;p&gt;Both halves are separately observable in a running instance, which is the point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The naive path alone:&lt;/strong&gt; the search bar exposes &lt;code&gt;keyword&lt;/code&gt;, &lt;code&gt;semantic&lt;/code&gt;, and &lt;code&gt;hybrid&lt;/code&gt; modes directly. &lt;code&gt;semantic&lt;/code&gt; is textbook vector RAG -- use it as your baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The full path:&lt;/strong&gt; ask the same question in &lt;strong&gt;Chat&lt;/strong&gt;, which retrieves through GraphRAG, and compare what gets cited. Every citation clicks through to the exact source chunk, so you can check whether the middle of the chain actually showed up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Programmatically:&lt;/strong&gt; the &lt;code&gt;graphrag_search&lt;/code&gt; MCP tool runs the whole pipeline and returns &lt;code&gt;graph_context&lt;/code&gt;, &lt;code&gt;chunks&lt;/code&gt;, and &lt;code&gt;retrieval_stats&lt;/code&gt; as structured data -- the cleanest way to diff retrieval paths across a question set.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The three papers above make a good starter corpus precisely because you already know the right answer, which makes a wrong one easy to spot.&lt;/p&gt;

&lt;p&gt;If you want the conceptual version of why multi-hop breaks vector search, that's &lt;a href="https://chaoscypher.com/blog/graphrag-enhanced-search" rel="noopener noreferrer"&gt;Why Your RAG Chat is Missing Half the Answers&lt;/a&gt;. If you don't have an instance running yet, &lt;a href="https://chaoscypher.com/blog/graphrag-ollama-10-minutes" rel="noopener noreferrer"&gt;GraphRAG with Ollama in 10 minutes&lt;/a&gt; gets you from zero to a cited answer, fully local.&lt;/p&gt;

</description>
      <category>graphrag</category>
      <category>rag</category>
      <category>ai</category>
      <category>python</category>
    </item>
    <item>
      <title>The CCX Open Format: A Portable Spec for Knowledge Graphs</title>
      <dc:creator>Denis MacPherson</dc:creator>
      <pubDate>Fri, 25 Sep 2026 14:50:48 +0000</pubDate>
      <link>https://dev.to/chaoscypherinc/the-ccx-open-format-a-portable-spec-for-knowledge-graphs-3p61</link>
      <guid>https://dev.to/chaoscypherinc/the-ccx-open-format-a-portable-spec-for-knowledge-graphs-3p61</guid>
      <description>&lt;p&gt;A knowledge graph you cannot take with you is not really yours. You can love the tool that built it, and still want the guarantee that the graph outlives the tool -- readable in five years, on a machine that has never heard of the software that produced it.&lt;/p&gt;

&lt;p&gt;That guarantee only exists if the file format is written down.&lt;/p&gt;

&lt;p&gt;So we wrote it down. CCX -- Chaos Cypher eXchange, the &lt;code&gt;.ccx&lt;/code&gt; file Chaos Cypher already exports -- now has a &lt;strong&gt;&lt;a href="https://chaoscypher.com/docs/reference/ccx-format" rel="noopener noreferrer"&gt;published draft specification&lt;/a&gt;&lt;/strong&gt; and a &lt;strong&gt;standalone reader library&lt;/strong&gt; you can install and use with no Chaos Cypher anywhere in the picture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;ccx-format        &lt;span class="c"&gt;# import name: ccx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reader is Apache-2.0 and lives in its own repository (&lt;a href="https://github.com/chaoscypherinc/ccx" rel="noopener noreferrer"&gt;chaoscypherinc/ccx&lt;/a&gt;, &lt;a href="https://pypi.org/project/ccx-format/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;) -- deliberately more permissive than Chaos Cypher itself, because a format nobody can implement against is a format nobody adopts.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Changes For You
&lt;/h2&gt;

&lt;p&gt;If you use Chaos Cypher, nothing you do changes today. Export still works the way it did; the file you get is the same file.&lt;/p&gt;

&lt;p&gt;What changed is what that file &lt;em&gt;means&lt;/em&gt;. Before, &lt;code&gt;.ccx&lt;/code&gt; was an implementation detail -- whatever our exporter happened to write, readable by whatever our importer happened to accept. Now it is a documented artifact with a schema, a validator, and a second piece of software that reads it. Your export is no longer a bet on us staying in business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; your &lt;code&gt;.ccx&lt;/code&gt; file is now a document with a spec behind it, not just a save file.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Actually In a Package
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;.ccx&lt;/code&gt; file is a ZIP archive with a fixed layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mimetype                              # first entry, uncompressed
manifest.json                         # metadata + member inventory
context.jsonld                        # the JSON-LD context, carried inline
knowledge.jsonld                      # the default graph
graphs/&amp;lt;namespace&amp;gt;.&amp;lt;name&amp;gt;.jsonld      # additional named graphs
sources.jsonl                         # source and chunk records
shapes.ttl                            # optional SHACL shapes
assets/sha256/&amp;lt;hex&amp;gt;                   # content-addressed assets
signatures/manifest.sig               # optional detached signature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four decisions in there are worth pulling out, because they are the ones that make the file trustworthy rather than merely readable:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The archive is deterministic.&lt;/strong&gt; Entry timestamps are pinned to &lt;code&gt;1980-01-01&lt;/code&gt; and file modes to &lt;code&gt;0644&lt;/code&gt;, so the same inputs produce a byte-identical archive. You can checksum an export and mean something by it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The media type is in the first bytes.&lt;/strong&gt; The first entry is always an uncompressed file named &lt;code&gt;mimetype&lt;/code&gt; containing &lt;code&gt;application/vnd.ccx+zip&lt;/code&gt; -- the same trick EPUB uses. A file identifies itself without being unpacked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everything is checksummed twice.&lt;/strong&gt; Every graph and asset in the manifest carries both a SHA-256 and a SHA-512 digest, and integrity verification requires &lt;em&gt;both&lt;/em&gt; to match. Readers also enforce hard limits before inflating anything -- at most 100,000 entries, 512 MiB per entry, 2 GiB total -- so a malicious package cannot zip-bomb a consumer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remote contexts are forbidden.&lt;/strong&gt; A conformant reader rejects any &lt;code&gt;http(s)://&lt;/code&gt; JSON-LD &lt;code&gt;@context&lt;/code&gt; reference anywhere in the package, and loads graphs with network access disabled. This is the rule we are most opinionated about: a package must be fully interpretable offline, forever, with no live server anywhere in the chain. It is a security property, not a style preference.&lt;/p&gt;

&lt;p&gt;The knowledge itself lives in &lt;code&gt;knowledge.jsonld&lt;/code&gt; as JSON-LD nodes, with relationships either attached directly to their subject or reified as standalone &lt;code&gt;Relationship&lt;/code&gt; resources when they carry properties of their own. Sources and retrieval chunks live in &lt;code&gt;sources.jsonl&lt;/code&gt;, one JSON object per line, with chunks pointing back into retained full text by character offset -- which is what lets a citation survive the trip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; it's a ZIP with a strict layout, checksums on everything, and a hard rule that it never needs the internet to be read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading a Package Without Chaos Cypher
&lt;/h2&gt;

&lt;p&gt;This is the part that makes "open" mean something. Install the reader and open any &lt;code&gt;.ccx&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ccx&lt;/span&gt;

&lt;span class="n"&gt;pkg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ccx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open_package&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-graph.ccx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pkg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;validate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# e.g. True ('core', 'sources', 'shapes')
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is a CLI too -- &lt;code&gt;ccx inspect&lt;/code&gt;, &lt;code&gt;ccx validate&lt;/code&gt;, and &lt;code&gt;ccx pack&lt;/code&gt; -- so you can check a package without writing any code at all.&lt;/p&gt;

&lt;p&gt;Note what &lt;code&gt;validate()&lt;/code&gt; hands back: not a boolean, but a report with errors, warnings, and a set of &lt;strong&gt;conformance classes&lt;/strong&gt;. Those classes are the format's honesty mechanism.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Class&lt;/th&gt;
&lt;th&gt;Granted when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;core&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The container, manifest, context, and graphs all check out.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sources&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sources.jsonl&lt;/code&gt; parses and every chunk offset is in range against its text asset.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;shapes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;shapes.ttl&lt;/code&gt; is present, parses as Turtle, and declares at least one SHACL shape.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;embeddings&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The manifest declares embeddings and every included sidecar is present.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;signed&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The manifest declares signatures and at least one verifies offline.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The classes above &lt;code&gt;core&lt;/code&gt; are &lt;strong&gt;independent capabilities, not a stack&lt;/strong&gt;, and absence is never an error -- a package is judged only on what it claims by actually shipping the relevant artifacts. A package with no embeddings is not a failing package; it simply is not granted the &lt;code&gt;embeddings&lt;/code&gt; class. A package that claims embeddings and ships them broken does not fail validation either: it collects warnings and the class is withheld. So a consumer can ask "does this package have verifiable sources?" and get a straight answer, instead of parsing it and finding out.&lt;/p&gt;

&lt;p&gt;A typical full Chaos Cypher export validates as &lt;code&gt;core&lt;/code&gt;, &lt;code&gt;sources&lt;/code&gt;, &lt;code&gt;shapes&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; any Python program can open a &lt;code&gt;.ccx&lt;/code&gt; file, and the validator tells it exactly which parts of the package it can trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Producing One From Chaos Cypher
&lt;/h2&gt;

&lt;p&gt;Nothing new here, but for completeness -- the graphical path is &lt;strong&gt;Settings → General → Import &amp;amp; Export&lt;/strong&gt;: pick which components to include, click Export, and the browser downloads the &lt;code&gt;.ccx&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tjk220eylo5g0zdhsbd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tjk220eylo5g0zdhsbd.png" alt="Settings → General with the Import &amp;amp; Export row and its Export and Import buttons" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For a single document's worth of knowledge rather than the whole graph, use &lt;strong&gt;Export Source&lt;/strong&gt; in that source's action menu on the Sources page.&lt;/p&gt;

&lt;p&gt;CLI users get the same thing with more control:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Whole graph, default components&lt;/span&gt;
chaoscypher graph package &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; my-research.ccx &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"My Research"&lt;/span&gt;

&lt;span class="c"&gt;# Templates and lenses only, no entities -- a shareable schema&lt;/span&gt;
chaoscypher graph package &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nt"&gt;--no-knowledge&lt;/span&gt; &lt;span class="nt"&gt;--no-workflows&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; schema-only.ccx

&lt;span class="c"&gt;# Include embedding vectors (off by default -- only useful for same-model migration)&lt;/span&gt;
chaoscypher graph package &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nt"&gt;--embeddings&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; full.ccx

&lt;span class="c"&gt;# Load one back&lt;/span&gt;
chaoscypher graph package load my-research.ccx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imports are an &lt;strong&gt;upsert by IRI&lt;/strong&gt;, not a copy: Chaos Cypher mints locally scoped identifiers and preserves foreign ones on re-export, so loading a package twice does not duplicate its contents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; two clicks in Settings, or one command in the terminal, and you have a package.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Honest Limits
&lt;/h2&gt;

&lt;p&gt;This is draft 1 of a 3.0 spec, and there is a difference between "documented" and "finished." The things we would want to know if we were reading someone else's format announcement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;We are not calling it a standard.&lt;/strong&gt; There is one reference implementation, written by us. A format with a single implementation is a documented format, and that is all we are claiming. That word is available to us when a second, independent implementation exists -- not before.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The spec is revised in place&lt;/strong&gt; while draft status holds. The revision marker at the top of the spec page identifies the exact text a tool was written against; check it rather than assuming.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflows do not round-trip today.&lt;/strong&gt; The &lt;code&gt;chaoscypher.workflows&lt;/code&gt; graph member currently carries workflow &lt;em&gt;trigger&lt;/em&gt; rows only, not full workflow definitions, and our own importer skips that member with a warning. It is in the package and it is not yet useful; we would rather say so than let you discover it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signatures are specified but not emitted.&lt;/strong&gt; The format defines detached &lt;code&gt;ed25519&lt;/code&gt; and &lt;code&gt;sigstore&lt;/code&gt; signatures with offline, fail-closed verification, and reserves post-quantum format names. Chaos Cypher does not produce signed packages yet, so the &lt;code&gt;signed&lt;/code&gt; class is currently unreachable from our exports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embeddings are opt-in and model-bound.&lt;/strong&gt; They ship as Parquet sidecars and are off by default, because a vector is only useful to someone running the same embedding model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In plain English:&lt;/strong&gt; the file format is written down and stable enough to build against; the parts that are not finished are named above rather than left for you to trip over.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Want From This
&lt;/h2&gt;

&lt;p&gt;The interesting question is not whether Chaos Cypher can read its own files. It is whether anything else can.&lt;/p&gt;

&lt;p&gt;So the specific thing that would make this real: &lt;strong&gt;one independent implementation.&lt;/strong&gt; A loader that pulls a &lt;code&gt;.ccx&lt;/code&gt; into LlamaIndex or LangChain. An exporter that writes one out of Obsidian. A validator in another language. Any of those, written by someone who is not us, is the difference between a documented format and a shared one.&lt;/p&gt;

&lt;p&gt;If you are building in this space, the &lt;a href="https://chaoscypher.com/docs/reference/ccx-format" rel="noopener noreferrer"&gt;spec page&lt;/a&gt; is the whole contract and the &lt;a href="https://github.com/chaoscypherinc/ccx" rel="noopener noreferrer"&gt;reader&lt;/a&gt; is the reference. Both are open, and issues and questions on either are genuinely welcome -- draft 1 is exactly the stage where the spec should be argued with.&lt;/p&gt;

&lt;p&gt;If you just want your own graph to be portable: it already is. That was the point.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Running Chaos Cypher fully locally with Ollama? See the &lt;a href="https://chaoscypher.com/blog/local-ai-knowledge-graph" rel="noopener noreferrer"&gt;local-first setup guide&lt;/a&gt; -- packages work identically there, and never touch a network.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>graphrag</category>
      <category>selfhosted</category>
    </item>
  </channel>
</rss>
