person.dev

A small Clojure and Ollama experiment.

A side path about using Clojure as a deterministic layer around freeform model output, mostly because it scratched an itch for me.

The flow

1

First pass

Ollama answers a prompt and returns freeform text plus raw tags.

2

Normalize

Clojure maps the raw tags into a neutral schema.

3

Translate

Clojure maps the neutral schema into culture-shaped tags.

4

Run again

Ollama answers the same prompt again under each tag set.

5

Compare

The outputs can be compared side by side.

One sample run

The part I found most interesting is that the last pass can change meaningfully even without an extra style paragraph in the prompt. If the normalized tags themselves are translated into a culture-shaped internal vocabulary, that vocabulary alone can steer the model in a different direction.

First pass:
Focus on clear goals and objectives, consider all team members' needs and priorities.

Raw tags pass:
Clearly define the team's objectives and priorities. Develop a detailed, measurable roadmap for the release. Identify and engage with key stakeholders to ensure their needs are met.

Normalized pass:
Define clear release goals and objectives. Identify key features and functionality. Involve the entire team in the planning process.

Cultural pass:
Clearly define release goals and objectives. Establish cross-functional ownership and accountability. Plan for continuous testing and iteration.

Small code excerpt

That seems like a useful narrow role for Clojure around LLMs: not as the model layer, but as a deterministic transformation layer around the model.

If I keep exploring this, the next thing I want to understand is where this kind of normalization genuinely improves system behavior and where it just flattens useful nuance.

(def allowed-tags
  {:priority #{"priority" "importance" "urgent" "high" "important" "critical"}
   :planning #{"plan" "planning" "roadmap" "release" "timeline" "deadline" "scope"}
   :team #{"team" "people" "staff" "collaboration" "stakeholders"}
   :communication #{"communication" "announce" "announcement" "message" "messaging"}
   :quality #{"testing" "quality" "qa" "stability" "reliability" "bugs" "bugfixes"}
   :iteration #{"iteration" "iterate" "iterations" "feedback" "refinement"}})

(def culture-schema
  {:steady-execution #{:planning}
   :focused-priority #{:priority}
   :shared-ownership #{:team}
   :clear-communication #{:communication}
   :craft-quality #{:quality}
   :continuous-learning #{:iteration}})