work / AI agent · wholesale pricing
Ganit
An AI agent that replaced a manual back-office pricing job at a wholesale distributor. Dealers ask for a price in plain language over Telegram; the agent answers instantly and correctly, without ever inventing a number.
01 / the problem
Why it exists
At a wholesale distributor, staff looked up dealer-specific pricing in spreadsheets during live phone calls. Slow, error-prone, and it didn't scale. Pricing is abstracted per dealer (different dealers, different prices), which is a real pain point for a lot of SMBs.
02 / what it does
The product
- ▸A dealer messages the bot in natural, messy language: "need price on the 8 channel power supply".
- ▸The system finds the right product despite jargon and typos, disambiguates when the query is ambiguous, and returns the correct dealer-specific price.
03 / architecture
How it works
01 · Hybrid retrieval
Postgres search blends three signals with tunable weights: pgvector cosine similarity, pg_trgm word similarity, and Postgres full-text. Three complementary recall strategies, so a bad spelling or an unusual phrasing still surfaces the right product.
02 · LLM reranker
Temperature 0, JSON-mode output. It reorders the retrieval candidates and bridges domain jargon: "power supply" maps to SMPS, "8 channel" to 8ch. The model earns its keep on semantic judgment over a small candidate set, not free-form generation.
03 · Disambiguation via similarity gap
When the top candidates are too close in score, the agent asks a clarifying question instead of guessing. It knows when it doesn't know.
04 · Deterministic price math
The actual price is never generated by the model. Retrieval plus rerank find the product; the price is computed in code. The model is kept out of anything that has to be exact.
04 / principle
Never invent a number
Don't ask the model to produce what you can look up or compute. The LLM was maybe 20% of this. The real work was making it trustworthy enough to quote real prices to real dealers: grounding it so it never invents a number, handling fuzzy queries, and deciding what to keep out of the model's hands completely.
05 / stack & outcomes
Stack
Outcome
Live in production, used daily by wholesale distributors and their dealer networks. Grew from an idea into a product with a small team I hired around it.