Ledger Summary and Report Generation for Department Budget Preparation: Knowledge Base Retrieval and Recall

Ledger Summary and Report Generation for Department Budget Preparation: Knowledge Base Retrieval and Recall

What the Data for This Use Case Looks Like

Typical users of this use case include budget departments of finance bureaus, financial offices of budget units, and financial departments of competent authorities. Daily processed documents include department budget drafts, project application documents, performance target forms, personnel expense calculation forms, budget approvals, and similar materials. Data sources cover the unified budget management system, department staff establishment system, prior year final accounts, project repository, and Ministry of Finance budget preparation notices. Data update frequency is annual. Core documents have fixed fields such as project code, budget amount, and performance indicators. The most time-consuming tasks include calculating personnel public expenses and project expenses, reviewing project pool admission and performance targets, and aggregating budget data from subordinate units.

Constraints Imposed on Knowledge Base Retrieval and Recall by These Characteristics

The annual update feature means no frequent incremental knowledge base synchronization is required. Only full updates before the budget preparation cycle are necessary. Multiple data sources require retrieval to cover documents exported from different systems. The system must support limiting recall scope across collections. The fixed-field document structure requires retrieval to balance semantic matching and exact field matching. This prevents irrelevant results from being included. The requirement to aggregate subordinate unit budget data means the number of documents recalled in a single request must meet the integration needs of multi-unit ledgers. It also requires controlling context length to fit the subsequent report generation step.

Configuration Settings

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

Configuration ItemRecommended Value RangeRationale
Similarity Threshold0.72–0.80Matches the fixed field accuracy requirements for department budget documents, filters low-relevance results
Single Search LimitTop 12–18 entriesMeets the recall volume requirement for aggregating ledgers from multiple subordinate units, while controlling context length
Search ModeVector + full-text retrievalBalances semantic matching and exact field matching for budget documents
Knowledge Base File Size Limit1000 MBAdapts to the large file upload requirements of budget documents, avoids parsing failures
Retrieval Timeout300–600 secondsAdapts to retrieval delays across multiple systems, prevents request interruptions
Maximum Context Length8000–10000 charactersAdapts to the long text generation requirements of department budget summary reports

Three Common Misconfigurations

  • Phenomenon: Calling the knowledge base file list API returns an empty array, or using a curl request to obtain the file list yields no valid results. Cause: The collection ID of the corresponding budget knowledge base is not correctly bound, leading to incorrect retrieval scope limitation.
  • Phenomenon: When uploading a docx document with embedded images, the interface prompts that the file format is incorrect. Cause: FastGPT's parsing support for docx embedded images is not enabled, or the document has a corrupted image embedding structure.
  • Phenomenon: The knowledge base original text download link cannot be accessed normally after being proxied by nginx. Cause: Complete nginx proxy path rules are not configured, and the access path of knowledge base static resources is not covered.

How to Verify Proper Configuration

  • Execute the preset curl request to obtain the knowledge base file list. The returned results should include the uploaded budget-related documents.
  • Upload a docx document with embedded images. No format error prompts should appear during parsing.
  • Initiate a retrieval request. The similarity threshold of the returned results should match the preset range, and the number of recalled items should meet the single search limit requirement.
  • Verify that the knowledge base original text download link can be accessed normally through the configured nginx proxy. No abnormal jumps should occur.

The values provided 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-09-28.