@thomasminh1995/depverdict 0.6.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +518 -0
- package/bin/depverdict.js +7 -0
- package/bin/upgradelens.js +7 -0
- package/docs/GR-01-Semantic-Grounding-Failure-Analysis.md +309 -0
- package/docs/GR-02-Versioned-Action-Evaluation-Criteria.md +187 -0
- package/docs/GR-03-Extractive-Contract-Safety-Experiment.md +242 -0
- package/docs/GR-04-Versioned-Production-Extractive-Contract.md +154 -0
- package/docs/IA-01-Repository-Usage-Discovery.md +122 -0
- package/docs/IA-02-Repository-Impact-Analysis.md +118 -0
- package/docs/IA-03-Repository-Impact-Evidence.md +160 -0
- package/docs/IA-04-CLI-Orchestration.md +235 -0
- package/docs/IA-05-Real-Provider-Validation.md +235 -0
- package/docs/IA-05-VinGrade-Validation.md +339 -0
- package/docs/MVP-01.md +48 -0
- package/docs/MVP-02-Architecture.md +536 -0
- package/docs/MVP-02-CLI-HTTP-Runtime.md +50 -0
- package/docs/MVP-02-HTTP-Lifecycle.md +37 -0
- package/docs/MVP-02-Knowledge-Manifest-Generation.md +75 -0
- package/docs/MVP-02-Knowledge-Manifest.md +279 -0
- package/docs/MVP-02-Knowledge-Research-Orchestration.md +62 -0
- package/docs/MVP-02-Knowledge-Store.md +87 -0
- package/docs/MVP-02-PyPI-Registry-Adapter.md +97 -0
- package/docs/MVP-02-Research-Planning.md +196 -0
- package/docs/MVP-02-Source-Provenance.md +81 -0
- package/docs/MVP-02-npm-Registry-Adapter.md +99 -0
- package/docs/RR-01-End-to-End-and-Real-Provider-Validation.md +393 -0
- package/docs/RR-01-RERUN-Extractive-Contract-Validation.md +566 -0
- package/docs/RR-02-Full-Product-Workflow-and-Developer-CLI-UX-Review.md +35 -0
- package/docs/RR02-FIX-01-Persistent-Qualification-Resolution.md +32 -0
- package/docs/RR02-FIX-02-Stage-aware-CLI-Progress-and-Heartbeat.md +28 -0
- package/docs/RR02-FIX-03-npm-Capture-Evidence-Exclusion.md +33 -0
- package/docs/RR02-FIX-03A-Complete-Package-Exclusion-and-Evidence-Commit.md +223 -0
- package/docs/RR02-FIX-04-Event-loop-safe-Heartbeat.md +393 -0
- package/docs/RR02-FIX-05-Materialize-Persisted-Qualification.md +207 -0
- package/docs/RR02-RERUN-CLI-Qualification-Progress-UX-and-Package-Validation.md +342 -0
- package/docs/VinGrade-MVP-02-Validation.md +480 -0
- package/docs/VinGrade-RC02-Live-Validation.md +273 -0
- package/docs/ai-capability-discovery.md +573 -0
- package/docs/ai-engineering-production-readiness.md +390 -0
- package/docs/ai-engineering-review.md +251 -0
- package/docs/ai-runtime-governance-discovery.md +754 -0
- package/docs/architecture-overview.md +78 -0
- package/docs/cli-progress.md +111 -0
- package/docs/decisions/diff-01-brand-distribution-identity.md +450 -0
- package/docs/decisions/diff-02-identity-compatibility-contract.md +274 -0
- package/docs/decisions/diff-03-repository-docs-community-migration.md +165 -0
- package/docs/decisions/diff-04-release-evidence-gap-acceptance.md +110 -0
- package/docs/discovery/mvp-05-ai-migration-planning-discovery.md +350 -0
- package/docs/gateway-runtime-discovery.md +614 -0
- package/docs/live-ai-validation.md +299 -0
- package/docs/migration-planning-qualification-resolution.md +99 -0
- package/docs/migrations/upgradelens-to-depverdict.md +97 -0
- package/docs/mp-r03-deterministic-upgrade-decision-architecture.md +135 -0
- package/docs/mp-r04-evidence-bounded-migration-handoff-architecture.md +116 -0
- package/docs/mp-r05-product-completion-and-decision-first-cli-architecture.md +162 -0
- package/docs/mvp-05-deterministic-context-runtime.md +127 -0
- package/docs/mvp-05-migration-checklist-contract.md +166 -0
- package/docs/mvp-05-migration-checklist-orchestration.md +105 -0
- package/docs/mvp-05-migration-evaluation-and-qualification.md +135 -0
- package/docs/mvp-05-provider-neutral-generator.md +79 -0
- package/docs/ollama-local-smoke-validation.md +156 -0
- package/docs/openai-compatible-runtime-discovery.md +789 -0
- package/docs/openrouter-one-dependency-validation.md +205 -0
- package/docs/oss-02-package-guard-hardening-architecture.md +131 -0
- package/docs/oss-04-public-ci-package-metadata-architecture.md +142 -0
- package/docs/package-content-policy.md +98 -0
- package/docs/releases/v0.5.0-technical-preview.md +114 -0
- package/docs/releases/v0.6.0-alpha.1-depverdict-preview.md +101 -0
- package/docs/reviews/diff-02-identity-contract-compatibility.md +413 -0
- package/docs/reviews/diff-03-repository-docs-community-migration.md +364 -0
- package/docs/reviews/diff-04-depverdict-distribution-identity-readiness-rereview.md +453 -0
- package/docs/reviews/diff-04-fix-post-rename-identity-release-remediation.md +310 -0
- package/docs/reviews/diff-05-final-preview-distribution-qualification.md +561 -0
- package/docs/reviews/mvp-05-final-product-value-workflow-rereview.md +471 -0
- package/docs/reviews/mvp-05-product-workflow-review.md +605 -0
- package/docs/reviews/oss-01-duplicate-artifact-investigation-cleanup.md +411 -0
- package/docs/reviews/oss-02-package-guard-hardening.md +303 -0
- package/docs/reviews/oss-03-community-scaffolding.md +378 -0
- package/docs/reviews/oss-04-public-ci-package-metadata.md +439 -0
- package/docs/reviews/oss-05-technical-preview-qualification.md +482 -0
- package/docs/reviews/upgradelens-vs-upgradedepdetective-source-comparison.md +355 -0
- package/docs/reviews/v0.5.0-pre-release-smoke.md +263 -0
- package/docs/reviews/v0.5.0-version-bump-release-verification.md +306 -0
- package/docs/runtime-contract-discovery.md +521 -0
- package/docs/structured-output-compatibility-report.md +100 -0
- package/docs/ts-fix-01-exact-duplicate-occurrence-target-selection-architecture.md +111 -0
- package/docs/version-analysis-architecture.md +827 -0
- package/eval/README.md +86 -0
- package/eval/datasets/generic/declared-constraint.json +59 -0
- package/eval/datasets/generic/evidence-conflict.json +73 -0
- package/eval/datasets/generic/major-breaking-release.json +66 -0
- package/eval/datasets/generic/missing-evidence.json +46 -0
- package/eval/datasets/generic/patch-release-low.json +59 -0
- package/eval/datasets/node/axios-patch-low.json +59 -0
- package/eval/datasets/node/react-major-breaking.json +66 -0
- package/eval/datasets/node/react-minor-compatibility.json +66 -0
- package/eval/datasets/python/fastapi-deprecation.json +66 -0
- package/eval/datasets/python/pydantic-major-breaking.json +66 -0
- package/eval/migration-planning/golden-dataset-v2.json +306 -0
- package/eval/migration-planning/golden-dataset.json +214 -0
- package/eval/schemas/expected-result.schema.json +88 -0
- package/eval/schemas/golden-case.schema.json +181 -0
- package/package.json +57 -0
- package/schemas/ai-scorecard.schema.json +132 -0
- package/schemas/benchmark-report.schema.json +189 -0
- package/schemas/benchmark.schema.json +55 -0
- package/schemas/capability-profile.schema.json +44 -0
- package/schemas/conformance-report.schema.json +150 -0
- package/schemas/deployment-profile.schema.json +64 -0
- package/schemas/evaluation-report.schema.json +158 -0
- package/schemas/knowledge-evidence-bundle.schema.json +150 -0
- package/schemas/knowledge-manifest.schema.json +548 -0
- package/schemas/metrics.schema.json +178 -0
- package/schemas/migration-checklist-extractive-candidate.schema.json +42 -0
- package/schemas/migration-checklist.schema.json +706 -0
- package/schemas/migration-evaluation-dataset-v2.schema.json +208 -0
- package/schemas/migration-evaluation-dataset.schema.json +204 -0
- package/schemas/migration-planning-qualification-record.schema.json +234 -0
- package/schemas/project-manifest.schema.json +308 -0
- package/schemas/qualification-record.schema.json +56 -0
- package/schemas/repository-impact-evidence.schema.json +232 -0
- package/schemas/repository-impact.schema.json +202 -0
- package/schemas/upgrade-decision.schema.json +273 -0
- package/schemas/usage-index.schema.json +179 -0
- package/schemas/version-analysis.schema.json +449 -0
- package/src/ai-runtime-debug.js +325 -0
- package/src/ai-runtime-error.js +42 -0
- package/src/ai-runtime.js +174 -0
- package/src/ai-scorecard.js +204 -0
- package/src/ai-version-analysis.js +484 -0
- package/src/artifact-root-compatibility.js +91 -0
- package/src/benchmark-report.js +111 -0
- package/src/benchmark-runner.js +191 -0
- package/src/canonical-json.js +69 -0
- package/src/cli.js +1299 -0
- package/src/conformance-report.js +158 -0
- package/src/conformance-runner.js +253 -0
- package/src/constants.js +73 -0
- package/src/cooperative-scheduler.js +79 -0
- package/src/dependencies.js +44 -0
- package/src/dependency-ai-context.js +625 -0
- package/src/detectors.js +253 -0
- package/src/discovery.js +234 -0
- package/src/ecosystem-version-adapter.js +294 -0
- package/src/environment-compatibility.js +77 -0
- package/src/evaluation-comparator.js +158 -0
- package/src/evaluation-report.js +76 -0
- package/src/evaluation-runner.js +248 -0
- package/src/evidence-source-adapter.js +472 -0
- package/src/files.js +89 -0
- package/src/governance-diagnostics.js +64 -0
- package/src/governance-loader.js +63 -0
- package/src/governance-metadata.js +346 -0
- package/src/governance-validator.js +360 -0
- package/src/http/bounded-fetch.js +278 -0
- package/src/http/cli-http-runtime.js +44 -0
- package/src/impact/input-loader.js +157 -0
- package/src/impact/matcher.js +40 -0
- package/src/impact/repository-impact.js +199 -0
- package/src/impact/runtime.js +24 -0
- package/src/impact/status.js +62 -0
- package/src/impact/writer.js +30 -0
- package/src/impact-evidence/input-loader.js +202 -0
- package/src/impact-evidence/repository-impact-evidence.js +234 -0
- package/src/impact-evidence/runtime.js +16 -0
- package/src/impact-evidence/writer.js +30 -0
- package/src/index.js +563 -0
- package/src/installed-version-baseline.js +196 -0
- package/src/knowledge-cache.js +324 -0
- package/src/knowledge-evidence-bundle.js +101 -0
- package/src/knowledge-evidence-producer.js +233 -0
- package/src/knowledge-manifest-builder.js +188 -0
- package/src/knowledge-manifest-writer.js +32 -0
- package/src/knowledge-manifest.js +255 -0
- package/src/knowledge-research.js +615 -0
- package/src/metrics-engine.js +205 -0
- package/src/migration-checklist/ai-candidate.js +320 -0
- package/src/migration-checklist/assembler.js +37 -0
- package/src/migration-checklist/context-runtime.js +828 -0
- package/src/migration-checklist/evaluation/action-criteria.js +244 -0
- package/src/migration-checklist/evaluation/comparator-v2.js +332 -0
- package/src/migration-checklist/evaluation/comparator.js +279 -0
- package/src/migration-checklist/evaluation/dataset-v2.js +227 -0
- package/src/migration-checklist/evaluation/dataset.js +336 -0
- package/src/migration-checklist/evaluation/extractive-fixtures-v2.js +148 -0
- package/src/migration-checklist/evaluation/metrics-v2.js +226 -0
- package/src/migration-checklist/evaluation/metrics.js +158 -0
- package/src/migration-checklist/evaluation/qualification-v2.js +321 -0
- package/src/migration-checklist/evaluation/qualification.js +239 -0
- package/src/migration-checklist/evaluation/runner-v2.js +294 -0
- package/src/migration-checklist/evaluation/runner.js +194 -0
- package/src/migration-checklist/evaluation/scorecard-v2.js +106 -0
- package/src/migration-checklist/evaluation/scorecard.js +86 -0
- package/src/migration-checklist/extractive-candidate.js +166 -0
- package/src/migration-checklist/extractive-prompt.js +62 -0
- package/src/migration-checklist/generator.js +702 -0
- package/src/migration-checklist/grounding-policy.js +117 -0
- package/src/migration-checklist/input-loader.js +613 -0
- package/src/migration-checklist/migration-checklist.js +635 -0
- package/src/migration-checklist/presentation.js +292 -0
- package/src/migration-checklist/progress.js +96 -0
- package/src/migration-checklist/prompt.js +83 -0
- package/src/migration-checklist/qualification-guard.js +462 -0
- package/src/migration-checklist/qualification-resolution.js +122 -0
- package/src/migration-checklist/qualification-store.js +225 -0
- package/src/migration-checklist/runtime.js +205 -0
- package/src/migration-checklist/verification.js +134 -0
- package/src/migration-checklist/writer.js +35 -0
- package/src/openai-compatible-provider.js +451 -0
- package/src/orchestration/failure-log.js +32 -0
- package/src/orchestration/pipeline.js +200 -0
- package/src/orchestration/progress-events.js +337 -0
- package/src/orchestration/progress-reporter.js +131 -0
- package/src/orchestration/text-writer.js +22 -0
- package/src/portable.js +13 -0
- package/src/product-completion.js +249 -0
- package/src/project-manifest-input.js +90 -0
- package/src/project-manifest.js +141 -0
- package/src/python-requirements.js +137 -0
- package/src/registry/npm-packument.js +256 -0
- package/src/registry/npm-registry-adapter.js +262 -0
- package/src/registry/pypi-project.js +300 -0
- package/src/registry/pypi-registry-adapter.js +235 -0
- package/src/registry/sanitize-registry-body.js +51 -0
- package/src/renderers/console.js +160 -0
- package/src/renderers/impact-presentation.js +278 -0
- package/src/renderers/markdown.js +172 -0
- package/src/research-plan.js +455 -0
- package/src/runtime-conformance.js +275 -0
- package/src/source-provenance.js +393 -0
- package/src/source-url.js +62 -0
- package/src/structured-output-schema.js +66 -0
- package/src/target-selector.js +306 -0
- package/src/upgrade-decision/input-loader.js +107 -0
- package/src/upgrade-decision/presentation.js +43 -0
- package/src/upgrade-decision/runtime.js +21 -0
- package/src/upgrade-decision/upgrade-decision.js +626 -0
- package/src/upgrade-decision/writer.js +30 -0
- package/src/usage/analyzer-registry.js +63 -0
- package/src/usage/coverage.js +116 -0
- package/src/usage/input-loader.js +139 -0
- package/src/usage/js/analyzer.js +240 -0
- package/src/usage/js/parser.js +21 -0
- package/src/usage/runtime.js +187 -0
- package/src/usage/scope.js +44 -0
- package/src/usage/source-files.js +50 -0
- package/src/usage/usage-index.js +217 -0
- package/src/usage/writer.js +31 -0
- package/src/version-analysis-loader.js +203 -0
- package/src/version-analysis-manifest.js +314 -0
- package/src/version-analysis-writer.js +30 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
# LR-00B — AI Capability Discovery for Version Analysis
|
|
2
|
+
|
|
3
|
+
**Status:** Discovery only
|
|
4
|
+
|
|
5
|
+
**Ngày chốt nguồn:** 2026-07-15
|
|
6
|
+
|
|
7
|
+
**Phạm vi:** MVP-03 Version Analysis, định hướng MVP-04 Impact Analysis và MVP-05 Migration Planning
|
|
8
|
+
|
|
9
|
+
Tài liệu này chọn **benchmark candidate**, không tuyên bố model thắng benchmark. Không có tài liệu nhà cung cấp nào đo trực tiếp việc giữ đúng `evidence id`, phân loại risk theo taxonomy của UpgradeLens, hay tránh invented migration step trên corpus của UpgradeLens. Những thuộc tính đó được ghi là **suy luận** hoặc **chưa xác minh**, không được nâng thành fact.
|
|
10
|
+
|
|
11
|
+
Quy ước đánh giá:
|
|
12
|
+
|
|
13
|
+
- **HIGH / MEDIUM / LOW:** mức phù hợp dự kiến với task; không phải điểm benchmark.
|
|
14
|
+
- **NATIVE:** capability do API/model endpoint chính thức cung cấp.
|
|
15
|
+
- **RUNTIME:** capability do Ollama, LM Studio hoặc vLLM grammar-constrained decoding cung cấp, không phải bảo đảm nội tại của weights.
|
|
16
|
+
- **UNKNOWN:** nguồn chính thức không chứng minh capability cho Version Analysis.
|
|
17
|
+
- **Confidence HIGH / MEDIUM / LOW:** độ mạnh của bằng chứng cho rating; capability được suy luận từ general reasoning luôn có confidence thấp hơn capability API được document rõ.
|
|
18
|
+
|
|
19
|
+
## 1. AI Capability Requirements
|
|
20
|
+
|
|
21
|
+
### Reverse-engineering task thực tế
|
|
22
|
+
|
|
23
|
+
MVP-03 không cần một chatbot tổng quát. Từ [`src/dependency-ai-context.js`](../src/dependency-ai-context.js), [`src/ai-version-analysis.js`](../src/ai-version-analysis.js), [`src/version-analysis-manifest.js`](../src/version-analysis-manifest.js), [`src/metrics-engine.js`](../src/metrics-engine.js) và [`src/ai-scorecard.js`](../src/ai-scorecard.js), model chỉ nhận một dependency occurrence, target đã được xác định deterministic, tối đa 8 evidence item và tối đa 12.000 ký tự evidence content. Model không được chọn version, thay đổi dependency identity, đọc repository, tạo URL, hay quyết định human review.
|
|
24
|
+
|
|
25
|
+
Model phải biến bounded evidence thành đúng năm phần candidate: `summary`, `summaryEvidenceRefs`, `riskLevel`, `riskEvidenceRefs`, `findings`. Local code sau đó parse JSON, validate Draft 2020-12 schema, allowlist evidence IDs/URLs, drop unsupported claims, downgrade risk và tính human review deterministic. Structured output vì vậy là điều kiện cần; nó không thay thế semantic trust validation.
|
|
26
|
+
|
|
27
|
+
### Capability bắt buộc
|
|
28
|
+
|
|
29
|
+
| Capability | Hành vi chính xác cần có | Failure mode cần phát hiện |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Release-note reasoning | Liên kết thay đổi trong interval `(current, target]` với risk release-level; phân biệt breaking change, deprecation và compatibility. | Tóm tắt đúng câu nhưng sai version/applies-to. |
|
|
32
|
+
| Changelog synthesis | Tổng hợp nhiều evidence item, loại trùng, giữ khác biệt giữa release và không san bằng conflict. | Trộn thay đổi từ release ngoài interval. |
|
|
33
|
+
| Semantic-version reasoning | Hiểu major/minor/patch chỉ là signal; không suy ra risk chỉ từ số version. Tôn trọng `declaredConstraint`/unknown baseline. | Gọi mọi major là high hoặc tự đoán installed version. |
|
|
34
|
+
| Evidence-grounded summarization | Mỗi summary/risk/finding chỉ dựa vào evidence đã chọn và dùng đúng ID có sẵn. | Invented evidence, URL, API hoặc version. |
|
|
35
|
+
| Conflicting-evidence handling | Không âm thầm chọn một nguồn khi context có `SOURCE_CONFLICT`; diễn đạt uncertainty. | Over-confidence từ một nguồn mâu thuẫn. |
|
|
36
|
+
| Uncertainty expression | Cho phép `unknown`; không điền khoảng trống bằng kiến thức nền; không biến thiếu evidence thành low risk. | Unsupported certainty. |
|
|
37
|
+
| Strict instruction following | Tuân thủ “không source impact, không migration plan, không invent facts”. | Scope leakage sang MVP-04/05. |
|
|
38
|
+
| Structured JSON generation | Trả đúng candidate schema, enum, required fields, `additionalProperties: false`, không markdown wrapper. | Invalid/truncated JSON, extra fields. |
|
|
39
|
+
| Evidence-reference preservation | Copy chính xác digest `sha256:...`, không sửa một ký tự và không dùng ref ngoài allowlist. | Ref accuracy/coverage thấp. |
|
|
40
|
+
| Hallucination resistance | Không tạo migration step, API, flag/config, URL hoặc bằng chứng không có trong context. | `CLAIMS_DROPPED` hoặc semantic falsehood có ref hợp lệ. |
|
|
41
|
+
| Reproducible model identity | Cho phép pin model/revision và giữ config; alias/router không được thay model ngầm. | Không thể audit hoặc so sánh run. |
|
|
42
|
+
|
|
43
|
+
### Capability ưu tiên
|
|
44
|
+
|
|
45
|
+
| Capability | Vì sao ưu tiên |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Long-context headroom từ 32K | MVP-03 hiện nhỏ hơn nhiều, nhưng prompt, schema, metadata và multilingual tokenization cần headroom. 64K–128K hữu ích cho corpus tương lai. |
|
|
48
|
+
| Migration-guide understanding | Không được emit plan ở MVP-03, nhưng cần nhận biết documented mandatory migration action để phân loại high risk; là core capability của MVP-05. |
|
|
49
|
+
| Dependency/API reasoning | Hiểu compatibility requirement giữa package, runtime, plugin/peer dependency; là core capability của MVP-04/05. |
|
|
50
|
+
| Multilingual documentation reasoning | Evidence có thể chứa tài liệu tiếng Anh và ngôn ngữ khác; output/contributor workflow có thể dùng tiếng Việt. |
|
|
51
|
+
| Stable low-variance behavior | Cùng input/config nên ít đổi risk/ref. `temperature: 0` không được coi là mathematical determinism. |
|
|
52
|
+
| Low refusal/empty-output rate | Một số reasoning mode có thể trả refusal, empty content hoặc tiêu tốn output budget; runtime phải coi đây là failure rõ ràng. |
|
|
53
|
+
| Operational telemetry | Usage, latency, finish reason, exact model/revision cần cho audit/benchmark dù không thuộc semantic manifest. |
|
|
54
|
+
|
|
55
|
+
### Capability tùy chọn
|
|
56
|
+
|
|
57
|
+
| Capability | Lý do không bắt buộc hiện tại |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| Tool calling | MVP-03 là one-shot bounded context; tool loop làm giảm reproducibility. Hữu ích về sau nhưng không thay final structured output. |
|
|
60
|
+
| 1M-token context | Không cần cho context 12.000 ký tự hiện tại; có thể hữu ích cho source-impact retrieval experiments, không phải lý do để dump cả repository. |
|
|
61
|
+
| Vision/audio | Evidence hiện là text. |
|
|
62
|
+
| Native web/search grounding | Knowledge Research phải thu thập evidence trước AI boundary; model không được tự bổ sung nguồn. |
|
|
63
|
+
| Fine-tuning | Chỉ xem xét sau khi eval chứng minh prompt + trust layer + frontier model không đạt gate. |
|
|
64
|
+
|
|
65
|
+
## 2. Capability Matrix
|
|
66
|
+
|
|
67
|
+
### Model resolution
|
|
68
|
+
|
|
69
|
+
Mọi citation trong discovery này trỏ tới documentation/API documentation, technical report hoặc model card do chính tổ chức phát hành model/runtime duy trì. Không dùng blog cá nhân, forum, Reddit, YouTube hoặc leaderboard bên thứ ba. Các benchmark trong technical report chỉ được dùng để hiểu positioning tổng quát, không được dùng làm bằng chứng model đã đạt UpgradeLens quality gate.
|
|
70
|
+
|
|
71
|
+
Tên family được resolve thành model cụ thể tại ngày chốt nguồn:
|
|
72
|
+
|
|
73
|
+
- “GPT-5” → `gpt-5`; “GPT-5 mini” → snapshot `gpt-5-mini-2025-08-07`. Đây là required reference candidates, nhưng OpenAI hiện khuyến nghị GPT-5.6 cho workload mới, nên thêm `gpt-5.6-sol` vào discovery.
|
|
74
|
+
- “Claude Sonnet” → `claude-sonnet-5`; “Claude Opus” → `claude-opus-4-8`. Anthropic document rằng các ID dateless từ 4.6 trở đi vẫn là pinned version, không phải convenience alias.
|
|
75
|
+
- “DeepSeek” được tách thành cloud `deepseek-v4-pro` và open-weight `DeepSeek-V3.2`; gộp hai deployment này sẽ làm sai structured-output và self-host rating.
|
|
76
|
+
- “Llama 3.x” → Llama 3.3 70B cho quality candidate và Llama 3.1 8B cho local smoke.
|
|
77
|
+
- “Mistral Large” → `mistral-large-2512` / Mistral Large 3 weights.
|
|
78
|
+
|
|
79
|
+
### Ma trận tóm tắt
|
|
80
|
+
|
|
81
|
+
Rating `Rel/Mig/Dep` lần lượt là release-note, migration-guide và dependency reasoning. `Ground/Cite` là evidence grounding và khả năng giữ citation/evidence ID; không phải provider web citation. `JSON` là final structured response, không phải tool arguments.
|
|
82
|
+
|
|
83
|
+
| Model | Structured output / JSON | Context | Reasoning | Rel/Mig/Dep | Ground/Cite | Instruction | Hallucination resistance | Latency | Cost | Open weights | Self-host |
|
|
84
|
+
| --- | --- | ---: | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
85
|
+
| GPT-5 | NATIVE JSON Schema; HIGH syntax | 400K | HIGH | H/H/H inferred | M/UNKNOWN | HIGH | MEDIUM-HIGH, residual risk | MEDIUM | MEDIUM | No | No |
|
|
86
|
+
| GPT-5 mini | NATIVE JSON Schema; HIGH syntax | 400K | MEDIUM-HIGH | M/M/M inferred | M/UNKNOWN | HIGH | MEDIUM, unverified domain | LOW | LOW | No | No |
|
|
87
|
+
| GPT-5.6 Sol | NATIVE JSON Schema; HIGH syntax | 1.05M | HIGH | H/H/H inferred | M/UNKNOWN | HIGH | UNKNOWN for domain | MEDIUM-HIGH | HIGH | No | No |
|
|
88
|
+
| Claude Sonnet 5 | NATIVE JSON Schema + strict tools; HIGH syntax | 1M | HIGH | H/H/H inferred | M/UNKNOWN | HIGH | MEDIUM-HIGH, residual risk | LOW-MEDIUM | MEDIUM | No | No |
|
|
89
|
+
| Claude Opus 4.8 | NATIVE JSON Schema + strict tools; HIGH syntax | 1M | HIGH | H/H/H inferred | M/UNKNOWN | HIGH | MEDIUM-HIGH, residual risk | MEDIUM-HIGH | HIGH | No | No |
|
|
90
|
+
| Gemini 2.5 Pro | NATIVE JSON Schema subset; HIGH syntax | 1,048,576 | HIGH | H/H/H inferred | M/UNKNOWN | HIGH | MEDIUM, residual risk | MEDIUM | MEDIUM | No | No |
|
|
91
|
+
| Gemini 2.5 Flash | NATIVE JSON Schema subset; HIGH syntax | 1,048,576 | MEDIUM-HIGH | M/M/M inferred | M/UNKNOWN | MEDIUM-HIGH | MEDIUM, unverified domain | LOW | LOW | No | No |
|
|
92
|
+
| Qwen3 8B/14B | RUNTIME grammar; model-native guarantee UNKNOWN | 32,768 native; 131,072 YaRN for 8B | MEDIUM | M/M/M inferred | L-M/UNKNOWN | MEDIUM | UNKNOWN; higher risk than shortlist until eval | Local-dependent | LOW marginal | Apache-2.0 | Yes |
|
|
93
|
+
| DeepSeek V4 Pro | JSON mode; strict tool schema, no documented final JSON Schema | 1M | HIGH | H/H/H inferred | M/UNKNOWN | MEDIUM-HIGH | UNKNOWN; JSON empty-output caveat | MEDIUM | LOW | No | No |
|
|
94
|
+
| DeepSeek V3.2 | RUNTIME grammar; parser caveat | 160K deployment profile | HIGH claimed generally | H/H/H inferred | M/UNKNOWN | MEDIUM-HIGH | UNKNOWN | HIGH self-host | MEDIUM ops | MIT | Enterprise cluster only |
|
|
95
|
+
| Llama 3.3 70B | RUNTIME grammar/prompt-only | 128K | MEDIUM-HIGH | M/M/M inferred | L-M/UNKNOWN | MEDIUM | UNKNOWN | HIGH on limited hardware | MEDIUM ops | Community license | Multi-GPU/server |
|
|
96
|
+
| Mistral Large 3 | NATIVE structured output/function call | 256K | HIGH claimed generally | H/H/H inferred | M/UNKNOWN | HIGH | UNKNOWN | MEDIUM-HIGH | MEDIUM | Apache-2.0 | Enterprise multi-accelerator |
|
|
97
|
+
|
|
98
|
+
`HIGH syntax` chỉ nói grammar/schema conformance được API/runtime constrain. Nó không chứng minh enum có ý nghĩa đúng, evidence ID đúng, summary entailed, hay risk đúng. “Citation quality” cho UpgradeLens là **UNKNOWN với confidence HIGH** ở mọi model vì không nguồn chính thức nào đo contract này.
|
|
99
|
+
|
|
100
|
+
### Evidence profile theo model
|
|
101
|
+
|
|
102
|
+
Mỗi profile dưới đây dùng đúng dạng `Capability | Rating | Evidence | Confidence`. Technical report general-purpose chỉ hỗ trợ suy luận capability, không được coi là Version Analysis benchmark.
|
|
103
|
+
|
|
104
|
+
#### GPT-5 / GPT-5 mini / GPT-5.6 Sol
|
|
105
|
+
|
|
106
|
+
| Capability | Rating | Evidence | Confidence |
|
|
107
|
+
| --- | --- | --- | --- |
|
|
108
|
+
| Structured output, function/tool calling | NATIVE | [GPT-5 model page](https://developers.openai.com/api/docs/models/gpt-5), [GPT-5 mini model page](https://developers.openai.com/api/docs/models/gpt-5-mini), [GPT-5.6 Sol model page](https://developers.openai.com/api/docs/models/gpt-5.6-sol) document support; GPT-5 mini has a dated snapshot. | HIGH |
|
|
109
|
+
| Long context | 400K for GPT-5/mini; 1.05M for Sol | Same official model pages. | HIGH |
|
|
110
|
+
| Reasoning, instruction following | HIGH GPT-5/Sol; MEDIUM-HIGH mini | OpenAI describes Sol for complex professional work and mini for well-defined precise tasks. [GPT-5 System Card](https://openai.com/index/gpt-5-system-card/) reports improved instruction following. Release/migration suitability remains an inference. | MEDIUM |
|
|
111
|
+
| Evidence grounding, citation quality | UNKNOWN for UpgradeLens refs | System card factuality tests are not evidence-ID preservation or dependency release analysis. | HIGH |
|
|
112
|
+
| Hallucination resistance | Improved relative to prior OpenAI models, not solved | [GPT-5 Deployment Safety Hub](https://deploymentsafety.openai.com/gpt-5/security-controls) reports lower hallucination rates on its evals; no result covers UpgradeLens. | MEDIUM |
|
|
113
|
+
| Latency/cost/open-source/self-host | mini LOW/LOW; GPT-5 MEDIUM/MEDIUM; Sol MEDIUM-HIGH/HIGH; all cloud-only | Official model catalog labels speed/price and recommends current tiers. | HIGH for availability; MEDIUM for relative operations |
|
|
114
|
+
|
|
115
|
+
#### Claude Sonnet 5 / Claude Opus 4.8
|
|
116
|
+
|
|
117
|
+
| Capability | Rating | Evidence | Confidence |
|
|
118
|
+
| --- | --- | --- | --- |
|
|
119
|
+
| Structured output, strict tool use | NATIVE | [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) documents JSON output with `output_config.format`, strict tool use and supported JSON Schema subset for both models. | HIGH |
|
|
120
|
+
| Long context/output | 1M / 128K | [Sonnet 5 migration/spec](https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5) and [models overview](https://platform.claude.com/docs/en/about-claude/models/overview). | HIGH |
|
|
121
|
+
| Reasoning, release/migration/dependency | HIGH inferred | [Choosing a model](https://platform.claude.com/docs/en/about-claude/models/choosing-a-model) positions Sonnet for coding/data analysis and Opus for complex reasoning/engineering. No release-note domain test. | MEDIUM |
|
|
122
|
+
| Evidence grounding/citation | UNKNOWN for digest refs | Native citation blocks are not the UpgradeLens evidence-ref contract; structured output and citations also have API composition constraints. | HIGH |
|
|
123
|
+
| Hallucination resistance | Residual MEDIUM risk | [Anthropic system cards](https://www.anthropic.com/system-cards) publish factuality/hallucination evaluations, but Sonnet 5/Opus 4.8 results do not validate UpgradeLens claims. | MEDIUM |
|
|
124
|
+
| Reproducibility/operations | Pinned IDs; Sonnet faster/cheaper than Opus | [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions) says dateless 4.6+ IDs are pinned. Official overview labels Sonnet fast and Opus moderate. | HIGH |
|
|
125
|
+
|
|
126
|
+
#### Gemini 2.5 Pro / Gemini 2.5 Flash
|
|
127
|
+
|
|
128
|
+
| Capability | Rating | Evidence | Confidence |
|
|
129
|
+
| --- | --- | --- | --- |
|
|
130
|
+
| Structured output/tool calling | NATIVE JSON Schema subset | [Structured outputs](https://ai.google.dev/gemini-api/docs/structured-output) documents schema-constrained JSON and explicitly requires application validation of semantically wrong values. Model pages list function calling. | HIGH |
|
|
131
|
+
| Long context | 1,048,576 input; 65,536 output | [Gemini 2.5 Pro](https://ai.google.dev/gemini-api/docs/models/gemini-2.5-pro) and [Gemini 2.5 Flash](https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash). | HIGH |
|
|
132
|
+
| Reasoning/document/code understanding | HIGH Pro; MEDIUM-HIGH Flash | [Gemini 2.5 technical report](https://storage.googleapis.com/deepmind-media/gemini/gemini_v2_5_report.pdf) and model pages describe thinking, long-document/codebase reasoning; no Version Analysis test. | MEDIUM |
|
|
133
|
+
| Evidence grounding/citation | UNKNOWN for UpgradeLens refs | Search grounding is a separate capability and must be disabled/out of boundary for this task. Official docs do not test digest preservation. | HIGH |
|
|
134
|
+
| Hallucination resistance | Residual MEDIUM risk | Technical report includes factuality/grounding evaluations, but Google’s structured-output docs explicitly warn that schema-valid values may still be semantically wrong. | MEDIUM |
|
|
135
|
+
| Operations | Flash LOW latency/cost; Pro MEDIUM | Official model catalog positions Flash for low-latency/high-volume reasoning and Pro for complex tasks. Stable IDs should be used, never `latest`/preview. | HIGH |
|
|
136
|
+
|
|
137
|
+
#### Qwen3 8B/14B
|
|
138
|
+
|
|
139
|
+
| Capability | Rating | Evidence | Confidence |
|
|
140
|
+
| --- | --- | --- | --- |
|
|
141
|
+
| Structured output | RUNTIME, not model-native guarantee | [Qwen vLLM deployment](https://qwen.readthedocs.io/en/stable/deployment/vllm.html) delegates guided JSON to vLLM and still recommends format instruction. Ollama/LM Studio can add grammar constraints. | HIGH |
|
|
142
|
+
| Context | 32,768 native; Qwen3-8B validated to 131,072 with YaRN | [Qwen3-8B model card](https://huggingface.co/Qwen/Qwen3-8B); YaRN can change short-context behavior and must be benchmarked as a separate profile. | HIGH |
|
|
143
|
+
| Reasoning/instruction/multilingual | MEDIUM expected | Official model card documents thinking/non-thinking, instruction following, agent skills and 100+ languages. It does not measure dependency releases. | MEDIUM |
|
|
144
|
+
| Evidence grounding/citation | LOW-MEDIUM expected / UNKNOWN actual | No official evidence-ID or release-note evaluation. | LOW |
|
|
145
|
+
| Hallucination/determinism | UNKNOWN; sampling-sensitive | Model card recommends sampling for thinking mode; greedy decoding can cause repetition/degradation. A fixed seed/temperature does not prove semantic determinism. | MEDIUM |
|
|
146
|
+
| Availability/self-host | Apache-2.0, strong local suitability at 8B; conditional at 14B | Official model card plus [Ollama Qwen3 tags](https://ollama.com/library/qwen3/tags) expose concrete quantized artifact sizes. | HIGH |
|
|
147
|
+
|
|
148
|
+
#### DeepSeek V4 Pro / DeepSeek V3.2
|
|
149
|
+
|
|
150
|
+
| Capability | Rating | Evidence | Confidence |
|
|
151
|
+
| --- | --- | --- | --- |
|
|
152
|
+
| Final structured output | V4: JSON mode only; V3.2 weights: RUNTIME | [DeepSeek JSON Output](https://api-docs.deepseek.com/guides/json_mode) supports `json_object`, requires prompt/example and warns of occasional empty content. [Tool Calls](https://api-docs.deepseek.com/guides/tool_calls) has strict schema for tool arguments, which is not final JSON Schema. | HIGH |
|
|
153
|
+
| Context/reasoning | V4 Pro 1M; V3.2 long-context reasoning | [DeepSeek models](https://api-docs.deepseek.com/quick_start/pricing) documents V4 context/features. [V3.2 model card](https://huggingface.co/deepseek-ai/DeepSeek-V3.2) describes reasoning and sparse attention. | HIGH for context; MEDIUM for task quality |
|
|
154
|
+
| Release/migration/dependency | HIGH inferred | General reasoning/agent results do not cover this domain. | LOW |
|
|
155
|
+
| Grounding/citation/hallucination | UNKNOWN | No official Version Analysis grounding test; V3.2 card warns its parser does not recover malformed output and is not production-ready without robust error handling. | HIGH |
|
|
156
|
+
| Reproducibility | V4 explicit ID; legacy aliases are being retired; V3.2 weights pinnable | [DeepSeek changelog](https://api-docs.deepseek.com/updates) records alias transition. Pin revision/hash for weights. | HIGH |
|
|
157
|
+
| Open/self-host/cost | V4 cloud LOW cost; V3.2 MIT but 685B and enterprise-scale | Official API docs and model card. “Open” does not mean laptop-suitable. | HIGH |
|
|
158
|
+
|
|
159
|
+
#### Llama 3.x
|
|
160
|
+
|
|
161
|
+
| Capability | Rating | Evidence | Confidence |
|
|
162
|
+
| --- | --- | --- | --- |
|
|
163
|
+
| Structured output | RUNTIME/prompt-only | [Llama 3.3 model card](https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct) documents tool use but no native final JSON Schema. Grammar guarantee belongs to serving runtime. | HIGH |
|
|
164
|
+
| Context | 128K for Llama 3.3 70B and Llama 3.1 8B | Official Meta model cards; [Llama 3.1 card](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct). | HIGH |
|
|
165
|
+
| Reasoning/release/migration/dependency | MEDIUM-HIGH at 70B, LOW-MEDIUM at 8B, inferred | General assistant/code evaluations are not Version Analysis. | LOW-MEDIUM |
|
|
166
|
+
| Multilingual | Limited for this task | Llama 3.3 officially supports eight languages; Vietnamese is not in the supported list and Meta discourages unsupported-language use without controls. | HIGH |
|
|
167
|
+
| Grounding/citation/hallucination | UNKNOWN | No official evidence-ref preservation result. | HIGH |
|
|
168
|
+
| Open/self-host | Open weights under custom Llama Community License, not OSI open source; 8B local, 70B server-scale | Model card/license and official artifact sizes. | HIGH |
|
|
169
|
+
|
|
170
|
+
#### Mistral Large 3
|
|
171
|
+
|
|
172
|
+
| Capability | Rating | Evidence | Confidence |
|
|
173
|
+
| --- | --- | --- | --- |
|
|
174
|
+
| Structured output/function calling | NATIVE on Mistral API | [Mistral structured outputs](https://docs.mistral.ai/studio-api/conversations/structured-output) and [Mistral Large 3 model page](https://docs.mistral.ai/models/model-cards/mistral-large-3-25-12). | HIGH |
|
|
175
|
+
| Context/reasoning | 256K; HIGH general-purpose reasoning inferred | Model page describes 41B active/675B total MoE, long-context and instruction workload. No Version Analysis eval. | HIGH for specs; MEDIUM for task quality |
|
|
176
|
+
| Grounding/citation/hallucination | UNKNOWN | JSON conformance is documented; semantic evidence fidelity is not. | HIGH |
|
|
177
|
+
| Instruction/multilingual | HIGH expected | Official model card documents system prompt, multilingual and instruction use. | MEDIUM |
|
|
178
|
+
| Open/self-host | Apache-2.0 weights, but enterprise hardware | [Official Hugging Face model card](https://huggingface.co/mistralai/Mistral-Large-3-675B-Instruct-2512-BF16) specifies single-node B200/H200 or H100/A100 deployment variants; not a 24GB GPU model. | HIGH |
|
|
179
|
+
| Cost/latency | MEDIUM cloud; HIGH self-host capital/ops | API model page and deployment requirements. | MEDIUM |
|
|
180
|
+
|
|
181
|
+
## 3. Version Analysis Suitability
|
|
182
|
+
|
|
183
|
+
### MVP-03 — Version Analysis
|
|
184
|
+
|
|
185
|
+
MVP-03 cần evidence fidelity và schema reliability nhiều hơn “agentic intelligence”. Shortlist hợp lý nhất:
|
|
186
|
+
|
|
187
|
+
1. **Claude Sonnet 5** — primary production benchmark candidate: native schema, pinned ID, strong document/reasoning profile, latency/cost cân bằng.
|
|
188
|
+
2. **GPT-5.6 Sol** — quality-ceiling benchmark candidate: native schema, strong complex reasoning; cost cao hơn mức cần thiết cho bounded MVP-03, nên chưa phải runtime mặc định trước benchmark.
|
|
189
|
+
3. **Gemini 2.5 Pro** — independent long-document reasoning candidate: native schema subset và stable model ID; cần kiểm tra candidate schema tương thích subset trước run.
|
|
190
|
+
4. **GPT-5 mini** và **Gemini 2.5 Flash** — cost/latency challengers cho task có prompt/schema rõ; chỉ promote nếu giữ evidence refs và risk gate ngang Tier A.
|
|
191
|
+
5. **Qwen3 14B** — OSS development candidate; **Qwen3 8B** chỉ là local smoke/reference floor, không phải production-quality assumption.
|
|
192
|
+
|
|
193
|
+
**GPT-5** vẫn được giữ làm required reference nhưng không nên mở một production qualification mới khi chính official catalog đã chuyển recommendation sang GPT-5.6. **DeepSeek V4 Pro** có reasoning/cost hấp dẫn nhưng thiếu documented final `json_schema`; chỉ vào benchmark sau conformance gate hoặc dùng strict tool-call envelope được thiết kế riêng trong một task khác. **Mistral Large 3** đáng benchmark nếu Mistral API mapping đã được xác nhận. Llama 3.3 70B không có lợi thế local đủ lớn và không có Vietnamese support chính thức, nên là secondary OSS comparison.
|
|
194
|
+
|
|
195
|
+
### MVP-04 — Impact Analysis
|
|
196
|
+
|
|
197
|
+
MVP-04 phải liên kết release evidence với deterministic source facts/import/API usage, nên reasoning/code-understanding quan trọng hơn MVP-03. Shortlist:
|
|
198
|
+
|
|
199
|
+
1. **GPT-5.6 Sol** — first quality-ceiling candidate.
|
|
200
|
+
2. **Claude Opus 4.8** — first deep-reasoning/coding comparison.
|
|
201
|
+
3. **Claude Sonnet 5** — production efficiency challenger; có thể thắng nếu retrieval/context đã tốt và task không cần Opus-class reasoning.
|
|
202
|
+
4. **Gemini 2.5 Pro** — long codebase/document candidate, nhưng không được dùng 1M context như lý do bỏ deterministic retrieval.
|
|
203
|
+
5. **Mistral Large 3 / DeepSeek V3.2** — enterprise OSS/on-prem research candidates, không phải contributor defaults.
|
|
204
|
+
|
|
205
|
+
### MVP-05 — Migration Planning
|
|
206
|
+
|
|
207
|
+
MVP-05 có rủi ro invented step/API cao nhất. Chỉ benchmark model đã pass MVP-03 grounding gate và MVP-04 impact gate:
|
|
208
|
+
|
|
209
|
+
1. **Claude Opus 4.8** và **GPT-5.6 Sol** làm quality-ceiling pair.
|
|
210
|
+
2. **Claude Sonnet 5** làm production cost/latency challenger.
|
|
211
|
+
3. **Gemini 2.5 Pro** làm independent architecture comparison.
|
|
212
|
+
4. Open-weight model chỉ được promote khi plan step bắt buộc có evidence/impact refs và đạt gate; general reasoning score không đủ.
|
|
213
|
+
|
|
214
|
+
Không có “best model thực sự” trước domain benchmark. Discovery kết luận được **best candidates**, đồng thời kết luận một số model không đủ contract để vào production benchmark ngay.
|
|
215
|
+
|
|
216
|
+
## 4. OSS Contributor Perspective
|
|
217
|
+
|
|
218
|
+
### Runtime role
|
|
219
|
+
|
|
220
|
+
| Contributor environment | Runtime phù hợp | Model/profile đề xuất | Vai trò |
|
|
221
|
+
| --- | --- | --- | --- |
|
|
222
|
+
| MacBook Air Apple Silicon 16GB | Ollama hoặc LM Studio/MLX | Qwen3 8B quantized; Llama 3.1 8B quantized làm English comparison | Local smoke, prompt/schema transport validation |
|
|
223
|
+
| MacBook Air 16GB, chấp nhận ít headroom | Ollama/LM Studio | Qwen3 14B Q4 **conditional**, context nhỏ/modest | Development sample, không chạy full 131K |
|
|
224
|
+
| NVIDIA GPU 24GB | vLLM | Qwen3 14B AWQ/Q4; Qwen3 30B-A3B Q4 **conditional** | Development benchmark candidate |
|
|
225
|
+
| Multi-GPU/server | vLLM | Llama 3.3 70B, Mistral Large 3, DeepSeek V3.2 tùy cluster | OSS/on-prem quality research |
|
|
226
|
+
| Không có local accelerator | Cloud endpoint | Sonnet 5, GPT-5.6 Sol, Gemini 2.5 Pro/Flash, DeepSeek V4 Pro | Production benchmark/runtime candidates |
|
|
227
|
+
|
|
228
|
+
[LM Studio system requirements](https://www.lmstudio.ai/docs/app/system-requirements) khuyến nghị 16GB+ RAM trên Apple Silicon. Official Ollama registry ghi Qwen3 8B package khoảng 5,2GB, Qwen3 14B Q4 khoảng 9,3GB, Qwen3 30B-A3B Q4 khoảng 19GB; Llama 3.1 8B khoảng 4,9GB. Đây chỉ là **weight artifact size**, không phải total working memory. KV cache, runtime buffers, OS và context làm tăng RAM/VRAM; vì vậy “artifact nhỏ hơn RAM” không phải chứng minh fit.
|
|
229
|
+
|
|
230
|
+
### Kết luận theo máy
|
|
231
|
+
|
|
232
|
+
- **MacBook Air 16GB:** Qwen3 8B là default contributor smoke. Qwen3 có multilingual scope rộng hơn Llama 3.x cho contributor Việt Nam. Qwen3 14B Q4 có thể chạy với context hạn chế nhưng không được coi là baseline CI hay quality reference.
|
|
233
|
+
- **GPU 24GB:** Qwen3 14B quantized là lựa chọn an toàn hơn. Qwen3 30B-A3B artifact 19GB là conditional vì còn KV cache/engine overhead. Llama 3.3 70B ngay cả Q2 artifact chính thức đã khoảng 26GB; không fit một GPU 24GB trước overhead. Mistral Large 3 và DeepSeek V3.2 không phù hợp single 24GB.
|
|
234
|
+
- **Cloud-only về thực tế:** GPT/Claude/Gemini/DeepSeek V4. Mistral Large 3 và DeepSeek V3.2 có weights nhưng cần hạ tầng enterprise; “open-weight” không đồng nghĩa contributor-local.
|
|
235
|
+
|
|
236
|
+
Ollama/LM Studio phù hợp smoke vì cài đặt và grammar JSON local. vLLM phù hợp GPU development/serving. Runtime-constrained JSON chỉ xác nhận output shape; contributor vẫn phải chạy local UpgradeLens schema/trust validation giống cloud.
|
|
237
|
+
|
|
238
|
+
## 5. Benchmark Candidate Selection
|
|
239
|
+
|
|
240
|
+
Discovery này không chạy benchmark và không sửa benchmark config. Candidate tiers đề xuất cho task benchmark sau:
|
|
241
|
+
|
|
242
|
+
### Tier A — Production quality benchmark
|
|
243
|
+
|
|
244
|
+
| Candidate | Lý do | Điều kiện trước khi chạy |
|
|
245
|
+
| --- | --- | --- |
|
|
246
|
+
| Claude Sonnet 5 | Balance quality/speed, native schema, pinned ID | Direct/pinned provider, no fallback; schema conformance probe pass. |
|
|
247
|
+
| GPT-5.6 Sol | Quality ceiling, native schema | Exact ID/revision behavior recorded; reasoning effort pinned. |
|
|
248
|
+
| Gemini 2.5 Pro | Independent provider, long-doc reasoning, stable model | UpgradeLens schema supported by Google subset; stable ID only. |
|
|
249
|
+
| Claude Opus 4.8 | Quality ceiling cho MVP-04/05 | Không mặc định dùng cho MVP-03 nếu Sonnet đạt cùng gate. |
|
|
250
|
+
|
|
251
|
+
### Tier B — Development/cost challenger benchmark
|
|
252
|
+
|
|
253
|
+
| Candidate | Lý do | Không được suy ra |
|
|
254
|
+
| --- | --- | --- |
|
|
255
|
+
| GPT-5 mini snapshot | Low-cost, native schema, dated snapshot | “Mini” đủ production chỉ vì JSON pass. |
|
|
256
|
+
| Gemini 2.5 Flash | Low latency/high volume, thinking + schema | Long context đồng nghĩa reasoning ngang Pro. |
|
|
257
|
+
| Mistral Large 3 API | Native schema, open-weight route, provider diversity | API behavior giống self-host weights. |
|
|
258
|
+
| DeepSeek V4 Pro | Strong general reasoning/cost candidate | JSON mode tương đương final JSON Schema. |
|
|
259
|
+
| Qwen3 14B quantized | OSS reproducible development profile | Quantization/runtime khác nhau có cùng quality. |
|
|
260
|
+
|
|
261
|
+
### Tier C — Local smoke validation
|
|
262
|
+
|
|
263
|
+
| Candidate | Mục tiêu | Không dùng để làm gì |
|
|
264
|
+
| --- | --- | --- |
|
|
265
|
+
| Qwen3 8B Q4 qua Ollama/LM Studio | Kiểm tra endpoint, request mapping, JSON parse/schema/trust failure path | Production quality ranking |
|
|
266
|
+
| Llama 3.1 8B Q4 | Runtime/model-family comparison, chủ yếu English evidence | Vietnamese or migration quality claim |
|
|
267
|
+
|
|
268
|
+
GPT-5 được giữ như **historical/reference run** nếu cần continuity, không ưu tiên chi phí benchmark mới. Llama 3.3 70B, DeepSeek V3.2 và Mistral Large 3 self-host là **Tier B-enterprise**, không phải Tier C: chúng không phục vụ mục tiêu contributor smoke.
|
|
269
|
+
|
|
270
|
+
Mỗi benchmark identity phải là tuple:
|
|
271
|
+
|
|
272
|
+
```text
|
|
273
|
+
taskProfile + promptVersion + candidateSchemaVersion
|
|
274
|
+
+ provider + endpoint/runtime version
|
|
275
|
+
+ exact model ID/revision + quantization
|
|
276
|
+
+ reasoning/thinking mode + sampling/seed
|
|
277
|
+
+ context limit + fallback policy
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Thiếu một thành phần thì run không đủ điều kiện so sánh reproducible.
|
|
281
|
+
|
|
282
|
+
## 6. Structured Output Reliability
|
|
283
|
+
|
|
284
|
+
### So sánh support chính thức
|
|
285
|
+
|
|
286
|
+
| Model/API | JSON Schema final response | JSON mode | Prompt-only JSON | Tool calling | Đánh giá cho candidate schema |
|
|
287
|
+
| --- | --- | --- | --- | --- | --- |
|
|
288
|
+
| GPT-5 / GPT-5 mini / GPT-5.6 Sol | Yes, native Structured Outputs | Yes/covered by API modes | Possible, không dùng production | Yes | **STRONG**, vẫn local-validate |
|
|
289
|
+
| Claude Sonnet 5 / Opus 4.8 | Yes, `output_config.format`, subset | Via structured output | Possible, không cần | Yes; `strict: true` | **STRONG**, kiểm tra unsupported schema keywords |
|
|
290
|
+
| Gemini 2.5 Pro / Flash | Yes, supported subset | MIME JSON/schema | Possible | Yes | **STRONG-PARTIAL**, semantic values vẫn có thể sai |
|
|
291
|
+
| Qwen3 weights | Không phải model-native API contract | Runtime-dependent | Yes | Model/runtime-dependent | **RUNTIME-DEPENDENT** |
|
|
292
|
+
| DeepSeek V4 Pro | Không được document cho final response | Yes, `json_object`; occasional empty content caveat | Required guidance/example | Yes; strict tool schema | **PARTIAL**, chưa đủ production gate |
|
|
293
|
+
| DeepSeek V3.2 weights | Runtime-dependent | Runtime-dependent | Yes | Có, trừ Speciale limitation | **RUNTIME-DEPENDENT** |
|
|
294
|
+
| Llama 3.x weights | Runtime-dependent | Runtime-dependent | Yes | Model/runtime integration | **RUNTIME-DEPENDENT** |
|
|
295
|
+
| Mistral Large 3 API | Yes, custom structured outputs | Yes | Possible | Yes | **STRONG**, vẫn local-validate |
|
|
296
|
+
|
|
297
|
+
### Không nhầm bốn lớp bảo đảm
|
|
298
|
+
|
|
299
|
+
1. **JSON syntax:** parse được.
|
|
300
|
+
2. **Schema shape:** required/type/enum/additional properties đúng.
|
|
301
|
+
3. **Referential integrity:** evidence refs nằm trong selected allowlist.
|
|
302
|
+
4. **Semantic entailment:** claim thực sự được evidence hỗ trợ.
|
|
303
|
+
|
|
304
|
+
Provider/native JSON Schema chủ yếu giải quyết lớp 1–2. UpgradeLens local trust layer giải quyết một phần lớp 3 và invented URL, nhưng [`src/metrics-engine.js`](../src/metrics-engine.js) hiện dùng `CLAIMS_DROPPED` như unsupported-claim proxy; nó chưa chứng minh semantic entailment lớp 4. Vì vậy không model nào được ghi “hallucination-safe” chỉ vì JSON Schema pass.
|
|
305
|
+
|
|
306
|
+
### Reliability order cho UpgradeLens
|
|
307
|
+
|
|
308
|
+
```text
|
|
309
|
+
Native final-response JSON Schema
|
|
310
|
+
> runtime grammar-constrained JSON Schema
|
|
311
|
+
> JSON mode/json_object
|
|
312
|
+
> prompt-only JSON
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Thứ tự này là về **format reliability**, không phải reasoning quality. Tool calling chỉ được dùng thay final response khi một contract mới cố ý thiết kế tool envelope; không được lén đổi candidate schema trong LR-00B.
|
|
316
|
+
|
|
317
|
+
## 7. Context Window Analysis
|
|
318
|
+
|
|
319
|
+
### Nhu cầu context thực tế
|
|
320
|
+
|
|
321
|
+
MVP-03 selector mặc định tối đa 12.000 evidence characters, cộng prompt, serialized schema, dependency/version facts, evidence metadata và output budget. Không có tokenizer-independent phép đổi chính xác character → token, đặc biệt với source code và tài liệu đa ngôn ngữ. Tuy vậy, contract hiện tại nằm trong **vài nghìn đến low tens-of-thousands tokens**, không gần 128K hay 1M.
|
|
322
|
+
|
|
323
|
+
Policy sizing đề xuất:
|
|
324
|
+
|
|
325
|
+
| Task | Minimum admission | Preferred operating window | Lý do |
|
|
326
|
+
| --- | ---: | ---: | --- |
|
|
327
|
+
| MVP-03 hiện tại | 32K | 64K | Đủ bounded evidence + schema + output headroom; phải đo token thực theo tokenizer trước request. |
|
|
328
|
+
| MVP-03 corpus lớn hơn | 64K | 128K | Cho thêm release evidence nhưng vẫn cần deterministic selection. |
|
|
329
|
+
| MVP-04 Impact Analysis | 128K | 256K+ | Source facts/snippets làm context tăng; retrieval/chunking vẫn bắt buộc. |
|
|
330
|
+
| MVP-05 Migration Planning | 128K | 256K+ | Cần release + impact + constraints; không dump toàn repository. |
|
|
331
|
+
|
|
332
|
+
### Phù hợp theo context
|
|
333
|
+
|
|
334
|
+
- **32K native đủ MVP-03:** Qwen3 8B/14B, nếu prompt thực tế được token-count và output budget có headroom.
|
|
335
|
+
- **128K class:** Llama 3.1/3.3; Qwen3 8B với YaRN. YaRN là profile khác và có thể làm giảm chất lượng short context; không bật chỉ để có con số lớn.
|
|
336
|
+
- **256K:** Mistral Large 3, phù hợp future impact bundle nhưng quá lớn để contributor-local.
|
|
337
|
+
- **400K:** GPT-5/GPT-5 mini, dư nhiều cho MVP-03.
|
|
338
|
+
- **~1M:** GPT-5.6 Sol, Sonnet 5, Opus 4.8, Gemini 2.5 Pro/Flash, DeepSeek V4. Con số này không tạo lợi thế thực tế cho MVP-03 bounded context.
|
|
339
|
+
|
|
340
|
+
### Context lớn nhưng reasoning yếu hơn / reasoning mạnh nhưng context nhỏ hơn
|
|
341
|
+
|
|
342
|
+
- Gemini 2.5 Flash có 1M context nhưng official positioning ưu tiên price-performance/latency; không được giả định reasoning ngang Pro.
|
|
343
|
+
- GPT-5 mini có 400K nhưng được position cho well-defined tasks; context không nâng nó thành quality ceiling.
|
|
344
|
+
- Qwen3 8B có thể extend 131K nhưng size model vẫn giới hạn synthesis/grounding; long context và reasoning là hai capability độc lập.
|
|
345
|
+
- Qwen3 14B native 32K có thể reasoning tốt hơn một model nhỏ context lớn trong bounded MVP-03; phải đo, không suy từ window.
|
|
346
|
+
- Không model bắt buộc nào vừa “reasoning mạnh nhưng context quá nhỏ” cho MVP-03 hiện tại; 32K đã là admission minimum hợp lý.
|
|
347
|
+
|
|
348
|
+
## 8. Hallucination Risk
|
|
349
|
+
|
|
350
|
+
### Bốn failure mode của UpgradeLens
|
|
351
|
+
|
|
352
|
+
| Failure | Ví dụ | Có bị schema bắt? | Control cần có |
|
|
353
|
+
| --- | --- | --- | --- |
|
|
354
|
+
| Invented migration step | “Run command X” dù evidence không nói | Không, nếu field/string hợp lệ | Cấm ở MVP-03; semantic eval ở MVP-05; step-level refs. |
|
|
355
|
+
| Invented API/config | Tạo tên method/flag nghe hợp lý | Không | Evidence entailment + source-impact facts + human review. |
|
|
356
|
+
| Invented evidence | Tạo digest/URL mới | Thường không ở provider schema; có thể đúng pattern | Local allowlist/ref and URL validation. |
|
|
357
|
+
| Over-confidence | `low`/`high` khi evidence thiếu/conflict | Không | `unknown`, deterministic downgrade/review, conflict fixtures. |
|
|
358
|
+
|
|
359
|
+
### Risk assessment theo family
|
|
360
|
+
|
|
361
|
+
| Family | Invented step/API/evidence/over-confidence risk | Bằng chứng và giới hạn |
|
|
362
|
+
| --- | --- | --- |
|
|
363
|
+
| GPT-5 / GPT-5.6 | MEDIUM residual | Official GPT-5 system card cho thấy cải thiện relative hallucination/instruction following, không chứng minh domain safety. |
|
|
364
|
+
| GPT-5 mini | MEDIUM-HIGH uncertainty | Smaller/cost model cho precise tasks; chưa có UpgradeLens evidence. Native schema chỉ giảm format failures. |
|
|
365
|
+
| Claude Sonnet/Opus | MEDIUM residual | System cards có factuality/hallucination tests; no evidence-ID/domain test. Opus intelligence không loại bỏ confident synthesis sai. |
|
|
366
|
+
| Gemini Pro | MEDIUM residual | Technical report có factuality/grounding; official structured-output docs vẫn yêu cầu semantic validation. |
|
|
367
|
+
| Gemini Flash | MEDIUM-HIGH uncertainty | Cost/latency-optimized so với Pro; 1M context không phải grounding proof. |
|
|
368
|
+
| Qwen3 8B/14B | HIGH until domain eval | Runtime grammar không constrain truth; official sampling guidance cho thấy output variability. 8B đặc biệt không nên dùng migration planning. |
|
|
369
|
+
| DeepSeek V4/V3.2 | MEDIUM-HIGH uncertainty | Strong general reasoning claims nhưng final schema/evidence fidelity chưa được document; V4 JSON mode có empty-output caveat. |
|
|
370
|
+
| Llama 3.x | HIGH until domain eval | No native final schema or evidence-ref test; Vietnamese ngoài supported list của 3.3. |
|
|
371
|
+
| Mistral Large 3 | MEDIUM-HIGH uncertainty | Native structured output và strong general profile, nhưng không có official domain grounding result. |
|
|
372
|
+
|
|
373
|
+
Không nên xếp hạng hallucination bằng benchmark tổng quát của nhà cung cấp vì dataset, tool access và prompting khác nhau. Risk hữu hiệu nhất là **post-trust unsupported claim rate trên golden cases của UpgradeLens**, cùng human annotation cho claims có ref hợp lệ nhưng không entailed.
|
|
374
|
+
|
|
375
|
+
Các control không phụ thuộc model:
|
|
376
|
+
|
|
377
|
+
- model chỉ thấy selected evidence; không browsing/tool retrieval;
|
|
378
|
+
- exact evidence ID allowlist;
|
|
379
|
+
- invalid refs/URLs bị drop, risk bị downgrade;
|
|
380
|
+
- conflict/stale/missing evidence bắt human review;
|
|
381
|
+
- source impact và migration plan bị cấm ở MVP-03;
|
|
382
|
+
- MVP-04/05 cần claim/step-level refs, không chỉ summary-level citation;
|
|
383
|
+
- retry không được tự đổi model hoặc bỏ schema.
|
|
384
|
+
|
|
385
|
+
## 9. Cost Analysis
|
|
386
|
+
|
|
387
|
+
Không dùng bảng giá chi tiết vì giá thay đổi. `LOW/MEDIUM/HIGH` dưới đây là total operating trade-off tương đối cho bounded text analysis, không phải báo giá.
|
|
388
|
+
|
|
389
|
+
| Deployment | Cost | Phù hợp | Trade-off |
|
|
390
|
+
| --- | --- | --- | --- |
|
|
391
|
+
| Qwen3 8B local trên máy contributor đã có | LOW marginal | Smoke, development | Không có token bill; tốn RAM, điện, thời gian; quality thấp hơn cần được chấp nhận rõ. |
|
|
392
|
+
| Qwen3 14B / 30B local | LOW-MEDIUM marginal | Development benchmark | Hardware fit/latency và quantization variability; không “free” nếu tính máy/ops. |
|
|
393
|
+
| Llama 3.3 70B server | MEDIUM-HIGH | OSS comparison/on-prem | Multi-GPU, deployment, observability; license custom. |
|
|
394
|
+
| DeepSeek V3.2 / Mistral Large 3 self-host | HIGH | Enterprise on-prem/privacy | Open weights nhưng 685B/675B total; capital và operations cao. |
|
|
395
|
+
| GPT-5 mini / Gemini 2.5 Flash / DeepSeek V4 API | LOW | Cost challenger/high volume | Cần chứng minh evidence fidelity; DeepSeek final schema yếu hơn. |
|
|
396
|
+
| GPT-5 / Gemini 2.5 Pro / Claude Sonnet 5 / Mistral Large 3 API | MEDIUM | Production shortlist | Balance tốt hơn quality ceiling models; provider/privacy dependency. |
|
|
397
|
+
| GPT-5.6 Sol / Claude Opus 4.8 | HIGH | Quality ceiling, MVP-04/05 hard cases | Reasoning mạnh hơn nhưng latency/token spend cao; có thể overkill cho MVP-03. |
|
|
398
|
+
| Enterprise cloud contract | HIGH | SLO, capacity, privacy/governance | Có support/ZDR/regional controls tùy vendor; procurement và lock-in cao hơn. |
|
|
399
|
+
|
|
400
|
+
### Local vs cloud vs enterprise
|
|
401
|
+
|
|
402
|
+
- **Local:** privacy và offline tốt nhất, marginal cost thấp nếu đã có hardware; nhưng contributor machines tạo nhiều model/quant/runtime profiles, làm quality comparison khó hơn.
|
|
403
|
+
- **Cloud:** time-to-value và frontier quality tốt; cost theo usage phù hợp MVP-03 bounded context. Cần pin identity, privacy policy, rate-limit/error handling và không gateway fallback.
|
|
404
|
+
- **Enterprise/on-prem:** hợp lý khi evidence tương lai chứa private source code hoặc compliance yêu cầu; chỉ đáng trả giá vận hành khi workload/privacy thực tế chứng minh nhu cầu.
|
|
405
|
+
|
|
406
|
+
Cost optimization order nên là: giảm evidence thừa bằng deterministic selection → chọn effort/output budget → caching/batch nếu contract cho phép → thử model tier rẻ hơn. Không chọn model yếu trước rồi bù bằng trust bypass.
|
|
407
|
+
|
|
408
|
+
## 10. Production Recommendation
|
|
409
|
+
|
|
410
|
+
### Kiến trúc đề xuất
|
|
411
|
+
|
|
412
|
+
```text
|
|
413
|
+
Contributor local smoke
|
|
414
|
+
Qwen3 8B Q4
|
|
415
|
+
via Ollama or LM Studio
|
|
416
|
+
↓ same local schema/trust validation
|
|
417
|
+
|
|
418
|
+
GPU development challenger
|
|
419
|
+
Qwen3 14B quantized
|
|
420
|
+
via vLLM
|
|
421
|
+
↓ capability conformance gate
|
|
422
|
+
|
|
423
|
+
Production benchmark
|
|
424
|
+
Claude Sonnet 5
|
|
425
|
+
GPT-5.6 Sol
|
|
426
|
+
Gemini 2.5 Pro
|
|
427
|
+
(+ Opus 4.8 for MVP-04/05 ceiling)
|
|
428
|
+
↓ UpgradeLens domain quality gate
|
|
429
|
+
|
|
430
|
+
Production runtime
|
|
431
|
+
Cheapest pinned candidate that passes every hard gate
|
|
432
|
+
direct provider or reproducibly pinned gateway route
|
|
433
|
+
↓
|
|
434
|
+
local schema validation + trust validation
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Recommendation cụ thể
|
|
438
|
+
|
|
439
|
+
- **MVP-03 default benchmark leader:** Claude Sonnet 5, không phải default runtime đã quyết định. Lý do: native structured output, pinned model ID, document/reasoning capability và cost/latency balance.
|
|
440
|
+
- **MVP-03 quality ceiling:** GPT-5.6 Sol. Nếu không cải thiện material quality so với Sonnet/Pro trên UpgradeLens metrics thì không đáng cost premium.
|
|
441
|
+
- **MVP-03 cost candidate:** GPT-5 mini snapshot hoặc Gemini 2.5 Flash; promote chỉ khi hard gates ngang Tier A.
|
|
442
|
+
- **MVP-04/05 ceiling:** pair GPT-5.6 Sol + Claude Opus 4.8; Sonnet 5 là efficiency challenger.
|
|
443
|
+
- **OSS contributor default:** Qwen3 8B Q4 smoke; Qwen3 14B quantized development candidate. Không quảng bá local smoke như production equivalent.
|
|
444
|
+
- **Enterprise OSS:** Mistral Large 3 hoặc DeepSeek V3.2 chỉ sau capacity/privacy business case và domain benchmark trên exact serving stack.
|
|
445
|
+
|
|
446
|
+
Production không nên dùng auto-router/free-router, convenience alias có thể hot-swap, cross-model fallback hoặc silent downgrade structured output. Retry được phép cùng pinned model/provider/config; model change phải trở thành run mới và audit được.
|
|
447
|
+
|
|
448
|
+
## 11. Capability Policy
|
|
449
|
+
|
|
450
|
+
### Admission policy
|
|
451
|
+
|
|
452
|
+
Không phải model chạy được là model được benchmark. Một `VersionAnalysisCapabilityProfile/v1` phải khai báo và được conformance-check:
|
|
453
|
+
|
|
454
|
+
```text
|
|
455
|
+
task = versionAnalysis.v1
|
|
456
|
+
exactModelIdentity = required
|
|
457
|
+
minimumContextTokens = 32768
|
|
458
|
+
finalStructuredOutput = nativeJsonSchema | runtimeJsonSchema
|
|
459
|
+
schemaCompatibility = pass
|
|
460
|
+
fallback = disabled
|
|
461
|
+
toolRetrieval = disabled
|
|
462
|
+
usageAndFinishReason = observable
|
|
463
|
+
localSchemaValidation = required
|
|
464
|
+
localTrustValidation = required
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
`json_object` hoặc prompt-only JSON không đủ admission cho **production benchmark**. Có thể vào experimental Tier B nếu failure được fail-closed và không thay schema/prompt. Runtime JSON Schema phải ghi runtime/version/backend vì guarantee thuộc serving stack.
|
|
468
|
+
|
|
469
|
+
### Pre-benchmark conformance gate
|
|
470
|
+
|
|
471
|
+
Trước quality benchmark, exact deployment phải pass 100% các kiểm tra không đánh giá intelligence:
|
|
472
|
+
|
|
473
|
+
1. Pin/record exact model, provider/runtime version, quantization và config.
|
|
474
|
+
2. Candidate schema được endpoint chấp nhận, không silently bỏ keyword.
|
|
475
|
+
3. Required fields/enum/`additionalProperties: false` được enforce trên probe fixtures.
|
|
476
|
+
4. Refusal, empty output, truncation và invalid JSON fail rõ; không parse prose/regex recovery.
|
|
477
|
+
5. Fallback/routing tắt; actual model identity quan sát được.
|
|
478
|
+
6. Usage, latency, finish reason có thể thu thập; không log secret hoặc raw private evidence ngoài policy.
|
|
479
|
+
7. UpgradeLens local schema và trust validation luôn chạy, kể cả provider nói “strict”.
|
|
480
|
+
|
|
481
|
+
### Quality gate
|
|
482
|
+
|
|
483
|
+
Giữ thresholds đã có trong [`src/ai-scorecard.js`](../src/ai-scorecard.js), không sửa evaluation trong task này:
|
|
484
|
+
|
|
485
|
+
| Metric | Hard gate |
|
|
486
|
+
| --- | ---: |
|
|
487
|
+
| Risk classification accuracy | ≥ 0,90 |
|
|
488
|
+
| Human review accuracy | ≥ 0,95 |
|
|
489
|
+
| Human review reason accuracy | ≥ 0,95 |
|
|
490
|
+
| Evidence reference accuracy | ≥ 0,95 |
|
|
491
|
+
| Evidence reference coverage | ≥ 0,95 |
|
|
492
|
+
| Unsupported claim rate proxy | ≤ 0,05 |
|
|
493
|
+
| Validation pass rate | ≥ 0,98 |
|
|
494
|
+
| Deterministic pass rate | = 1,00 |
|
|
495
|
+
|
|
496
|
+
Production promotion nên chặt hơn benchmark admission:
|
|
497
|
+
|
|
498
|
+
- mọi hard gate pass trên toàn bộ corpus và từng critical slice: breaking change, deprecation, missing evidence, conflict, stale source, declared constraint, npm/PyPI, multilingual;
|
|
499
|
+
- zero invented evidence ID/URL trong release candidate set;
|
|
500
|
+
- human review semantic audit cho claims có valid ref nhưng không entailed;
|
|
501
|
+
- repeated-run stability trên pinned config; risk/ref variance phải dưới ngưỡng được định nghĩa trước;
|
|
502
|
+
- p95 latency/cost/SLO pass sau quality, không dùng weighted average để che hard-gate failure.
|
|
503
|
+
|
|
504
|
+
Model rẻ hơn chỉ thắng khi pass tất cả hard gates; không bù hallucination bằng latency/cost score.
|
|
505
|
+
|
|
506
|
+
## 12. Future-proof Strategy
|
|
507
|
+
|
|
508
|
+
### Capability-first, protocol-first
|
|
509
|
+
|
|
510
|
+
```text
|
|
511
|
+
Version Analysis task contract
|
|
512
|
+
↓
|
|
513
|
+
Capability Profile + Admission Gate
|
|
514
|
+
↓
|
|
515
|
+
AiRuntime
|
|
516
|
+
↓
|
|
517
|
+
Protocol/Provider Adapter
|
|
518
|
+
↓
|
|
519
|
+
Pinned Deployment Profile
|
|
520
|
+
↓
|
|
521
|
+
LLM endpoint or local weights
|
|
522
|
+
↓
|
|
523
|
+
Local Schema Validation
|
|
524
|
+
↓
|
|
525
|
+
Trust Validation
|
|
526
|
+
↓
|
|
527
|
+
Version Analysis Manifest
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
Không thiết kế:
|
|
531
|
+
|
|
532
|
+
```text
|
|
533
|
+
GPT/Claude/Gemini-specific prompt
|
|
534
|
+
↓
|
|
535
|
+
Version Analysis
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Stable abstractions
|
|
539
|
+
|
|
540
|
+
- **Task contract** sở hữu semantics: inputs, evidence boundary, allowed claims, output schema, prompt version và trust rules.
|
|
541
|
+
- **Capability profile** mô tả yêu cầu (`finalJsonSchema`, minimum context, pinned identity, no fallback), không chứa tên vendor.
|
|
542
|
+
- **Deployment profile** mô tả model ID/revision, provider/runtime, quantization, reasoning mode, context và sampling. Cùng weights trên Ollama và vLLM là hai profiles khác nhau.
|
|
543
|
+
- **Protocol adapter** chỉ map transport/request/response/usage/error. Nó không chọn target version, sửa evidence, normalize semantic claims hoặc bypass trust.
|
|
544
|
+
- **Capability registry** là dữ liệu được tạo từ official documentation + conformance results; không hard-code `if model === ...` trong Version Analysis core.
|
|
545
|
+
- **Evaluation/benchmark** quyết định promotion; official model card chỉ quyết định shortlist/admission.
|
|
546
|
+
|
|
547
|
+
### Upgrade strategy
|
|
548
|
+
|
|
549
|
+
1. Alias mới không tự động thay production model. Tạo deployment profile mới.
|
|
550
|
+
2. Chạy documentation/conformance review; schema/API behavior có thể thay dù family name giống nhau.
|
|
551
|
+
3. Chạy cùng versioned golden dataset và prompt/schema version hiện hành.
|
|
552
|
+
4. So sánh hard gates trước cost/latency; không fallback giữa candidates trong một run.
|
|
553
|
+
5. Promote có versioned decision record; rollback về profile cũ không đổi core contract.
|
|
554
|
+
6. Requalify khi provider đổi model ID, tokenizer, thinking defaults, structured-output semantics hoặc deprecation policy.
|
|
555
|
+
|
|
556
|
+
### Final discovery decision
|
|
557
|
+
|
|
558
|
+
UpgradeLens nên phụ thuộc vào **capability + conformance + measured domain quality**, không phụ thuộc model name. Cloud frontier models là production candidates; Qwen3 là contributor-local reference; tất cả output vẫn đi qua cùng local schema/trust boundary. Cách này cho phép thay GPT-5.6, Claude Sonnet/Opus, Gemini, Mistral hoặc model tương lai mà không đổi deterministic facts, prompt semantics, public schema hay downstream trust contract.
|
|
559
|
+
|
|
560
|
+
### Validation statement
|
|
561
|
+
|
|
562
|
+
- Chỉ thêm tài liệu này.
|
|
563
|
+
- Không sửa production code.
|
|
564
|
+
- Không thay đổi runtime.
|
|
565
|
+
- Không thay đổi prompt.
|
|
566
|
+
- Không thay đổi schema.
|
|
567
|
+
- Không thay đổi trust layer hoặc CLI.
|
|
568
|
+
- Không thay đổi benchmark.
|
|
569
|
+
- Không thay đổi evaluation.
|
|
570
|
+
- Không gọi model hoặc API model; không dùng API key; không cài SDK.
|
|
571
|
+
- Không chạy test suite vì không có thay đổi executable.
|
|
572
|
+
- Không có secret/API key trong tài liệu.
|
|
573
|
+
- `git diff --check` phải pass trước khi handoff.
|