What the data for this category looks like
This category's data primarily comes from code repositories, CI pipelines, linked Issue links, and contributor submission records. Daily generated documents include PR description documents, code review comments, CI execution results, and merge status records. Data update frequency is typically daily or weekly. Each entry includes fields such as changed code scope, reviewer tags, CI pass rate, and linked ticket number. There are no unified fixed units for these fields, and related values adjust based on the configuration of the specific code repository.
Constraints Imposed by These Characteristics on Reranking and Hybrid Retrieval
This category's data centers on code-related information, including unstructured review comments and structured CI results. Hybrid retrieval must match both code semantics and ticket link relationships. Data update frequency is low, so high-frequency real-time refresh is not required. However, retrieval results must match the latest status of the current PR. The core time-consuming steps are confirming change intent and checking test results. Reranking must prioritize high-confidence CI pass records and authoritative review comments, to prevent invalid results from interfering with review decisions. A single retrieval input for PR reviews usually includes code change descriptions and linked ticket context, with a large volume of input information. The number of retrieval results and sorting logic must be controlled, to ensure maintainers can quickly locate key information.
Configuration Recommendations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
similarity | 0.62–0.78 | Balances the precision and recall of code semantic matching, to fit the code change matching needs of PR reviews |
limit | Top 10 entries | Controls the number of results returned by basic retrieval, to avoid excessive redundant information interfering with review judgments |
searchMode | hybrid | Enables hybrid retrieval mode, to associate both code repository metadata and linked ticket information |
usingReRank | Enabled | Reranks basic retrieval results by PR review priority, to prioritize displaying CI pass records and authoritative review comments |
| Rerank model call timeout | 30 seconds | Fits the real-time requirements of PR reviews, to avoid the reranking step slowing down the overall retrieval process |
| Rerank relevance threshold | 0.70 | Filters low-correlation retrieval results, to ensure only valid information is retained after reranking |
Three Common Configuration Mistakes
- After configuring
usingReRank, retrieval results remain unchanged, and the interface shows that the reranking function is not active. The cause is that the API key or deployment address of the reranking model was not configured correctly, so the reranking step was not actually executed. - After enabling reranking, query execution time exceeds 60 seconds, and the page returns a timeout error. The cause is that the selected reranking model has overly large parameters or insufficient deployment resources, which does not meet the retrieval latency requirements of PR review data.
- Hybrid retrieval only returns code-related results, and does not include linked Issue information. The cause is that
searchModewas configured incorrectly, and the metadata hybrid matching mode was not enabled.
How to Verify Successful Configuration
- View the retrieval logs in the FastGPT v4.17.0 backend, confirm that the
usingReRankparameter is enabled and that reranking model call records exist. - Manually enter PR-related retrieval terms, compare the result sorting before and after enabling reranking, confirm that high-confidence CI results are displayed first.
- Check that
searchModeis set to hybrid, verify that retrieval results include both code semantic matching results and linked ticket information. - Simulate a slow query scenario, confirm that the time consumed by the reranking step meets the preset threshold, and no timeout errors occur.
The values provided here 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-10-19.