Manuscript Offprint

arXiv:2610.09985

Marrying Pricing and Advertising with LLMs

Alessandro Barro, Francesco Bacchiocchi, Francesco Emanuele Stradi, Alberto Marchesi

ABSTRACT

We study a sequential pricing problem in which a seller jointly posts a price and an advertisement generated by a large language model (LLM). The seller aims to maximize revenue under an unknown product demand that depends on both decisions, while observing only whether each offer leads to a purchase. We propose an online actor-critic algorithm that combines low-rank adaptation (LoRA) of a pretrained LLM with a demand model fitted to available data. At each round, the actor generates an advertisement, and the critic estimates purchase probabilities to guide price selection. Then, the resulting feedback is used to update both the actor and the critic, with the critic's revenue estimates providing a baseline for policy gradient updates of the actor. To evaluate our approach, we develop an evaluation framework with three synthetic demand models and a demand simulator built from real-world marketplace data. Finally, we compare our algorithm with benchmarks that do not jointly optimize price selection and advertisement generation, achieving expected revenue gains over the reference policy of 5.69%, 5.18% and 55.96% under the three synthetic demand models and 5.81% under the marketplace simulator.

1 Introduction

Online marketplaces have deeply changed how sellers set prices. Indeed, a seller can revise the price of a product at negligible cost and observe how buyers respond to the new price shortly after. Moreover, a single seller may offer a large catalog of products, so that prices must be set by automated rules rather than by hand (Misra et al., 2019). However, the demand for each product is typically unknown in advance. Thus, the seller must learn which prices are profitable while collecting revenue from the same interactions used for learning. This trade-off is captured by the framework of sequential posted pricing, in which a seller repeatedly offers a product to arriving buyers and uses the resulting purchase feedback to guide subsequent price selection (Kleinberg and Leighton, 2003). Building on this framework, a large body of work studied how to learn an unknown demand from purchase outcomes (see, e.g., Besbes and Zeevi, 2009, and the survey of den Boer, 2015).

Notice that the price is not the only decision that shapes demand. Indeed, the seller also decides how to present the product, and the advertisement shown to buyers may change their willingness to purchase. In a large-scale experiment, Bertrand et al. (2010) studied loan offers mailed by a lender to more than 50,000 former clients, randomizing independently the interest rate and several features of the letter's content. Some content features affected loan demand as much as large price changes. For example, showing a single example loan instead of four had the same effect as lowering the monthly interest rate by 2 percentage points. Hence, pricing and advertising cannot be optimized separately. Indeed, an advertisement that increases demand also shifts the revenue-maximizing price, and conversely the value of an advertisement depends on the price at which the product is offered.

At the same time, the way sellers produce advertisements is changing. Indeed, product descriptions in online marketplaces are increasingly generated by large language models (LLMs) rather than written entirely by hand. For instance, Amazon released LLM-based tools that generate product titles and descriptions from a short input provided by the seller. 1^{1} Moreover, recent works fine-tuned LLMs on performance feedback to produce more effective advertisements. Jiang et al. (2025) trained an LLM through reinforcement learning, using historical advertisement performance as a reward. In a ten-week experiment involving nearly 35,000 advertisers, the trained model increased click-through rates by 6.7% with respect to a supervised imitation model. Similarly, Chen et al. (2025) and Wang et al. (2026) aligned advertisement generation with click-through and conversion rates observed online. However, these works only optimized the advertisement, and did not consider the price of the advertised product.

When advertisements take the form of natural language, a joint pricing and advertising policy must also decide how content is generated and adapted in response to feedback. LLMs offer a natural way to parametrize this decision, generating advertisements conditioned on information about the product and its environment. In this paper, we study a sequential setting where a seller presents each arriving buyer with a price and an LLM-generated advertisement, and observes only whether a purchase occurs. This binary feedback reflects the combined effect of both decisions and reveals nothing about how the buyer would have responded to alternatives. Since the space of advertisements is too large to explore exhaustively, the seller must generalize from previous interactions, both when generating text and when selecting prices. In addition, optimizing solely for revenue may lead the policy to deviate substantially from the reference model, potentially compromising the fluency and coherence of the generated content. Controlling this deviation helps preserve the language capabilities of the pretrained model while allowing the seller to adapt its advertisements. In this work, we address these challenges through an online actor-critic approach that combines adaptation of a pretrained LLM with demand estimation, using purchase outcomes to update both components and guide their joint optimization.

References (57)

  • Dynamic pricing and learning with Bayesian persuasion
  • Back to basics: Revisiting REINFORCE-style optimization for learning from human feedback in LLMs (opens the publisher in a new tab)
  • Finite-time analysis of the multiarmed bandit problem (opens the publisher in a new tab)
  • What's advertising content worth? evidence from a consumer credit marketing field experiment (opens the publisher in a new tab)
  • Dynamic pricing without knowing the demand function: Risk bounds and near-optimal algorithms
  • CTR-driven ad text generation via online feedback preference optimization (opens arXiv in a new tab)
  • Optimal advertising and optimal quality
  • The effects of ads on beliefs and implications for consumer search
  • Deep learning for individual heterogeneity: An automatic inference framework (opens arXiv in a new tab)
  • LoRA: Low-rank adaptation of large language models
  • Improving generative ad text on Facebook using reinforcement learning (opens arXiv in a new tab)
  • The value of knowing a demand curve: Bounds on regret for online posted-price auctions (opens the publisher in a new tab)
  • Buy 4 REINFORCE samples, get a baseline for free! In ICLR 2019 Workshop on Deep Reinforcement Learning Meets Structured Prediction, 2019
  • Dynamic online pricing with incomplete information using multiarmed bandit experiments (opens the publisher in a new tab)
  • A reinforcement learning-enhanced LLM framework for advertising text generation (opens arXiv in a new tab)
  • Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992. doi: 10.1007/BF00992696. (opens the publisher in a new tab)
  • Fine-Tuning Language Models from Human Preferences
  • Write $\theta(\psi) := \theta_{\mathrm{ref}} + \Delta\theta(\psi)$
  • Conditional on $\mathcal{F}_{\tau-1}$, advertisements are sampled independently from $\pi_{\theta_{\tau}}(\cdot \mid c(z))$
  • Indeed, the low-rank adaptation map $\Delta\theta$ is polynomial in $\psi$, and the actor's logits and softmax probabilities are differentiable in their respective inputs
  • Consequently, the likelihood-ratio identity yields
  • Taking conditional expectations in Equation (9) and applying Equations (10) and (11) proves Equation (8), concluding the proof
  • We retain the notation of Algorithm 1: T counts individual offers, $N = T/B$ counts batches, p is the normalized price, and q denotes a pricing rule
  • Disabling the adapters recovers Reference
  • This evaluation integrates out Bernoulli purchase noise while retaining variation in generated advertisements, and excludes the KL penalty used during optimization
  • Marketplace tests use 100 advertisements per policy and product, averaged first within products and then equally across products
  • Let $N_j$ and $\overline{r}_j$ denote the number of observations and mean observed reward for price $p_j$, and let $n = \sum_j N_j$ count completed offers
  • Appendix B.4 specifies changes to initial critic support, exploration, and anchoring in the offline-data ablation
  • Both steel-bottle contexts explicitly permit this claim
  • Calibration is deterministic and uses neither policy outcomes nor parameter estimates from the cited credit studies
  • The prompt permits the token [DISCLOSE_PRICE], which is replaced with the selected dollar price after pricing
  • Each curve linearly interpolates between the three observations in Table 4; the factor 5.99 converts normalized actions back to dollar prices
  • Plain Ad and Price Ad demand are interpolated separately over the three observed dollar prices
  • Each advertisement receives one uniformly sampled price within each of eight equal-width strata of the admissible interval, followed by independent Bernoulli outcomes from the corresponding demand model
  • Prices are normalized; the feature indicates durable in logit/probit and the disclosure token in price disclosure
  • Under logit and probit, both the mean selected price and purchase probability increase; under price disclosure, mean price decreases while purchase probability and disclosure frequency increase
  • This identifies adaptation to the declared demand mechanism, without measuring general advertisement quality
  • We therefore estimate marginal training revenue using the logged prices and the offline reference feature frequency
  • The offline feature frequencies are 0.8251953125 for logit and probit and 0.3525390625 for price disclosure
  • Preprocessing retains the five categories in Section 4.2 and removes missing required fields, nonfinite or nonpositive prices, targets outside [0, 1], duplicate listing identifiers, and source advertisements outside 8-60 words
  • Language: English Output format: Title: <a short factual title naming the product> Description: <one short factual sentence> The complete advertisement must contain between 8 and 60 words
  • The symbolic fields S and z contain the five fixed marketplace examples and current product context, respectively
  • These sets contain 7,291, 2,081, 7,291, 2,081, and 2,082 listings, respectively
  • LoRA adapters are disabled during encoding, which is limited to 384 tokens
  • Neither network receives a separate context vector, so context enters through the generated text and product-specific price conversion
  • Trained improves on 91 of 100 products: all 20 products in Home Appliances, Laptops, and Tablets/E-readers, 16 in Audio/Video, and 15 in Mobile Phones
  • Each coordinate averages 100 advertisements per policy and product; the dashed diagonal line indicates equal expected revenue
  • The 95% intervals use 5,000 paired-product bootstrap resamples
  • The actor-training product remains Asus X54H, evaluation uses the same 20 held-out Laptop products, and the environment retains its full-data fit
  • The schedule increases exploration as offline support decreases and reduces it as online feedback accumulates
  • Revenue ranges from 0.1802 to 0.1895 with 25-100% of the initial data available, and falls to 0.1670 at zero data, 7.32% below the full-data control
  • The 95% intervals use 5,000 bootstrap resamples of the 20 held-out Laptop products
  • Points average the same 20 held-out Laptop products; the error bars show 95% product-bootstrap intervals conditional on one training run per data budget
  • We average each over batches and all B positions, then divide the mean critic error by the mean error of the baseline using observed rewards
  • Left: baseline MSE as offline support decreases, on a logarithmic scale
  • All categories remain below one with 25-75% data, although the ratios are not monotone
  • This common noise floor limits the effect of baseline improvement on the complete advantage