by ignoramous · 2y ago · 0 comments
> Debugging LLM prompts is just tricky... Customers can confuse the model pretty easily.
Would a RAG like how Vanna.ai uses, help?
> For example, sometimes it forgets to check one or another field
Do prompting techniques like CoT improve the outcome?
> So we need to teach customers to nudge the report generator a bit towards generic terms.
Did you folks experiment with building an Agent-like interface that asks more questions before the LLM finally answers?
NLQ is a somewhat new feature for us, so we don't have a great library to pull from for RAG. Experimenting, I found that having a few-shot examples with some CoT (showing examples of chaining attributes retrieval) sprinkled around did help a lot.
Even still, some queries come out quite ugly, but still functional. I'm thankful that DuckDB is a beast when tackling those :D
> Did you folks experiment with building an Agent-like interface that asks more questions before the LLM finally answers?
That's something I want to figure out next:
1) try to check if a generated query would work but would generate absolutely junk results (cause the model forgot to check something) and ask to rephrase
2) or show results (which may look "real" enough), but give an ability to tweak the prompt. A good example is something like "top 5 products on Cyber Monday" <- which returns 0 products, cause 2024 didn't happen yet, and should trigger a follow up.
We built something similar to query DB. Created two versions, one of which was agent based that had a maker-checker style of generation. Basically one generates and the other checks its correctness and if objective has been acheived.
The accuracy improves in the agent driven framework, at the cost of latency.