feat(prompt): enhance context and intent classification in templates
- Updated context template to include runtime metadata such as current time and week, improving contextual awareness in user queries. - Enhanced rewrite template with critical instructions for intent classification, ensuring that rewritten questions preserve essential entities and keywords. - Refined intent classification logic to prioritize user intents more effectively, improving the accuracy of responses based on user queries. - Added examples to clarify expected input and output formats for intent classification, enhancing usability for developers.
This commit is contained in:
@@ -904,8 +904,8 @@ func validateConversationConfig(req *types.ConversationConfig) error {
|
||||
if req.RerankTopK <= 0 {
|
||||
return errors.NewBadRequestError("rerank_top_k must be greater than 0")
|
||||
}
|
||||
if req.RerankThreshold < 0 || req.RerankThreshold > 1 {
|
||||
return errors.NewBadRequestError("rerank_threshold must be between 0 and 1")
|
||||
if req.RerankThreshold < -10 || req.RerankThreshold > 10 {
|
||||
return errors.NewBadRequestError("rerank_threshold must be between -10 and 10")
|
||||
}
|
||||
if req.Temperature < 0 || req.Temperature > 2 {
|
||||
return errors.NewBadRequestError("temperature must be between 0 and 2")
|
||||
@@ -1176,8 +1176,8 @@ func (h *TenantHandler) updateTenantRetrievalConfigInternal(c *gin.Context) {
|
||||
c.Error(errors.NewBadRequestError("keyword_threshold must be between 0 and 1"))
|
||||
return
|
||||
}
|
||||
if cfg.RerankThreshold < 0 || cfg.RerankThreshold > 1 {
|
||||
c.Error(errors.NewBadRequestError("rerank_threshold must be between 0 and 1"))
|
||||
if cfg.RerankThreshold < -10 || cfg.RerankThreshold > 10 {
|
||||
c.Error(errors.NewBadRequestError("rerank_threshold must be between -10 and 10"))
|
||||
return
|
||||
}
|
||||
if cfg.EmbeddingTopK < 0 || cfg.EmbeddingTopK > 200 {
|
||||
|
||||
Reference in New Issue
Block a user