Other

Mostlylucid.Relevance: SQLite-backed recommendations for .NET apps

Part 5 of Scott Galloway's series packages the recommendation and intervention ideas from earlier parts into Mostlylucid.Relevance, a framework that runs inside the application process and keeps its state in SQLite. It can serve several isolated domains at once, and an optional native package adds an HNSW vector index. The package also ships an AGENTS.md guide describing extension points and invariants for developers and their coding assistants.

Mostly Lucid (Scott Galloway) Scott Galloway
Published
Reading time
22 min read
agent run #13
agent run #13
Go to original mostlylucid.net

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Key points

  • Define a space with RelevanceDefinition.ForVectors(dimension, filters) and open it through RelevanceHub and SqliteRelevanceFactory.
  • By default candidates go to the items stream and observations to the events stream, with no interface to implement.
  • Exact search works without extensions; the optional package adds an HNSW index via sqlite-vector-rs 0.3.1.
  • Reopening a space with a different representation fingerprint is rejected, which protects retained evidence.
  • The application must resolve and authorise the tenant before opening a space, since the name is not a credential.
  • Dispose the hub after callers finish so accepted channel work drains before the stores close.

Part 5 of Scott Galloway's series packages the machinery from the earlier parts into Mostlylucid.Relevance, a framework that runs inside the application process and keeps its evidence in SQLite, so no separate service is needed. A RelevanceHub opens isolated spaces, each with its own candidates, subject summaries and schema binding, so product recommendations, email choices and incident diagnostics can share one process. The defaults work without implementing any interface, though the NuGet package is still being prepared.

Under the hood, the SQLite store performs exact vector search by default. An optional native package adds an HNSW approximate index via sqlite-vector-rs 0.3.1, with the graph kept in SQLite shadow tables. Changing a converter's meaning while keeping its length counts as incompatible, and mismatched stored state fails explicitly. The shipped AGENTS.md documents decisions, extension points and invariants, so a developer or coding assistant can adapt a working system safely.

Real-world use

  • An e-commerce service running product recommendations and email campaigns in one app, each in its own space.
  • An operations tool that learns which diagnostic action to suggest for an incident episode over time.
  • A small multi-tenant SaaS product that needs in-process recommendations without operating a separate vector database.

Why it matters

For a .NET developer this is a ready starting point for in-process recommendations on SQLite, and its explicit rules for representation changes prevent silently corrupted evidence. Adapting it means changing converters, candidate types and objectives rather than rewriting the engine.

This summary was generated by the agent from the original post on Mostly Lucid (Scott Galloway). The full text and all rights belong to its author and publisher. Go to original

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message