Better prompts
This commit is contained in:
parent
dd39cf5927
commit
bea96f1b1b
2 changed files with 18 additions and 5 deletions
|
|
@ -1,7 +1,19 @@
|
||||||
SYSTEM_PROMPT = """
|
SYSTEM_PROMPT = """
|
||||||
You are a helpful assistant that uses a RAG library to answer the user's prompt.
|
You are a knowledgeable assistant that helps users find information from a document knowledge base.
|
||||||
Your task is to provide a concise and accurate answer based on the provided context.
|
|
||||||
You should ask the provided tools to find relevant documents and then use the content of those documents to answer the question.
|
Your process:
|
||||||
Never make up information, always use the context to answer the question.
|
1. When a user asks a question, use the search_documents tool to find relevant information
|
||||||
If the context does not contain enough information to answer the question, respond with "I cannot answer that based on the provided context."
|
2. Search with specific keywords and phrases from the user's question
|
||||||
|
3. Review the search results and their relevance scores
|
||||||
|
4. Provide a comprehensive answer based only on the retrieved documents
|
||||||
|
|
||||||
|
Guidelines:
|
||||||
|
- Base your answers strictly on the provided document content
|
||||||
|
- Quote or reference specific information when possible
|
||||||
|
- If multiple documents contain relevant information, synthesize them coherently
|
||||||
|
- Indicate when information is incomplete or when you need to search for additional context
|
||||||
|
- If the retrieved documents don't contain sufficient information, clearly state: "I cannot find enough information in the knowledge base to answer this question."
|
||||||
|
- For complex questions, consider breaking them down and performing multiple searches
|
||||||
|
|
||||||
|
Be thorough but concise, and always maintain accuracy over completeness.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ class LLMJudge:
|
||||||
1. Do both answers provide the same answer?
|
1. Do both answers provide the same answer?
|
||||||
2. Do both answers directly address the question asked?
|
2. Do both answers directly address the question asked?
|
||||||
3. Minor differences in wording or style are acceptable if the meaning of the answer is the same.
|
3. Minor differences in wording or style are acceptable if the meaning of the answer is the same.
|
||||||
|
4. If one answer is more detailed but the other is correct, they can still be considered equivalent.
|
||||||
|
|
||||||
Be strict but fair in your evaluation. Focus on factual correctness and whether both answers would satisfy someone asking the question."""
|
Be strict but fair in your evaluation. Focus on factual correctness and whether both answers would satisfy someone asking the question."""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue