I present Prompt-Generator, a hybrid framework for adaptive prompt generation that integrates structured offline templates, large language model (LLM)-based rephrasing, and a learning-based selector (ranker). The system generates two candidate prompts—one from deterministic templates and another from Google Gemini—while logging explicit user choices to build a labelled dataset of preferences. Using sentence-transformer embeddings combined with a lightweight neural classifier, the ranker predicts which variant users are likely to prefer based on context features such as topic, style, platform, colour palette, and mood, as well as per-user history. To further enhance fluency and structure, we implement an ensemble synthesis module that merges template-driven scaffolding with LLM rephrasing. The platform includes human-in-the-loop (HITL) choice logging, a Streamlit-based user interface, and an Admin Dashboard offering analytics, ranker retraining, and interpretability via SHAP explanations. Reproducible scripts are provided for training, k-fold cross-validation, and evaluation with metrics such as accuracy, F1-score, and ROC-AUC. Preliminary experiments demonstrate that the embedding-based neural ranker significantly outperforms heuristic baselines, while ensemble prompts achieve higher user preference ratings. The framework also emphasizes privacy-aware logging, storing only anonymized data for reproducibility. This work establishes a foundation for adaptive prompt engineering and contributes a methodology for hybrid generation, interpretability, and personalization in creative AI applications.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A Hybrid Framework for Adaptive Prompt Generation Using Templates, LLMs, and Learned Rankers

  • Parth Shinge

摘要

I present Prompt-Generator, a hybrid framework for adaptive prompt generation that integrates structured offline templates, large language model (LLM)-based rephrasing, and a learning-based selector (ranker). The system generates two candidate prompts—one from deterministic templates and another from Google Gemini—while logging explicit user choices to build a labelled dataset of preferences. Using sentence-transformer embeddings combined with a lightweight neural classifier, the ranker predicts which variant users are likely to prefer based on context features such as topic, style, platform, colour palette, and mood, as well as per-user history. To further enhance fluency and structure, we implement an ensemble synthesis module that merges template-driven scaffolding with LLM rephrasing. The platform includes human-in-the-loop (HITL) choice logging, a Streamlit-based user interface, and an Admin Dashboard offering analytics, ranker retraining, and interpretability via SHAP explanations. Reproducible scripts are provided for training, k-fold cross-validation, and evaluation with metrics such as accuracy, F1-score, and ROC-AUC. Preliminary experiments demonstrate that the embedding-based neural ranker significantly outperforms heuristic baselines, while ensemble prompts achieve higher user preference ratings. The framework also emphasizes privacy-aware logging, storing only anonymized data for reproducibility. This work establishes a foundation for adaptive prompt engineering and contributes a methodology for hybrid generation, interpretability, and personalization in creative AI applications.