TriVec Labs

Engineering

Engineering

Practical notes on AI systems, distributed computing, and production engineering.

RAGSeptember 1, 2026

Automating Medical Coding Final Part

Once a medical coding pipeline maps a clinical concept to an ICD-10-CM code, it is tempting to declare victory and celebrate but story does not end here given…

7 min read

RAG
RAGSeptember 1, 2026

Automating Medical Coding Part 1

To a novice engineer healthcare coding looks simple from the outside. A clinician writes a discharge summary. Medical Coder reads it. A set of ICD-10-CM codes…

5 min read

RAG
RAGSeptember 1, 2026

Automating Medical Coding Part 2

There is a particularly dangerous phase in building an LLM system. It produces an answer. The answer looks correct. You celebrate. Then you try 100 examples…

3 min read

RAG
Local AISeptember 1, 2026

Beating The Black Terminal

For local AI development, the ritual usually involves installing Python, Docker, an inference server, a vector database, several model files, twelve libraries…

7 min read

Engineering
Local AISeptember 1, 2026

Building First LLM

All Experiments with Large Language models begin with chat windows You type a question, the model produces an answer, and yada yada. This serves the purpose,…

7 min read

Engineering
LLM GatewaysSeptember 1, 2026

Building LLM Router

Most LLM applications begin with an llm call response = client.chat.completions.create( model="premium-model", messages=messages, ) This is a reasonable…

7 min read

LLM Gateway
LLM GatewaysSeptember 1, 2026

Deterministic Testing The LLMs

The first version of an LLM application usually has a test that looks suspiciously like this: response = openai.chat.completions.create(...) assert "refund" in…

5 min read

Testing
CachingSeptember 1, 2026

Semantic Cache To LLM Rescue

(Repo url) LLM applications have an unusual relationship with repetition. Users repeatedly ask: How do I reset my password? Then they ask: I forgot my…

8 min read

Caching
LLM GatewaysSeptember 1, 2026

Testing LLM Workflows Locally

(Repo and examples can be found here) Knowing that an LLM should be mocked is the easy part. The harder question is how to mock it without creating a cardboard…

7 min read

AgentsTestingLocal AI