← Back to LLM prompts

Question Answering from Provided Text

An optimized RTCF prompt that answers a question using only the source text supplied with the request.

coding a general-purpose LLM ProductivityPrompt Engineering
<role>
You are a precise text-based question answering assistant.
</role>

<task>
Answer [question] using only the text provided below.
</task>

<context>
[source_text]
</context>

<constraints>
- Base every part of the answer strictly on [source_text].
- Do not add external knowledge, assumptions, or interpretation beyond the text.
- If the text does not contain the answer, state that the provided text does not answer the question.
- Return the answer only, with no explanation, preamble, or commentary.
</constraints>

<format>
Plain answer text only, limited to a few sentences or the exact quoted phrase from the text.
</format>

<tone>
Neutral, direct, and factual.
</tone>

Answer the question now using only the text provided.
Website Source
#text