Skip to content

Revert "fix: default all LLM backends to deterministic greedy decoding" - #428

Merged
Anket11 merged 4 commits into
mainfrom
revert-426-development
Aug 19, 2026
Merged

Revert "fix: default all LLM backends to deterministic greedy decoding"#428
Anket11 merged 4 commits into
mainfrom
revert-426-development

Conversation

@phanindra-max

Copy link
Copy Markdown
Member

Reverts #426 to fix pre-existing issues in the overall execution flows.

Copilot AI review requested due to automatic review settings August 4, 2026 02:53
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Code Hygiene

The following items are defined but not yet in active use. Routine cleanup — no impact on functionality.

  • laiser/llm_methods.py:87 — unused variable 'args' (100% confidence)
  • laiser/llm_models/llama_cpp_handler.py:31 — unused variable 'chat_format' (100% confidence)
  • laiser/llm_models/llama_cpp_handler.py:72 — unused variable 'exc' (100% confidence)
  • laiser/llm_models/llama_cpp_handler.py:72 — unused variable 'exc_type' (100% confidence)
  • laiser/llm_models/llama_cpp_handler.py:72 — unused variable 'tb' (100% confidence)
  • laiser/llm_models/llm_router.py:70 — unused variable 'args' (100% confidence)
  • laiser/llm_models/llm_router.py:85 — unused variable 'args' (100% confidence)
  • laiser/services.py:130 — unused variable 'raw_description' (100% confidence)

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Complexity Analysis

Average: C — Moderate (14.678571428571429)

Hotspots tracked below. These are functional, well-exercised components — listed for visibility as the codebase scales.

Grade Name Type Score
F FAISSIndexManager.initialize_index Method 51
E SkillExtractionService.extract_and_align_core Method 36
E FAISSIndexManager.search_similar_skills Method 32
D ResponseParser._parse_skills_from_response Method 24
D FAISSIndexManager Class 22
C ResponseParser.parse_knowledge_task_response Method 20
C _BaseTaxonomyFAISSIndexManager.search_similar Method 18
C ResponseParser Class 17
C ResponseParser.parse_ksa_extraction_response Method 16
C ResponseParser.parse_skill_extraction_response Method 15
C openai_generate Function 14
C LLMRouter._initialize_components Method 14
C parse_output_vllm Function 13
C AlignmentService.align Method 11
B SkillExtractionService._deduplicate Method 10
B load_model_from_vllm Function 10
B _BaseTaxonomyFAISSIndexManager.initialize_index Method 9
B anthropic_generate Function 9
B ResponseParser.parse_ksa_details_response Method 8
B SkillExtractionService Class 8
B _BaseTaxonomyFAISSIndexManager Class 8
B GeminiAPI.generate_with_config Method 8
B SkillExtractorRefactored._expand_allowed_sources Method 7
B get_completion_vllm Function 7
B AlignmentService Class 6
B SkillExtractionService._normalize_mixed_concept_rows Method 6
B fetch_model_output Function 6
B LlamaCppBackend.__init__ Method 6

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📦 Preview package published!

Install and test this PR:

pip install --index-url https://test.pypi.org/simple/ laiser-preview==0.5.dev20260804025407

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

It introduces at least one functional bug (Gemini max token limit parameters are ignored) and the paper now describes FAISS alignment as approximate/sub-linear despite the implementation using an exact IndexFlatIP scan.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Reverts the prior change that defaulted all LLM backends to deterministic greedy decoding, in order to restore the previous execution behavior across the extraction/alignment flow.

Changes:

  • Removes deterministic decoding defaults (DEFAULT_TEMPERATURE, DEFAULT_TOP_P) and associated temperature/seed plumbing across router/service/extractor and backend helpers.
  • Updates backend request/payload construction to no longer force deterministic decoding parameters (varies by backend).
  • Removes the determinism-focused test module and updates project metadata/docs (pytest markers, paper text) accordingly.
File summaries
File Description
tests/test_determinism.py Removes determinism and cross-backend consistency test suite.
pytest.ini Drops the determinism marker entry (keeps other markers).
paper.md Updates narrative around backend coverage and alignment approach; currently mismatched with implementation details.
laiser/skill_extractor_refactored.py Removes temperature/seed arguments and forwarding to the service layer.
laiser/services.py Removes temperature/seed storage/forwarding into the router initialization path.
laiser/llm_models/openai.py Removes temperature/top_p parameters from the public helper and payload construction.
laiser/llm_models/llm_router.py Simplifies router init and stops forwarding temperature/seed into backend calls.
laiser/llm_models/llama_cpp_handler.py Reverts deterministic defaults/seed handling; changes defaults and removes per-call seeding.
laiser/llm_models/hugging_face_llm.py Removes temperature/seed-driven deterministic generation paths; simplifies sampling params.
laiser/llm_models/gemini.py Removes temperature/seed parameters from the public API; retains fixed temperature config and exposes max token parameters (currently not fully applied without fixes).
laiser/llm_models/anthropic.py Removes temperature/top_p parameters from the public helper and request payload.
laiser/llm_methods.py Forces sampling on for HF generation calls and simplifies vLLM sampling params.
laiser/config.py Removes deterministic decoding defaults while keeping GENERATION_SEED.
Review details

Suppressed comments (1)

laiser/llm_models/gemini.py:81

  • gemini_generate() accepts max_output_tokens but doesn’t forward it into GeminiAPI, so the argument has no effect.
    client = GeminiAPI(api_key=api_key, model_name=model_name, timeout=timeout)
  • Files reviewed: 13/13 changed files
  • Comments generated: 3
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread laiser/llm_models/gemini.py Outdated
Comment thread paper.md Outdated
Comment thread paper.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📦 Preview package published!

Install and test this PR:

pip install --index-url https://test.pypi.org/simple/ laiser-preview==0.5.dev20260804040738

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📦 Preview package published!

Install and test this PR:

pip install --index-url https://test.pypi.org/simple/ laiser-preview==0.5.dev20260804040833

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📦 Preview package published!

Install and test this PR:

pip install --index-url https://test.pypi.org/simple/ laiser-preview==0.5.dev20260804040953

@Anket11
Anket11 merged commit 1c88af9 into main Aug 19, 2026
15 of 19 checks passed
@Anket11
Anket11 deleted the revert-426-development branch August 22, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants