I think this is what the n-gram table in Qwen 4 (and 3.8-Flash-Next) is for. We’ll see if it comes down to the 27b variant.
A RAG solution would make time to first token awful.