Code and Change Review Assistance for Campaign Setup: Multi-turn Dialogue and Prompting

Data sources for the campaign setup scenario include advertising platform APIs, user profile tag libraries, budget scheduling tables, and attribution

What Data for This Category Looks Like

Data sources for the campaign setup scenario include advertising platform APIs, user profile tag libraries, budget scheduling tables, and attribution tool reports. Data updates occur daily or when a single campaign starts, to support real-time adjustment needs for advertising campaigns. Daily produced documents include campaign setup outlines, audience targeting settings, budget allocation plans, conversion tracking configuration items, and more. Fields cover targeted audience tags, daily budget amounts, conversion event IDs, delivery time periods, and other relevant items. Units include yuan, impressions, hours, and others. Field naming conventions vary slightly across different advertising platforms.

What Constraints These Characteristics Impose on Multi-turn Dialogue and Prompting

Dispersed data sources and frequent updates require multi-turn dialogue to synchronize the latest budget, targeting, and other configuration information in real time. This prevents configuration errors caused by using expired data. Many document fields and complex structures require prompts to clarify field priorities and relationships between modules, to avoid confusion across cross-module configurations. Differences in field naming across advertising platforms require contextual memory of the current platform’s rules used by the user, to ensure configuration items match the platform’s requirements. Additionally, scenarios where multiple users share an application require dialogue contexts to be isolated by operating subject, to prevent cross-contamination of configuration data between different users.

How to Configure Settings

The following configurations are based on FastGPT v4.17.0.

Configuration ItemRecommended ApproachRationale
chatIdBind to the unique identifier of the current operating userIsolates historical dialogue data for different users, avoiding cross-contamination of contexts
messagesRetain the most recent 8 rounds of dialogue contentAdapts to the multi-step configuration workflow of campaign setup, balancing context completeness and response speed
variablesPredefine common fields such as targeting tags and budget thresholdsReduces repeated data entry and improves configuration efficiency
Single dialogue context limit6000–8000 tokenCalibrated based on actual testing, matching the total number of fields in campaign setup documents
Historical dialogue recall limitTop 6 recordsAligns with the short-cycle decision rhythm of advertising campaigns

Three Common Misconfigurations

  • Empty Human field in response record preview: The messages parameter structure for user input is not passed correctly, causing the system to fail to properly parse the dialogue context.
  • Different users cannot view their own historical dialogues: No independent chatId is assigned to each user, resulting in session data being shared globally and preventing single-user context isolation.
  • Model context overflow: The number of retained messages rounds or context length is not limited, causing input content to exceed the token limit supported by the model and triggering an error.

How to Confirm Configuration Is Complete

  • Test initiating dialogue with two different unique identifiers, and verify that each user’s historical dialogue only displays interaction content corresponding to their own operations.
  • Input multi-turn configuration instructions including targeting settings and budget amounts, and confirm that subsequent responses can associate previously mentioned configuration information.
  • View the messages field returned by the interface, and confirm that it contains the current dialogue’s user and assistant interaction content.
  • Input instructions exceeding the preset context length, and confirm that the system can correctly prompt about context limit violations or automatically truncate redundant content.

The values provided here are common starting points and should be evaluated against the reader’s own 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.