Invoice Entity Extraction

Given an invoice, the model is able to extract the named entities in the contract

Generate Content
Extraction

Input

Given a banking invoice, please return the name of the vendor.

Bank Invoice: PURCHASE #0521 MERCHANT ALLBIRDS ACC XXX3846
Vendor: ALLBIRDS

--

Bank Invoice: PURCHASE #6781 MERCHANT SHOPPERS ACC XXX9877
Vendor: SHOPPERS

--

Bank Invoice: PURCHASE #0777 CN TOWER ACC XXX3846
Vendor:

Response

CN TOWER

API Request
import cohere
co = cohere.Client('{apiKey}')
response = co.generate(
model='xlarge',
prompt='Given a banking invoice, please return the name of the vendor.\n\nBank Invoice: PURCHASE #0521 MERCHANT ALLBIRDS ACC XXX3846\nVendor: ALLBIRDS\n--\nBank Invoice: PURCHASE #6781 MERCHANT SHOPPERS ACC XXX9877\nVendor: SHOPPERS\n--\nBank Invoice: PURCHASE #0777 CN TOWER ACC XXX3846\nVendor:',
max_tokens=15,
temperature=0.3,
k=0,
p=1,
frequency_penalty=0,
presence_penalty=0,
stop_sequences=["--"],
return_likelihoods='NONE')
print('Prediction: {}'.format(response.generations[0].text))

Parameters

model_sizexlarge
frequency_penalty0
k0
max_tokens15
p1
presence_penalty0
stop_sequence--
temperature0.3