Problem
Currently, the same expensive model (GPT-4o or Gemini Pro) is used for every LLM call. But not all tasks need the same reasoning power:
| Task |
Reasoning Needed |
Current Model |
Ideal Model |
| Parse JD text → JSON |
Low |
GPT-4o ($5/M) |
GPT-4o-mini ($0.15/M) |
| Parse resume PDF → JSON |
Low |
GPT-4o ($5/M) |
GPT-4o-mini ($0.15/M) |
| Keyword extraction |
Medium |
GPT-4o ($5/M) |
GPT-4o-mini ($0.15/M) |
| Rewrite experience bullets |
High |
GPT-4o ($5/M) |
GPT-4o ($5/M) |
| Quality reflection |
High |
GPT-4o ($5/M) |
GPT-4o ($5/M) |
| Cover letter |
High |
GPT-4o ($5/M) |
GPT-4o ($5/M) |
Potential savings: ~50-60% on total LLM costs.
Solution
Define a model routing config:
MODEL_ROUTING = {
"jd_extraction": "gpt-4o-mini", # Cheap: structured parsing
"resume_parsing": "gpt-4o-mini", # Cheap: structured parsing
"keyword_extraction": "gpt-4o-mini", # Cheap: classification
"section_generation": "gpt-4o", # Expensive: creative rewriting
"quality_reflection": "gpt-4o", # Expensive: evaluation
"cover_letter": "gpt-4o", # Expensive: creative writing
}
For Gemini equivalent:
- Cheap:
gemini-2.0-flash
- Expensive:
gemini-2.5-pro
Files
zlm/variables.py (add model routing config)
zlm/__init__.py (use routing in pipeline)
Problem
Currently, the same expensive model (GPT-4o or Gemini Pro) is used for every LLM call. But not all tasks need the same reasoning power:
Potential savings: ~50-60% on total LLM costs.
Solution
Define a model routing config:
For Gemini equivalent:
gemini-2.0-flashgemini-2.5-proFiles
zlm/variables.py(add model routing config)zlm/__init__.py(use routing in pipeline)