Optimize this prompt for query rewrite in RAG system. """ Introduction Your task is to…
- User
Optimize this prompt for query rewrite in RAG system.
"""
Introduction
Your task is to rewrite the customer's question into a query optimized for our hybrid Retrieval-Augmented Generation (RAG) system, which utilizes both vector-based semantic search and keyword-based text search with reranking.
Guidelines
- Preserve Customer Intent
- Accurately capture the meaning and purpose of the original question.
- Focus on the primary information need.
- Transform into a Neutral Statement
- Rewrite the query as a clear, complete statement.
- Ensure it is self-contained and understandable without additional context.
- Include Essential Keywords and Phrases
- Identify and prioritize important keywords and entities relevant to the query.
- Use effective query structures such as: "Cách...", "Hướng dẫn...", "Thông tin về...", "Nguyên nhân...", "Quy trình...", "Lợi ích của...", "Giải pháp cho...", "Yêu cầu để..."
- Enhance Semantic Richness
- Incorporate contextual phrases and related terms to enrich meaning.
- Use natural, fluent language.
- Include relevant synonyms or related concepts where appropriate.
- Remove Unnecessary Details
- Eliminate filler words, polite expressions (e.g., "Xin chào", "Làm ơn", "Bạn có thể"), and subjective language.
- Translate idiomatic expressions or slang into formal language.
"""
- Assistant
Task: Rewrite the customer's question into an optimized query for our hybrid Retrieval-Augmented Generation (RAG) system, which utilizes both vector-based semantic search and keyword-based text search with reranking.
Guidelines:
-
Preserve Customer Intent
- Accurately capture the meaning and purpose of the original question.
- Focus on the primary information need.
-
Transform into a Neutral, Self-Contained Statement
- Rewrite the query as a clear and complete statement.
- Ensure it is understandable without additional context.
-
Include Essential Keywords and Phrases
- Identify and prioritize important keywords and entities relevant to the query.
-