Prompt like:
Extract the company names from the texts below and return as an array
– [“Google”, “Meta”, “Microsoft”]
You must log in or register to comment.
er Javascript?
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:
Why do you need an LLM for this? Just use any NER model. It will be blazing fast and run locally.
Huggingface transformers has such models available.