What the data for this category looks like
Data for this category primarily comes from code repositories, CI pipelines, linked Issue links, and contributor-submitted content. Daily documents include PR descriptions, code review comments, CI execution results, and merge operation records. Update frequency is typically daily or weekly. Each data entry includes fields such as PR number, changed file list, review comment details, CI status tags, and merge timestamp. All content centers on the core code change review workflow, with no unrelated extra fields.
What Constraints These Characteristics Impose on Knowledge Base Retrieval and Recall
Data sources include code change files and CI results. Retrieval must associate both technical code content and pipeline status information to avoid recalling irrelevant non-code documents. The daily or weekly update rhythm requires knowledge base sync tasks to match this frequency, ensuring recalled content stays synchronized with latest changes. Each data entry includes multi-dimensional fields, so retrieval must limit associated field scope to avoid redundant recalls. PR review content is mostly technical review text, so retrieval and recall must prioritize content matching code change intent, reducing interference from irrelevant results.
Configuration Settings
Under FastGPT v4.17.0, the following configuration items can be customized for PR review scenarios:
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Adapts to the similarity matching requirements of PR review technical text, filters low-relevance recall results |
limit | Top 10 | Balances retrieval recall volume and subsequent context length, adapts to the scenario of viewing multiple associated documents during PR review |
searchMode | Comprehensive Sorting | Prioritizes matching content related to PR descriptions and change intent, aligns with core retrieval goals during reviews |
usingReRank | Enabled | For multi-dimensional PR-related documents, optimizes result sorting logic through re-ranking to correct order deviations in initial recall |
datasetSearchUsingExtensionQuery | Enabled | Automatically extends extended content such as PR-linked Issues and CI records, improving recall completeness |
collectionIds | Specify the exclusive knowledge base collection ID for PR reviews | Isolates knowledge base data related to PR reviews, avoiding recalling irrelevant documents from other categories |
Three Common Misconfigurations
- Phenomenon: Enabling
usingReRankdoes not change retrieval result sorting, and low-relevance content from initial recall remains at the top. Cause: Associated parameters for the re-rank model are not configured properly, or vector feature differences between PR-related documents in the knowledge base collection are too small, causing re-ranking to fail. - Phenomenon: CI pipeline result documents are not prioritized in retrieval results, conflicting with expected sorting during reviews. Cause:
searchModeis not set to the comprehensive sorting mode adapted for PR reviews, and a title-only retrieval mode is used incorrectly. - Phenomenon: A
getaddrinfo EAI_AGAIN mongoerror occurs during knowledge base synchronization, and recovery fails after restarting. Cause: The knowledge base synchronization retry mechanism is not configured, or MongoDB connection parameters are not adapted to the high-frequency synchronization requirements of the PR review knowledge base, leading to connection timeouts and failed connection establishment.
How to Verify Proper Configuration
- Manually submit a retrieval query related to PR change intent, check if the
similarityscore of recall results falls within the preset range. - After enabling
usingReRank, compare result sorting before and after enabling to confirm that highly relevant PR review documents have shifted positions. - Check knowledge base synchronization task logs to confirm daily or weekly PR-related documents have been fully synchronized to the specified collection.
- View the number of retrieval return results, confirm it matches the value set in the
limitconfiguration, with no extra or missing recalled 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.