Skip to content

Commit

Permalink
Merge pull request #475 from aws-samples/lvn
Browse files Browse the repository at this point in the history
chore: remove reference
  • Loading branch information
NingLu authored Dec 6, 2024
2 parents 3990a40 + dcafd06 commit a830435
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions source/lambda/online/common_logic/common_utils/prompt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,32 +144,21 @@ def prompt_template_render(self, prompt_template: dict):
3. Relevance:
- If the query is unrelated to the content in <docs></docs>, respond with: "根据内部知识库,找不到相关内容。"
4. Reference Citation:
- Include the context ID you refer to in your response using the <reference> tag.
- The context ID should be the index of the document in the <docs> tag.
- Always use the correct format: \n<reference>X</reference>, where X is the document index.
- Example: \n<reference>1</reference> for <doc index="1"></doc>
- All <reference> tags should be in the beginning of the response
- IMPORTANT: Ensure that the opening tag <reference> always comes before the number, and the closing tag </reference> always comes after the number.
5. Language Adaptation:
4. Language Adaptation:
- Respond in the same language as the user's query.
- If the query is in a language other than English, adapt your response accordingly.
6. Confidentiality:
5. Confidentiality:
- Do not disclose any information not present in the provided documents.
- If asked about topics outside your knowledge base, politely state that you don't have that information.
7. Formatting:
6. Formatting:
- Use appropriate formatting (bold, italics, bullet points) to enhance readability when necessary.
8. Completeness:
7. Completeness:
- Ensure your response addresses all aspects of the user's query.
- If multiple relevant documents are provided, synthesize the information coherently.
9. Tag Verification:
- Before finalizing your response, double-check all <reference> tags to ensure they are correctly formatted.
- If you find any incorrectly formatted tags (e.g., 1</reference>), correct them to the proper format (\n<reference>1</reference>).
</response_rules>
Reference the following documents to answer the query:
Expand Down

0 comments on commit a830435

Please sign in to comment.