Business Process Guidance for Territorial Spatial Planning Compilation and Implementation Evaluation: Multi-turn Dialogue and Prompt Engineering

Business Process Guidance for Territorial Spatial Planning Compilation and Implementation Evaluation: Multi-turn Dialogue and Prompt Engineering

What the data for this category looks like

The data for this category primarily comes from the territorial spatial basic information platform, natural resource survey and monitoring data, population and economic statistics, and remote sensing images. The update frequency is annual. Documents generated on an ongoing basis include territorial spatial overall plans, detailed plans, special plans, planning implementation evaluation reports, and public opinion summaries. Documents contain fields such as spatial scope boundaries, binding indicators, implementation progress items, and public feedback content. Common units include square kilometers, percentages, and annual cycles. The data structure is mostly a hybrid format combining structured tables and spatial vector files.

Constraints imposed on multi-turn dialogue and prompt engineering by these characteristics

Annual updated data requires dialogue to guide users to clarify the annual version of data, to avoid calling outdated information. Multi-source heterogeneous data structures require multi-turn dialogue to gradually decompose dimensions such as spatial scope and indicator types, to avoid loading full data at one time which causes timeouts. Complex document structures require prompts to guide users to first clarify the planning type and evaluation stage, to narrow the retrieval scope. The need to organize public opinions and special facility layouts requires dialogue to gradually collect specific user demands, to avoid missing key information and adapt to the most time-consuming multi-source data aggregation and coordination link for this category.

Configuration Settings

Reference only; verify against the target FastGPT release and deployment documentation.

Configuration ItemRecommended ApproachRationale
chatIdBind to the unique identifier of a single planning projectDistinguish dialogue contexts for different territorial spatial planning projects, avoid cross-project data confusion
messagesRetain the first 20 rounds of dialogue content, calibrated based on actual testingAdapt to the long context requirements of planning documents, avoid loss of key historical context
variablesPreset two types of variables: planning type and evaluation stageQuickly anchor document data for the corresponding category, narrow the retrieval scope
Maximum context length8000–12000 token, calibrated based on actual testingAccommodate detailed information such as planning indicators and spatial scope from multi-turn dialogue
Single search limitTop 8 search resultsBalance the comprehensiveness of planning data and dialogue response speed
Dialogue timeout threshold600 secondsAdapt to the loading duration of multi-source spatial data, avoid timeouts caused by excessive data volume

Three Common Mistakes

  • Phenomenon: Dialogue timeout, interface displays request timeout prompt or status code 504. Cause: No reasonable dialogue timeout threshold set, or context length not limited, leading to loading excessive spatial data and document content on each call, exceeding system response limits.
  • Phenomenon: Accidentally introducing content outside the territorial spatial planning knowledge base when calling ordinary dialogue. Cause: No exclusive category filtering variable configured in variables, leading the system to call full knowledge base data by default.
  • Phenomenon: Unable to set a single dialogue to trigger a prompt only once. Cause: No exclusive variable for the single prompt switch configured in variables, leading the system to retain the multi-turn prompt logic by default.

How to Confirm Proper Configuration

  • Check if chatId is bound to the unique identifier of the current planning project, verify that dialogue contexts for different projects are isolated, with no cross-project data leakage.
  • Trigger a multi-turn dialogue, check if returned search results only include territorial spatial planning documents, with no content from unrelated fields.
  • Test the response duration of a single dialogue, confirm it does not exceed the preset dialogue timeout threshold, with no timeout occurrences.
  • Adjust the planning type variable in variables, check if the dialogue can correctly switch the document retrieval scope for the corresponding category to match requirements for different planning types.

The values provided are common starting points and should be evaluated against local 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-09-28.