Don't classify, hallucinate
softwaredoug.com
Don't classify, hallucinate
1–10 of 118 posts
Re: Don't classify, hallucinate
#2Re: Don't classify, hallucinate
#3Did you validate this by running a A/B test? Main question is were you able to classify back into your known categories correctly all the time, or did the errors compound from the llm hallucination plus embedding search
But no classification is perfect. In search in particular, you will also want to have places for manual intervention for high priority queries.
Re: Don't classify, hallucinate
#4Re: Don't classify, hallucinate
#5Re: Don't classify, hallucinate
#6Re: Don't classify, hallucinate
#7But if accuracy matters, you can't rely on embedding sort to get a closet match. With a real test set they usually don't hold up under scrutiny.
Everything in AI is like this. You get an idea, try it once or twice, "LGTM" and you ship. Then it never survives contact reality.
Embedding sort gives you a better shortlist than the whole list, but you will probably want a heavier model to vet candidates.
Re: Don't classify, hallucinate
#8Additionally you could experiment with a reranker instead of an LLM or after reranking take top-3 results and then feed to LLM as input in order to reduce input token costs.
Re: Don't classify, hallucinate
#9Re: Don't classify, hallucinate
#10I would propose the following, query vector store for 10 closest categories based on a query, feed it to an LLM, in the prompt ask it to produce a single digit 0-9 representing the number of the most appropriate choice. Use plain text prompt, dont inflate token count with JSON. There you go, you just drastically reduced the output pricing. Additionally you could experiment with a reranker instead of an LLM or after r…