this post was submitted on 17 Nov 2023
1 points (100.0% liked)

LocalLLaMA

3 readers
1 users here now

Community to discuss about Llama, the family of large language models created by Meta AI.

founded 1 year ago
MODERATORS
 

Prompt like:

Extract the company names from the texts below and return as an array

-- ["Google", "Meta", "Microsoft"]

you are viewing a single comment's thread
view the rest of the comments
[–] DreamGenX@alien.top 1 points 11 months ago

On top of what other said, make sure to include a few shot examples in your prompt, and consider using constrained decoding (ensuring you get valid json of whatever schema you provide, see pointers on how to do it with llama.cpp).

For few shotting chat models, append fake previous turns, like:

System: 
User: 
Assistant: 
...
User: 
Assistant: 
User: