Generating web automation code from a successful browser session
ASG-LLM combines browser traffic, selective function retrieval, and execution feedback to generate scraping code for security-sensitive web services.
What they studied
The authors studied how to generate web scraping modules for services where automation must handle dynamic frontends, session-bound tokens, and undocumented parameter-generation logic. These conditions make reproducing a successful browser interaction difficult: developers typically inspect traffic, work out how parameters are generated, and repeatedly test internal functions.
Their pipeline, ASG-LLM, starts with a single successful browser session trace. It captures HTTP(S) traffic, filters out irrelevant requests, and builds a representation of the core interaction that preserves dependencies between requests.
When the trace does not contain enough information to reconstruct security-critical parameters, a component called FUNC Retriever retrieves a small set of reusable internal function descriptions. It uses HyDE-guided selective retrieval to help the LLM choose parameter-generation routines by behavioral similarity rather than keyword matching. The descriptions support this selection without exposing proprietary implementation code.
The generated modules then run in a controlled environment. Structured feedback from failures guides iterative repairs.
What they found
The authors evaluated ASG-LLM in case studies involving banking and public-sector portals. They report that traffic analysis and basic code implementation dropped from hours to minutes, while security-handling work fell from a full-day task to a couple of hours.
For internal function recommendations, HyDE-based selective retrieval improved Top-1 accuracy from 30% to 70% and Top-3 accuracy from 60% to 90%, compared with a full-context baseline. These measures describe whether the correct recommendation appeared first or among the first three choices.
The abstract reports case-study results, not a guarantee that the pipeline will work across all security-sensitive services.
Why it matters for builders
For builders using AI coding tools, the useful pattern is to combine concrete examples, focused context, and execution feedback. Here, the example is an actual successful interaction, the context is a selected set of function descriptions, and the feedback comes from running generated code.
This is particularly relevant to web automation projects with existing internal helper routines. The approach suggests a way to guide AI toward compatible functions without placing their proprietary implementation code in its context.
Source: "ASG-LLM: An LLM-based pipeline for automated scraping code generation in security-sensitive environments" (2026-08-12, Array). This is our summary of the paper's abstract — read the original for full details.
There's more detail at the original source.
Open the sourceRelated reading
What shapes developers’ trust in AI coding tools?
A survey of 238 developers links trust in generative AI to output quality, practical value, and staying aligned with task goals.
Read more →AI Helped a Student Team Reduce Agile Workflow Overhead
A six-month software project found AI useful for task planning, technology research, and onboarding, while shared review helped preserve developer ownership.
Read more →One-developer case study finds faster code output with an AI agent
An experienced developer produced code 2.34 times faster with one AI agent, but the case study does not establish equivalent gains in quality or overall productivity.
Read more →Weekly vibe-coding tips — coming soon
We're getting this ready. Leave your email and we'll let you know the moment it launches. No fluff, unsubscribe whenever.