Back to prompts

rag-prompt-llama3

extraction0 savesSource

This is a prompt for retrieval-augmented-generation. It is useful for chat, QA, or other applications that rely on passing context to an LLM. This is for use with llama3, using llama3 special tokens: https://llama.meta.com/docs/model-cards-and-prompt-formats/meta-llama-3/

Prompt Text

<|begin_of_text|><|start_header_id|>system<|end_header_id|> You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question. If you don't know the answer, just say that you don't know. Use three sentences maximum and keep the answer concise <|eot_id|><|start_header_id|>user<|end_header_id|> 
Question: {question} 
Context: {context} 
Answer: <|eot_id|><|start_header_id|>assistant<|end_header_id|>

Evaluation Results

1/28/2026
Overall Score
3.74/5

Average across all 3 models

Best Performing Model
Low Confidence
google:gemini-2.5-flash-lite
3.87/5
google:gemini-2.5-flash-lite
#1 Ranked
3.87
/5.00
adh
3.8
cla
4.4
com
3.4
In
715
Out
112
Cost
$0.0001
openai:gpt-5-mini
#2 Ranked
3.81
/5.00
adh
3.8
cla
4.3
com
3.4
In
645
Out
1,150
Cost
$0.0025
anthropic:claude-3-5-haiku
#3 Ranked
3.56
/5.00
adh
3.3
cla
4.3
com
3.0
In
765
Out
334
Cost
$0.0019
Test Case:

Tags