Technical Documentation and Interface Q&A for Pull Request Reviews: Knowledge Base Retrieval and Recall

This category of data originates from project code repositories, CI pipelines, linked Issue URLs, and contributor submission records. Update frequency

What This Category of Data Looks Like

This category of data originates from project code repositories, CI pipelines, linked Issue URLs, and contributor submission records. Update frequency is typically daily or weekly. Daily documents include PR descriptions, code review comments, CI results, and merge records. PR descriptions mark change scopes and dependencies. CI results list failed steps and elapsed time. Merge records track approvers and timestamps. The data structure mixes code snippets, structured logs, and natural language text. Fields include changed file lists, lines of code, review comment IDs, and more. No unified standardized format is typically used.

Constraints on Knowledge Base Retrieval and Recall

The mixed multi-source format requires the retrieval system to support hybrid matching of code, logs, and natural language. Differentiated recall weights must be configured for each data source. The daily or weekly update frequency requires the knowledge base incremental update schedule to align with project iteration rhythms, avoiding data lag or redundant updates. PR review context has limited length. Too many recall results will exceed the model input limit, so the number of recalled entries must be strictly controlled. PR-related data has strong dependencies. Retrieval results must cover change intentions, dependency information, and historical review records to prevent missing key related content.

Configuration Settings

This configuration applies to FastGPT v4.17.0

Configuration ItemRecommended ValueRationale
similarity0.72–0.80Matches the semantics of code and documents related to PRs, balancing recall completeness and result relevance
limitTop 6 entriesAdapts to the context length limit of PR reviews, avoiding exceeding the model input threshold
searchModeCode Semantics + Document AssociationCovers the two core types of information in PR data: code changes and linked documents, CI logs
usingReRankEnabledRe-ranks multiple groups of similar recalled results to improve the display priority of highly relevant content
datasetSearchUsingExtensionQueryEnabledAssociates and recalls auxiliary information such as linked Issues and CI logs by expanding PR change keywords
collectionIdsBind dataset IDs of code repositories, CI logs, and Issues linked to PRsLimits the retrieval scope to eliminate interference from irrelevant knowledge base content

Three Common Misconfigurations

  • Phenomenon: Retrieval results are empty or contain no matching content during debugging. Cause: The dataset IDs of the corresponding code repository and CI logs are not bound, or the similarity threshold is set too high, filtering out valid results.
  • Phenomenon: Redundant knowledge base search markers appear in Q&A sessions. Cause: The search display switch in Q&A results is not turned off, or rules for triggering retrieval only when needed are not configured.
  • Phenomenon: Imported PR-related documents show garbled characters after online deployment. Cause: The encoding format of the online deployment environment is inconsistent with the local environment, or the imported CI logs contain unescaped special characters that have not been preprocessed.

How to Verify the Configuration

  • Upload a simulated PR description. Confirm retrieval results include linked code changes, CI results, and historical review comments.
  • Adjust the similarity parameter to 0.70 and 0.85. Observe changes in the number of retrieved entries, confirming the threshold takes effect.
  • Turn off usingReRank. Compare the order of retrieval results, confirming the re-ranking function works properly.
  • View the bound collectionIds of the knowledge base. Confirm only datasets related to PR reviews are included, with no redundant bindings.

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.