Reduce Gemini fallback noise and restore result volume
build-push / docker (push) Successful in 4m6s
build-push / docker (push) Successful in 4m6s
This commit is contained in:
@@ -458,3 +458,17 @@
|
||||
- Artgrid source fidelity is better, but preview-video extraction is still incomplete.
|
||||
- There is now a local self-test workflow.
|
||||
- There is one known local commit that has not been pushed because the remote repo reported an unpacker error.
|
||||
|
||||
## Recent Change Log
|
||||
- Date: `2026-03-16`
|
||||
- What changed:
|
||||
- Removed per-batch Gemini fallback injection so empty Gemini sub-results no longer automatically turn into many `"Gemini Vision 응답이 부족해..."` items.
|
||||
- Relaxed final merge to keep more non-negative Gemini-reviewed candidates and allow a larger capped preview-capable filler set when the visible result list is too small.
|
||||
- Slightly raised Envato / Artgrid caps and enrichment scope again after the stricter merge caused visible result count to collapse too far.
|
||||
- Bumped frontend asset version to `20260316e` so clients pick up the newer preview-proxy behavior.
|
||||
- Why it changed:
|
||||
- The user still saw too few results and too many fallback-labeled items despite the earlier filtering changes.
|
||||
- How it was verified:
|
||||
- `go test ./...`
|
||||
- What is still risky or incomplete:
|
||||
- If the browser is holding an older cached `app.js`, a hard refresh may still be needed before the proxied preview path is actually used on the client.
|
||||
|
||||
@@ -127,7 +127,7 @@ func (s *SearchService) SearchMedia(queries []string, enabledPlatforms map[strin
|
||||
}
|
||||
|
||||
func (s *SearchService) EnrichResults(results []SearchResult) []SearchResult {
|
||||
limit := minInt(len(results), 12)
|
||||
limit := minInt(len(results), 14)
|
||||
if limit == 0 {
|
||||
return results
|
||||
}
|
||||
|
||||
@@ -255,10 +255,6 @@ User query: ` + query,
|
||||
})
|
||||
}
|
||||
|
||||
if len(recommendations) == 0 {
|
||||
recommendations = BuildFallbackRecommendations(candidates, 8, "Gemini Vision 평가를 받지 못해 키워드 기준으로 보강된 결과입니다.")
|
||||
}
|
||||
|
||||
return recommendations, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ func RankSearchResults(query string, results []SearchResult) []SearchResult {
|
||||
}
|
||||
|
||||
func GeminiCandidateLimit(total int) int {
|
||||
return min(total, 12)
|
||||
return min(total, 16)
|
||||
}
|
||||
|
||||
func EvaluateAllCandidatesWithGemini(service *GeminiService, query string, ranked []SearchResult) ([]AIRecommendation, GeminiBatchStats, error) {
|
||||
@@ -314,9 +314,9 @@ func MergeRecommendations(recommended []AIRecommendation, ranked []SearchResult,
|
||||
merged = append(merged, item)
|
||||
}
|
||||
|
||||
if len(merged) < min(6, limit) {
|
||||
if len(merged) < min(12, limit) {
|
||||
for _, item := range ranked {
|
||||
if len(merged) >= min(6, limit) || item.Link == "" || seen[item.Link] {
|
||||
if len(merged) >= min(12, limit) || item.Link == "" || seen[item.Link] {
|
||||
continue
|
||||
}
|
||||
if strings.TrimSpace(item.ThumbnailURL) == "" && strings.TrimSpace(item.PreviewVideoURL) == "" {
|
||||
@@ -330,7 +330,7 @@ func MergeRecommendations(recommended []AIRecommendation, ranked []SearchResult,
|
||||
ThumbnailURL: item.ThumbnailURL,
|
||||
PreviewVideoURL: item.PreviewVideoURL,
|
||||
Source: item.Source,
|
||||
Reason: GeminiFallbackReason,
|
||||
Reason: "Gemini 검토가 부족해 편집용 후보로 추가된 결과입니다.",
|
||||
Recommended: false,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type searchCollector interface {
|
||||
type envatoCollector struct{}
|
||||
|
||||
func (envatoCollector) Name() string { return "Envato" }
|
||||
func (envatoCollector) MaxResults() int { return 10 }
|
||||
func (envatoCollector) MaxResults() int { return 12 }
|
||||
func (envatoCollector) Enabled(enabledPlatforms map[string]bool) bool {
|
||||
return len(enabledPlatforms) == 0 || enabledPlatforms["envato"]
|
||||
}
|
||||
@@ -31,7 +31,7 @@ func (envatoCollector) Enrich(searcher *SearchService, result SearchResult) Sear
|
||||
type artgridCollector struct{}
|
||||
|
||||
func (artgridCollector) Name() string { return "Artgrid" }
|
||||
func (artgridCollector) MaxResults() int { return 10 }
|
||||
func (artgridCollector) MaxResults() int { return 12 }
|
||||
func (artgridCollector) Enabled(enabledPlatforms map[string]bool) bool {
|
||||
return len(enabledPlatforms) == 0 || enabledPlatforms["artgrid"]
|
||||
}
|
||||
|
||||
+1
-1
@@ -202,6 +202,6 @@
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script src="/app.js?v=20260316d" defer></script>
|
||||
<script src="/app.js?v=20260316e" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user