Drafting Requirements and Design Documents for Campaign Setup: Context and Token

The core data for this category comes from advertising platform APIs, user profile tag libraries, budget scheduling tables, and attribution tool logs.

What the data for this category looks like

The core data for this category comes from advertising platform APIs, user profile tag libraries, budget scheduling tables, and attribution tool logs. Daily work produces documents including campaign setup frameworks, audience targeting rules, budget allocation details, and conversion event configuration lists. Fields cover targeting dimensions, monetary values, and activity time nodes. Data updates occur daily or before a single campaign launches. Core content requires repeated verification of targeting matching accuracy and budget rationality.

Documents for campaign setup include structured content such as multi-dimensional targeting rules, budget values, and conversion events. They must associate external data from multiple sources including advertising platforms and user profiles. The context window must accommodate multiple long text segments and cross-source data fragments. Data updates occur at a relatively high frequency, so the context must synchronize latest budget adjustments and targeting changes in real time. Most document fields are strongly correlated business parameters. When recalling context, logical relationships between fields must be retained to avoid losing business semantics after splitting. If the token limit is insufficient, key configuration segments will be truncated, leading to campaign launch failures or budget configuration errors.

How to set the configurations

Configuration ItemRecommended ValueBasis for This Value
maxContext8000–12000 tokenCampaign setup documents typically include multiple segments of targeting rules and budget details, and need to accommodate at least 3 complete historical campaign setup segments and current configuration content
quoteMaxToken1500–2000 tokenThe core configuration segment of a single campaign setup (such as targeting combinations, budget allocation) must be fully retained to avoid truncation of key business parameters
Context recall countTop 6 entriesMatch document segments related to campaign setup, avoiding excessive irrelevant content from occupying token quota
Context recall overlap200–300 charactersRetain the logical connection between adjacent configuration segments, preventing loss of the correspondence between targeting rules and budgets after splitting
Real-time context synchronizationEnabledAdapt to the high-frequency update characteristics of campaign setups, ensuring that the latest budget and targeting configurations are included when called

This configuration is based on the interface logic of FastGPT v4.17.0.

Three common mistakes

  • Phenomenon: The interface shows that maxContext is set to 12000 token, but when generating a campaign setup document, audience targeting rules are truncated and complete configuration cannot be generated. Cause: Targeting data segments exported from the advertising platform were not included in the context window, causing valid business content to exceed the actual available token quota.
  • Phenomenon: The maximum response token is set to 3500, but replies for some conversion event validation only return content with a length of 200 tokens. Cause: The association fields between conversion events and attribution tools were not retained during context recall, so the model cannot call complete business parameters to generate a complete reply.
  • Phenomenon: After FastGPT deployed in a cloud space is connected to a WeChat Official Account, uploaded campaign setup documents cannot be loaded. Cause: The cloud space did not configure token-related parameters for context synchronization, resulting in failure to obtain complete document content segments.

How to confirm the configuration is complete

Manually import a complete campaign setup document, and check whether the context window includes all targeting rules, budget details, and conversion event configurations. Trigger a conversion event validation request, and check whether the reply length matches the preset maximum response token setting, with no obvious truncation. For deployments in cloud spaces, confirm that relevant parameters for context synchronization have been configured to ensure the Official Account can normally pull document content. Adjust the context recall count, and verify that the recalled document segments are strongly correlated with the current campaign setup business scenario, with no irrelevant content mixed in.

The values provided are common starting points and should be evaluated against deployment-specific samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.