Tuesday, 1 December 2026

In Praise of pgvector

pgvector makes PostgreSQL ready for AI applications!

It is an open source PostgreSQL extension. It adds native vector data types and similarity search - supporting metrics like cosine, inner product and L2 distance - directly inside Postgres.

Hamming distances and Jaccard distances are supported!

Postgres features like joins, ACID transactions - are preserved!

Some other Postgres extensions can be found here.

Anthropic Research on Lattice Cryptography

The Anthropic Results

Anthropic has published new results in lattice cryptography - specifically relating to structured and unstructured lattices.  The first paper is entitled: "Galactic quasi-polynomial quantum algorithms for integral and module lattices".

The structured variants are those with relevance to NIST algorithms on post quantum cryptography (PQC). 

The CIRG (Cryptography Incident Review Group) formed in November 2026, has published an initial assesssment of the results.

Common Lean Building Blocks

Lean building blocks common to all 4 papers can be read here. Blocks specific to probability are here. Blocks relating to lattices are here.

Technical Terminology

There are some technical terms which are in less common use which need explaining to decode the findings. These include:

1.    Galactic Algorithm - theoretically optimal algorithm whose performance advantages only appear at impossibly large input sizes  - often larger than all the atoms in the observable universe - making it unusable in practice. Certain optimisations of matrix multiplication which are O(n^2.x) are galactic.

2.   Quasi-polynomial - an ordinary polynomial but instead of having constant coefficients (the coefficients coming from a ring or in more specific cases a field), the coefficients can vary periodically (with integral period). They are sometimes called pseudo-polynomials.

3.    Lattice - a lattice is basically a splurge of separated points, with some distancing restrictions between points. They are used in geometry and group theory. 

Other Important Mathematical Concepts Used

Gram matrix - named after Danish mathematician and actuary, Jorgen Pedersen Gram.

Monday, 30 November 2026

Ciphertext Indistinguishability

Worth understanding in-depth - used in classifying security algorithms. 

There are various formal definitions e.g. IND-CPA, each of which must be understood in depth.

IND-CPA, incidentally, stands for indistinguishability under chosen plaintext attack.

A Closer Look at ArangoDB

ArangoDB (a graph database system developed by Arango Inc) is another contender for the AI agent "context of choice".

A Closer Look at ArcadeDB

ArcadeDB styles itself as "The context layer from AI agents" and it has good rationale for doing so. Structurally it is an "Open Source Multi-Model Graph Database" which is in fact what agents need.

Founder Luca Garulli has written a number of articles on ArcadeDB.

Open Source Graph Databases for AI

Some open source graph alternatives are:

ArcadeDB, Memgraph, FalkorDB, ArangoDB, HugeGraph, and LadybugDB

Some of these are multi-model database management systems, which means they support graphs as well as other formats.

Commercial alternatives include Neo4J. However, open source graphs also have commercial dimensions, for example support subscriptions with defined service level agreements.

Consistency across data models is one compelling reason to use a multi-model database. A reason not to would be single vendor lock in (SVLI), and the more dangerous form single obscure vendor lock in (SOVLI).

SurrealDB is another challenger in the AI agent context space. It is also open source and in Rust.

Sunday, 29 November 2026

Roles in Postgres

CREATE ROLE defines a new database role in Postgres. Its syntax is:

CREATE ROLE name  [ [WITH]  option  [..] ]

This creates a new role to a PostgreSQL database cluster. 

A role is an entity that can own database objects and have database privileges; a role can be considered a "user" or a "group" depending on how it is used.

Roles can grant permissions to other roles.

The following sections of the PostgreSQL manual should be read in conjunction with CREATE ROLE documentation.