Requirements and Design Document Drafting for Channel Attribution and Lead Distribution: Context and Token

Core data for this category comes from advertising platforms, CRM systems, attribution SDKs, and form systems. Regularly produced documents include

What the data for this category looks like

Core data for this category comes from advertising platforms, CRM systems, attribution SDKs, and form systems. Regularly produced documents include attribution rules, lead distribution tables, channel reports, and exception checklists. Data update frequency is typically daily or weekly. Each document includes core fields such as channel ID, lead ID, conversion time, and assigned sales ID. Field formats vary slightly across different systems, and must be unified and aligned before context processing can be performed. The total token count of a single batch of channel report data is usually high, and direct processing may exceed the model's context limit.

What constraints these characteristics impose on the "context and token" workflow

Data sources for this category are scattered, and format differences exist. Unified field rules must be implemented during context processing, otherwise lead attribution judgment errors will occur, affecting the most time-consuming steps: channel parameter verification, duplicate lead deduplication, and sales attribution confirmation. Since data updates daily or weekly, the context must retain the latest batch of report and rule data to avoid introducing outdated information. Single documents have a large total token count, and direct uploads will exceed the model's context limit. Documents must be sliced according to their structure before processing. Additionally, continuous queries must link core fields such as lead ID and channel ID, otherwise the required association verification cannot be completed.

Configuration Settings

Configuration ItemRecommended ValueRationale
maxContext8000–12000 tokenCovers the total token count of a single batch of attribution rules, channel reports, and lead distribution tables, preventing core fields from being truncated
quoteMaxToken2000–3000 tokenMatches the token requirements for attribution data and attribution rules of a single lead, ensuring complete referenced content
Context slice length800–1200 charactersAdapts to the content granularity of single blocks in attribution rules and lead distribution tables, reducing errors from cross-block association
Context recall countTop 3 entriesChannel attribution data updates daily or weekly, and excessive historical data will interfere with current tasks
Context slice overlap ratio10%–15%Retains core field information such as channel ID and lead ID in adjacent slices, preventing association failures caused by cross-block segmentation

Three Common Misconfigurations

  • Phenomenon: After uploading a complete channel report, the system prompts context overflow, only loads the first half of the content, and the channel ID field is missing. Cause: Context slicing parameters are not configured, and documents with a token total exceeding the model's supported limit are uploaded directly.
  • Phenomenon: When calling the FastGPT workflow API, context cannot be associated, and irrelevant content is returned starting from the second question, even though context is configured in the workflow panel. Cause: Global session storage is not bound in the workflow's context module, or the maxContext parameter is set too small, causing historical session data to be automatically truncated.
  • Phenomenon: After configuring context recall, the returned reference content contains a large amount of irrelevant exception checklist data, interfering with the current channel parameter verification task, leading to distorted subsequent ROI calculations. Cause: The quoteMaxToken parameter is not restricted, and the recalled content exceeds the matching range of the current task, mixing in document fragments not required for this task.

How to Verify Correct Configuration

  • Upload a single complete channel report and attribution rule document, check that the loaded content is complete, with no automatic truncation or context overflow prompts.
  • Initiate two consecutive queries linked to the same lead ID, check that the second query can correctly associate the lead attribution information mentioned in the first query.
  • Access the context configuration panel in FastGPT v4.17.0, confirm that the values of all setting items match the preset ranges.
  • Trigger a duplicate lead deduplication test task, check that the returned reference content only includes the attribution rules and lead data required for the current task, with no irrelevant exception checklist content.

The values provided are common starting points and should be measured 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.