What the data for this category looks like
This category of data primarily originates from Git repositories, CI pipelines, static scanning reports, and defect databases. Its update frequency is daily or following each code commit. Daily generated documents include merge request content, code review comments, commit records, branch strategy descriptions, and other related materials. Data fields include code change scope, review comment details, commit hashes, defect association IDs, and more. There are no unified fixed units, as units vary based on the specific document type. Data is typically generated around code change and review workflows, covering full process records from branch creation through to merge completion. The primary users are development teams, technical leads, and open source project maintainers.
What constraints these characteristics impose on the knowledge base retrieval and recall workflow
This category of data has a high update frequency and is tightly bound to code commits. This requires knowledge base retrieval to support incremental recall to match real-time changes. The data includes mixed formats such as code blocks, natural language review comments, and document descriptions. Parsing rules must be adapted for different content types to avoid retrieving only code syntax while missing business-semantic review comments. Merge requests and branch strategy documents have hierarchical associations, so retrieval must support associated context recall to ensure complete judgment of change impacts. Additionally, retrieval results must cover defect database association information to help reviewers quickly locate known issues and reduce the risk of defects being merged into the main branch.
How to configure the settings
This page applies to FastGPT v4.17.0.
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Matches semantic similarity related to code reviews. Avoids introducing irrelevant content if set too low, and missing valid review comments if set too high |
limit | Top 10 entries | Controls the number of single recall results, aligning with the habit of development teams quickly browsing review-related documents |
searchMode | hybrid | Combines keyword and semantic retrieval to cover dual matching needs for code identifiers and natural language review comments |
usingReRank | Enabled | Re-ranks initial recall results to prioritize returning review records directly related to the current code change |
datasetSearchUsingExtensionQuery | Enabled | Automatically expands retrieval terms to cover common expressions such as code aliases and branch aliases, improving recall coverage |
collectionIds | Specified according to associated Git repositories and review document collections | Limits retrieval scope to avoid mixing in non-code-review knowledge base content |
Three common configuration mistakes
- Phenomenon: Retrieval results do not cover merge request documents in multi-level directories, or doc format files and images cannot be properly recalled. Cause: Full directory recursive parsing for code review documents and extraction configuration for non-text content such as image annotations and doc document metadata are not enabled.
- Phenomenon: Errors related to
common:core.chatappear after configuration, or the retrieval scope cannot be automatically switched based on knowledge base name. Cause: ThecollectionIdsparameter is not specified correctly, or the parameter format does not meet system requirements. - Phenomenon: The number of retrieval return results does not match the configured
limit, or the similarity threshold setting does not have the expected filtering effect. Cause: The configuration logic between recall upper limit and post-rerank display count is confused, and recall parameters are not adjusted to match the update frequency of code review data.
How to verify the configuration is correct
- Upload a code review test set that includes multi-level directories, doc documents, and image annotations, then verify that retrieval results cover all hierarchical content after executing a retrieval.
- Adjust the
similarityparameter value, observe changes in the relevance of retrieval results, and confirm that the threshold takes effect. - Configure
collectionIdsas a specified review document collection, then verify that retrieval results only come from the target collection after performing a retrieval. - Enable
usingReRank, compare the result ranking before and after enabling, and confirm that the reranking function operates normally.
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.