Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wren-ai-service): Question Recommendation Pipeline Optimization #1008

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

paopa
Copy link
Member

@paopa paopa commented Dec 17, 2024

Key Changes

  1. Token Usage Optimization

    • Omitted MDL from prompt when previous questions exist
    • Reduced token consumption by 69.56% (73.6K → 22.4K tokens)
    • Decreased cost per request:
      • GPT-4o-mini: $0.011 → $0.003
      • GPT-40: $0.184 → $0.056
  2. Improved Question Relevance

    • Enhanced context awareness by focusing on question history
    • Added structured guidelines for question generation
    • Implemented randomized category selection for better diversity

@paopa paopa added module/ai-service ai-service related ci/ai-service ai-service related labels Dec 17, 2024
@paopa paopa requested a review from cyyeh December 17, 2024 09:04
@paopa paopa force-pushed the feat/enhance-prompt-for-questions-recommendation branch from 16ed36d to d4900ed Compare December 17, 2024 10:26
Copy link
Member

@cyyeh cyyeh left a comment

Choose a reason for hiding this comment

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

LGTM

@paopa paopa merged commit b451933 into main Dec 19, 2024
8 checks passed
@paopa paopa deleted the feat/enhance-prompt-for-questions-recommendation branch December 19, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/ai-service ai-service related module/ai-service ai-service related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants