Master's Thesis: Context and Memory for On-Device LLM Policy Selection – Huawei Sweden R&D, Lund · Japplify