---
title: "Notation3 (N3) (page.n3)"
description: "Logic, rules, and inference."
canonical: "https://geordy.ai/formats/n3"
---
# Notation3 (N3)

**Logic, rules, and inference.**

RDF logic-based notation. Lets AI systems reason over relationships in your content rather than just extract them.

N3 is a simple, readable, and extensible text format for writing down knowledge and data on the Web, built on top of RDF, and designed to be a more convenient syntax for humans. Created by Tim Berners-Lee and Dan Connolly in 2000.

## At a glance

- File: `page.n3`
- First released: 2000
- Created by: Tim Berners-Lee & Dan Connolly
- Specification: https://www.w3.org/TeamSubmission/n3/
- Read by: Reasoning engines, Knowledge graph systems, AI agents using inference

## Why it matters for AI

N3 is a human-readable RDF syntax that extends Turtle with rules, quantification, and quoted graphs, letting publishers express not just data but logical relationships in one file. For AI and reasoning agents this matters because N3 documents can be both parsed as RDF and executed by N3 reasoners (cwm, EYE), giving a single, machine-actionable artifact for facts and inference.

## Example

```
@prefix geordy: <http://geordy.ai/ns#> .
@prefix schema: <http://schema.org/> .

ex:GeordyAI
  a geordy:AIPlatform ;
  schema:name "Geordy AI Platform" ;
  geordy:supportsAI ex:ChatGPT, ex:Claude .
```

## Benefits

- Human-readable syntax
- Supports logic rules
- Concise and extensible

## Limitations

- Less strict than Turtle
- Lower adoption than JSON-LD for web data

## Best practices

- Declare every namespace with @prefix at the top of the file and reuse standard vocabularies (rdf:, rdfs:, owl:, foaf:, schema:, dcterms:) instead of inventing new ones.
- Use the abbreviation `a` for rdf:type and `;` / `,` to group predicates and objects, which keeps the document compact and easy to diff.
- When you need rules or implications, scope variables with @forAll or `?x` and use the `=>` (log:implies) operator from the standard log: vocabulary so any conformant N3 reasoner can run them.
- Validate documents with an N3/Turtle parser (Apache Jena, rdflib, EYE, cwm) before publishing - N3 is a superset of Turtle, so unintended rule constructs can sneak in.

## Pitfalls

- Mixing N3-only constructs (rules, quoted graphs `{ ... }`, @forAll) into a file you intend to be Turtle, which then fails in Turtle-only consumers.
- Forgetting the trailing `.` that ends every statement, which produces silent parse errors mid-document.
- Using bare CURIEs (foo:bar) without a matching @prefix declaration, leading to undefined-prefix errors.

## Use cases

- **Knowledge representation**
- **Data integration**
- **Rule-based systems**

## Adopters

- W3C (https://www.w3.org/TeamSubmission/n3/)
- Apache Jena (https://jena.apache.org/documentation/io/rdf-input.html)
- EYE reasoner (https://github.com/eyereasoner/eye)
- Solid project (https://solidproject.org/TR/protocol)
---

Source: https://geordy.ai/formats/n3
This is a machine-readable markdown version of that page, generated by Geordy.