Learning to Contextualize Web Pages for Enhanced Decision Making by LLM Agents