Skip to content
Projects

Own project

Topic Model

77% fewer LLM calls with the same results, measured by its own evaluation harness.

Context
A research tool that maps the topics behind a search query, to help writers plan content.
Role
My own tool and IP. I designed and built all of it, from the NLP pipeline to the AWS infrastructure.

Decisions

  1. Chose measuring live runs in an evaluation harness over tuning the LLM judge by feel, because every change has to show it keeps the same results. That's how LLM calls fell by 77%.
  2. Chose a Python NLP pipeline (spaCy, embeddings) to find topics and related terms, with an LLM only judging them over asking an LLM for the topics, because each step can be measured on its own, and the judge only checks what the pipeline finds before it counts.
  3. Chose typed, ports-and-adapters Python behind a FastAPI service, with generated API types for the React front end over hand-written client types, because the service and the front end can't drift apart, and Ruff and ty gates in CI keep it that way.
Topic Model pipelineA search query's top results go through a spaCy and embeddings pipeline that finds candidate topics, and an LLM judge checks them before they reach the topic map. An evaluation harness measures every change. It runs as a FastAPI service and queue workers on AWS, and the React front end uses generated API types.FastAPI and queue workers on AWSSearch queryTop resultsspaCy and embeddingsfind topics and termsLLM judgechecks each topicTopic mapEvaluationharnessmeasuresevery changegenerated API typesReact front end
Topic Model pipeline
  • The source is private: Topic Model is my own tool and IP.
  • Python
  • FastAPI
  • spaCy
  • AWS Bedrock
  • OpenAI
  • React
  • Terraform