Multi-round Dialogue and Prompt Engineering for Investment Research Knowledge Base Construction

The data sources for investment research include regular financial reports from group headquarters and its subsidiaries, industry-specific research

What this category of data looks like

The data sources for investment research include regular financial reports from group headquarters and its subsidiaries, industry-specific research reports, regulatory filing documents, internal project review documents, and position detail ledgers. Data update frequencies vary: regular financial reports are updated quarterly, industry research reports are updated in real time alongside market trends, and internal documents are synchronized as needed. Documents include structured tables (such as position details and revenue line items, with fields including subsidiary name, reporting period, position market value, etc., with units mostly in ten thousand yuan or hundred million yuan) and unstructured analytical text. The length of individual documents varies widely.

Constraints on multi-round dialogue and prompt engineering

The investment research data has features including nested multiple entities, inconsistent update frequencies, and mixed structural types, which create multiple constraints for multi-round dialogue and prompt configuration. Cross-subsidiary field association requires prompts to explicitly specify dialogue entity dimensions to avoid data confusion during multi-round conversations. Differences in update frequencies require limiting data time ranges in prompts to prevent retrieval of expired information. The wide variation in document length requires reasonable control of multi-round context length to avoid triggering model context overflow, and also requires adapting to segmented retrieval rules to cover complete information.

How to set configurations

Configuration ItemRecommended ValueRationale
maxContext8000–12000 charactersSupports context retention for multi-round cross-entity conversations involving multiple documents across subsidiaries, prevents model context overflow
recallTopKTop 6–8 entriesInvestment research data includes structured details and unstructured analysis. Too many retrieved entries dilute core information, while too few fail to cover associated documents needed for cross-subsidiary comparisons
similarityThreshold0.72–0.80High precision is required for investment research data fields. A threshold that is too low will introduce historical data from unrelated subsidiaries, while a threshold that is too high will fail to retrieve associated documents from the same entity
chunkSize1500–2000 charactersIndividual investment research reports have large differences in length. This segmented length balances long document splitting and single-block information integrity, adapting to block-by-block retrieval needs in multi-round conversations
promptTemplateSpecified hierarchically by "group entity - subsidiary - report type - reporting period"The data has a nested multi-entity structure. Hierarchical prompts clarify data association rules during multi-round conversations, avoiding field confusion
UPLOAD_FILE_MAX_SIZE100 MBInvestment research documents often contain detailed data tables. This upper limit adapts to the size of most individual research reports or financial reports, preventing upload failures

The parameter values provided on this page are common recommended starting points for configuration. Actual values are affected by material format, data volume, and business rules. Specific issues require case-by-case analysis. It is recommended to test on your own samples before finalizing settings.

Three common mistakes

  • Phenomenon: Global variables are not retained across sessions during multi-round conversations, and field values are empty or reset. Cause: Persistence configuration for session-level global variables is not enabled, or the variable scope is set to a single request instead of the session dimension.
  • Phenomenon: After uploading investment research documents via API call, subsequent conversations cannot retrieve the documents. Cause: The automatic indexing parameter is not specified in the API request, or the uploaded file size exceeds the UPLOAD_FILE_MAX_SIZE (100 MB) limit.
  • Phenomenon: Execution results from AI dialogue nodes are forcibly appended to platform dialogue history, interfering with subsequent multi-round reasoning. Cause: The "auto-write to dialogue history" switch for the node is not disabled, causing task results to be mixed into dialogue context.

How to confirm correct configuration

  • Two progressive queries may be initiated. For example, first run "Subsidiary A Q3 position details", then run "Subsidiary B Q3 revenue data". Verify that returned results do not mix information attributed to the two companies in field attribution.
  • Upload an in-depth research report exceeding 1500 characters, then run a query for "retrieve relevant documents". Verify that returned retrieved document segments match the configured chunkSize interval.
  • Call the API to create a session and set the global variable "current reporting period = Q3". Call the dialogue interface for this session again, then verify that returned results include data associated with this global variable.
  • Debug an AI dialogue node, configure the task as "calculate the total position value of Subsidiary A". Confirm that the execution result is only output to the node return value and not automatically added to the platform dialogue history list.

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-14.