Skip to content

Add system prompt optimization with version selection#81

Merged
anand-presidio merged 2 commits intopresidio-oss:mainfrom
doso:main
Mar 25, 2025
Merged

Add system prompt optimization with version selection#81
anand-presidio merged 2 commits intopresidio-oss:mainfrom
doso:main

Conversation

@doso
Copy link
Copy Markdown
Collaborator

@doso doso commented Mar 24, 2025

Description

This PR adds system prompt optimization capabilities to the HAI Build code generator. It introduces a new feature that allows users to select different system prompt versions, each optimized for different performance characteristics and API cost savings.

The implementation includes:

  1. A new dropdown in the settings UI for selecting system prompt versions
  2. Four different system prompt optimization levels:
    • Precision: Reduces API cost by ~40%
    • Clarity: Reduces API cost by ~30%
    • Harmony: Reduces API cost by ~60%
    • Standard: Default with no optimizations (highest API cost)
  3. Modular system prompt architecture with version-specific implementations

This feature helps users optimize their API costs while maintaining appropriate levels of performance for their specific use cases.

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)
  • 📚 Documentation update

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes

This feature is marked as experimental in the UI. The system prompt optimizations are designed to reduce API costs while maintaining functionality, with different versions offering different trade-offs between cost savings and performance characteristics.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 24, 2025

🦋 Changeset detected

Latest commit: 677f682

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hai-build-code-generator Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@doso doso requested a review from anand-presidio March 24, 2025 15:51
Copy link
Copy Markdown
Collaborator

@anand-presidio anand-presidio left a comment

Choose a reason for hiding this comment

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

LGTM!

@anand-presidio anand-presidio merged commit 79e1c52 into presidio-oss:main Mar 25, 2025
1 check 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