<p>Try with <a href="https://www.promptingguide.ai/techniques/fewshot" rel="nofollow noreferrer">few-shot prompting</a>:</p>
<pre><code>Give a precise answer to the question based on the context. Don't be verbose.
CONTEXT: .....
QUESTION: what is the commission rate?
ANSWER: 20%
CONTEXT: I have 2 balls, you have 1 ball
QUESTION: how many balls do you have?
ANSWER: 1
CONTEXT: .....
QUESTION: what is the tax rate?
ANSWER:
</code></pre>

CC BY-SA 4.0
2024-02-21T08:46:52.313Z
2024-02-21T08:46:52.313Z
c p
<p>I just tried this prompt, and changed it very slightly and it seems to have achieved the desired result.</p>
<p>Have you tried something like this?</p>
<p>&quot;Give a precise answer to the question based on the context without stating so. Don't be verbose.&quot;</p>

CC BY-SA 4.0
2024-01-21T21:54:07.037Z
2024-01-21T22:04:02.743Z
2024-01-21T22:04:02.743Z
nerdsville
<p>I use LLMs for QA tasks. The following prompt sent to Llama-2-13b-chat-hf:</p>
<pre><code>Give a precise answer to the question based on the context. Don't be verbose.
CONTEXT: .....
QUESTION: what is the commission rate?
ANSWER:
</code></pre>
<p>It gives me the answer like:</p>
<pre><code>The commission rate is 20%
</code></pre>
<p>How to prompt so that it can give the answer without a full sentence like:</p>
<pre><code>20%
</code></pre>

<prompt-design>
How to prompt LLMs to get a concise answer for a question?
etang
# How to prompt LLMs to get a concise answer for a question?

(Asked by: username_0 on 2023-09-15)

I use LLMs for QA tasks. The following prompt sent to Llama-2-13b-chat-hf:
Give a precise answer to the question based on the context. Don't be verbose.
CONTEXT: .....
QUESTION: what is the commission rate?
ANSWER:

It gives me the answer like:
The commission rate is 20%

How to prompt so that it can give the answer without a full sentence like:
20%

**Tags:** prompt-design


---

## 2 answers

### Answer by username_1 on 2024-02-21. Score: 0

Try with few-shot prompting:
Give a precise answer to the question based on the context. Don't be verbose.
CONTEXT: .....
QUESTION: what is the commission rate?
ANSWER: 20%
CONTEXT: I have 2 balls, you have 1 ball
QUESTION: how many balls do you have?
ANSWER: 1
CONTEXT: .....
QUESTION: what is the tax rate?
ANSWER:


---

### Answer by username_2 on 2024-01-21. Score: 0

I just tried this prompt, and changed it very slightly and it seems to have achieved the desired result.

Have you tried something like this?

"Give a precise answer to the question based on the context without stating so. Don't be verbose."


---

