Skip to content

Improved classify prompt#1092

Merged
pieroit merged 1 commit intocheshire-cat-ai:developfrom
lucagobbi:develop
Jun 28, 2025
Merged

Improved classify prompt#1092
pieroit merged 1 commit intocheshire-cat-ai:developfrom
lucagobbi:develop

Conversation

@lucagobbi
Copy link
Collaborator

Description

StrayCat method classify sometimes returns incorrect results because LLMs generate verbose explanation in the output instead of just providing the resulting class. From my experience this is true especially with larger and more powerful models, probably too chatty in their cleverness.

Just improved the prompt with a little instruction to the LLM to provide simple and parsable output.

Tested with:

  • llama3.2:3b
  • qwen2.5:7b
  • gemma3:4b
  • gemma3:12b
  • gpt-4.1-nano-2025-04-14
  • gemini-2.5-flash-lite-preview-06-17
  • claude-3-7-sonnet-20250219
  • command-r7b-12-2024

Related to issue #1091

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@pieroit pieroit merged commit b678a08 into cheshire-cat-ai:develop Jun 28, 2025
2 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