Requirements and Design Document Drafting for Vulnerability Scanning Services: Multi-turn Dialogue and Prompt Engineering

Vulnerability scanning service data primarily comes from vulnerability scanners, asset inventories, CVE databases, and patch announcements. Update

What data looks like for this category

Vulnerability scanning service data primarily comes from vulnerability scanners, asset inventories, CVE databases, and patch announcements. Update frequency is weekly or monthly. Daily produced documents include scanning plans, vulnerability lists, rectification work orders, and rescan reports. Core fields include asset IP addresses, vulnerability CVE numbers, risk levels, repair statuses, and rescan results. The content length of a single document typically ranges from hundreds to thousands of characters. Clear relational links exist between fields; for example, a vulnerability list must be bound to corresponding scanning plans and asset information.

Data sources are scattered and have different update cycles. Multi-turn dialogue is needed to gradually confirm asset scope and scanning targets, avoiding missing critical assets. There are many document fields with close relational links, so prompts must guide extraction and association of corresponding fields to prevent data misalignment. The false positive elimination and rescan result verification steps require comparison with historical data. Limited dialogue context must be retained to avoid redundant information interfering with core processes. The document volume for a single task is large, so the processing length of single-turn prompts must be limited to prevent exceeding model context thresholds.

Configuration settings

The following configurations are based on FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
Maximum single-turn prompt length800–1200 charactersMatches the typical length of single-segment content from vulnerability scanning documents
Context window sizeFirst 10 dialogue history entriesAdapts to the relational needs of weekly updated scanning plans and rescan reports
variables variable bindingBind asset inventory and CVE database pathAutomatically populate standardized, category-specific data fields
chatId session identifierBind single scanning task IDIsolate dialogue contexts for different scanning tasks to avoid data cross-contamination
messages historical contextRetain the most recent 3 rounds of vulnerability troubleshooting dialoguesFocus on core processes of false positive elimination and rescan verification
Multi-turn dialogue trigger conditionTrigger at the asset scope confirmation nodeAvoid initiating redundant dialogue in non-essential links

Three common mistakes

  • Phenomenon: Irrelevant knowledge base content is introduced when calling dialogue. Cause: The processing scope of the prompt is not limited to vulnerability scanning-specific documents, causing non-target data to be mixed into the context.
  • Phenomenon: A single dialogue triggers prompts multiple times. Cause: No execution upper limit is set for single-turn prompt calls, leading to repeated calls to plugins or knowledge base resources.
  • Phenomenon: Empty asset or vulnerability fields are returned in dialogue. Cause: variables are not bound correctly, making it impossible to automatically populate required fields such as asset IP addresses and CVE numbers.

How to confirm configurations are correct

  • Initiate multi-turn dialogue for asset scope confirmation, check that returned content only includes specified fields from scanning plans and asset inventories, with no irrelevant data.
  • Trigger a single vulnerability troubleshooting dialogue, review logs to confirm only one prompt call is executed, with no duplicate request records.
  • Import test scanning task data, check that automatically populated variables in dialogue fully match the source test data.
  • Switch the chatId of different scanning tasks, confirm that dialogue contexts for the two tasks are isolated from each other, with no data crossover.

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.