Skip to content

Feature/configurable system prompt master - #332

Merged
aparna-aa merged 9 commits into
masterfrom
feature/configurable-system-prompt-master
Jun 1, 2026
Merged

Feature/configurable system prompt master#332
aparna-aa merged 9 commits into
masterfrom
feature/configurable-system-prompt-master

Conversation

@Dhara124

@Dhara124 Dhara124 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR introduces the Configurable System Prompt feature for LLM models and fixes several related interaction bugs. The changes have been strictly cherry-picked to target master and exclude unrelated dev history.

Key Changes

  • Project Metadata Configuration: System prompts can now be explicitly configured via project.metadata_json.
  • Per-Model System Prompts: Supports providing a dictionary for system_prompt to allow per-model overrides.
  • Empty Models Set Fallback: Modified get_all_llm_output to fallback to project_metadata.get("models_set") when task["models_to_run"] is empty.
  • Graceful Error Handling: Handled Llama2 API errors gracefully inside get_all_model_output, bubbling up empty interactions instead of throwing uncaught exceptions.
  • Robust JSON Parsing: Ensured json.loads safely handles empty strings ("") in task interaction endpoints to prevent runtime errors.
  • Punctuation Fixes: Updated DEFAULT_SYSTEM_PROMPT to use grammatically correct punctuation.

Issue Linked

Fixes issues regarding hardcoded system prompts and application crashes when dealing with missing model responses or empty interactions arrays.

Verification

  • Manual verification performed to ensure conflicts were correctly resolved and feature logic remained fully intact.
  • Verified that LLM outputs gracefully parse empty models arrays and fall back properly.
  • All code syntax correctly checks out.

@aparna-aa
aparna-aa merged commit d5e3ef3 into master Jun 1, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants