|
| 1 | +--- |
| 2 | +title: Model Comparison and Evaluation in HagiCode |
| 3 | +description: A traceable comparison of popular LLMs for code generation in HagiCode. |
| 4 | +--- |
| 5 | + |
| 6 | +## Scope and method |
| 7 | + |
| 8 | +- **Goal**: Provide practical model-selection guidance for HagiCode developers. |
| 9 | +- **Task types**: Frontend component implementation, backend API refactoring, test completion, and documentation generation. |
| 10 | +- **Scoring rubric**: 1-5 scale where 5 indicates the best observed performance. |
| 11 | + |
| 12 | +## Test-time and scenario notes |
| 13 | + |
| 14 | +- **Latest test date**: 2026-03-08 |
| 15 | +- **Test period**: 2026-03-01 to 2026-03-08 |
| 16 | +- **Sample basis**: Exploratory internal tasks from common HagiCode engineering workflows, not vendor official benchmarks. |
| 17 | +- **Applicability**: Best suited for small to medium code-generation and refactoring tasks; validate separately for very long-context tasks. |
| 18 | + |
| 19 | +## Comparison snapshot |
| 20 | + |
| 21 | +| Model | Test Date | Code Quality (1-5) | Cost-effectiveness (1-5) | Notes | |
| 22 | +|------|-----------|--------------------|---------------------------|-------| |
| 23 | +| GPT-5 coding-focused variants | 2026-03-08 | 4.8 | 4.0 | Strong completion on complex tasks | |
| 24 | +| Claude 4.5/4.6 variants | 2026-03-08 | 4.7 | 4.2 | Stable long-form refactoring and explanation | |
| 25 | +| Qwen3-Coder variants | 2026-03-08 | 4.2 | 4.7 | Cost-efficient for high-frequency iteration | |
| 26 | +| DeepSeek-Coder recent variants | 2026-03-08 | 4.1 | 4.8 | High ROI in budget-constrained workflows | |
| 27 | + |
| 28 | +## Code quality analysis |
| 29 | + |
| 30 | +### Quality-first work |
| 31 | + |
| 32 | +- GPT-5 and Claude variants generally perform better on cross-file refactoring and constrained type correctness. |
| 33 | +- For maintainability-critical changes, prefer models with fewer repair rounds and clearer rationale. |
| 34 | + |
| 35 | +### Throughput-first work |
| 36 | + |
| 37 | +- For scaffolding and repetitive code completion, lower-cost models can reduce per-task cost significantly. |
| 38 | +- Route low-risk tasks to cost-efficient models and reserve premium models for critical modules. |
| 39 | + |
| 40 | +## Cost-effectiveness analysis |
| 41 | + |
| 42 | +| Scenario | Recommended strategy | Why | |
| 43 | +|---------|----------------------|-----| |
| 44 | +| Core business refactoring | Quality-first models | Lower rework and regression risk | |
| 45 | +| Daily feature iteration | Cost-efficient models | Better throughput per budget | |
| 46 | +| Exploration/prototyping | Hybrid routing | Cheap exploration, premium convergence | |
| 47 | + |
| 48 | +## Selection recommendations |
| 49 | + |
| 50 | +1. **Define priority first**: choose based on quality, speed, and cost target. |
| 51 | +2. **Use layered routing**: premium models for high-risk tasks, cost-efficient models for routine work. |
| 52 | +3. **Recalibrate continuously**: re-test key tasks after major model updates. |
| 53 | + |
| 54 | +## Evaluation refresh policy |
| 55 | + |
| 56 | +- **Regular cadence**: update at least monthly (recommended in the first week). |
| 57 | +- **Event-triggered updates**: re-test immediately when model capability, pricing, or context limits change materially. |
| 58 | +- **Update rule**: always update both test-time notes and comparison tables together. |
| 59 | + |
| 60 | +## Model entry template |
| 61 | + |
| 62 | +Use this template when adding new model records: |
| 63 | + |
| 64 | +```md |
| 65 | +### <Model name> |
| 66 | + |
| 67 | +- Test date: YYYY-MM-DD |
| 68 | +- Suitable scenarios: |
| 69 | +- Code quality score (1-5): |
| 70 | +- Cost-effectiveness score (1-5): |
| 71 | +- Strengths: |
| 72 | +- Limitations: |
| 73 | +- Recommended usage: |
| 74 | +``` |
0 commit comments