1

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%
etang
  • 151
  • 2

2 Answers2

1

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:
c p
  • 121
  • 5
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."