Spaces:
Running
Running
./sparrow.sh "invoice_number, invoice_date, client_name, client_address, client_tax_id, seller_name, seller_address, | |
seller_tax_id, iban, names_of_invoice_items, gross_worth_of_invoice_items, total_gross_worth" "int, str, str, str, str, | |
str, str, str, str, List[str], List[str], str" --agent llamaindex --index-name Sparrow_llamaindex_doc1 | |
{ | |
"invoice_number": 61356291, | |
"invoice_date": "09/06/2012", | |
"client_name": "Rodriguez-Stevens", | |
"client_address": "2280 Angela Plain, Hortonshire, MS 93248", | |
"client_tax_id": "939-98-8477", | |
"seller_name": "Chapman, Kim and Green", | |
"seller_address": "64731 James Branch, Smithmouth, NC 26872", | |
"seller_tax_id": "949-84-9105", | |
"iban": "GB50ACIE59715038217063", | |
"names_of_invoice_items": [ | |
"Wine Glasses Goblets Pair Clear Glass", | |
"With Hooks Stemware Storage Multiple Uses Iron Wine Rack Hanging Glass", | |
"Replacement Corkscrew Parts Spiral Worm Wine Opener Bottle Houdini", | |
"HOME ESSENTIALS GRADIENT STEMLESS WINE GLASSES SET OF 4 20 FL OZ (591 ml) NEW" | |
], | |
"gross_worth_of_invoice_items": [ | |
66.0, | |
123.55, | |
8.25, | |
14.29 | |
], | |
"total_gross_worth": "$212,09" | |
} | |
================================================== | |
Time to retrieve answer: 63.74948522399791 | |
./sparrow.sh "invoice_number, invoice_date" "int, str" --agent llamaindex --index-name Sparrow_llamaindex_doc1 | |
{ | |
"invoice_number": 61356291, | |
"invoice_date": "09/06/2012" | |
} | |
================================================== | |
Time to retrieve answer: 15.325319556002796 | |
./sparrow.sh "gross_worth_of_invoice_items" "List[float]" --agent llamaindex --index-name Sparrow_llamaindex_doc1 | |
{ | |
"gross_worth_of_invoice_items": [ | |
66.0, | |
123.55, | |
8.25, | |
14.29 | |
] | |
} | |
================================================== | |
Time to retrieve answer: 17.55766561099881 | |
./sparrow.sh "guest_no, cashier_name" "int, str" --agent vllamaindex --file-path | |
/Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/inout-20211211_001.jpg | |
{ | |
"guest_no": 49, | |
"cashier_name": "Cashier Name" | |
} | |
./sparrow.sh "store_name, receipt_id, receipt_item_names, receipt_item_prices, receipt_date, receipt_store_id, | |
receipt_sold, receipt_returned, receipt_total" "str, str, List[str], List[str], str, int, int, | |
int, str" --agent vprocessor --file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/ross-20211211_010.jpg | |
{ | |
"store_name": "Ross", | |
"receipt_id": "Receipt # 0421-01-1602-1330-0", | |
"receipt_item_names": [ | |
"400226513665 x hanes b1ue 4pk", | |
"400239602790 fruit premium 4pk" | |
], | |
"receipt_item_prices": [ | |
"$9.99R", | |
"$12.99R" | |
], | |
"receipt_date": "11/26/21 10:35:05 AM", | |
"receipt_store_id": 421, | |
"receipt_sold": 2, | |
"receipt_returned": 0, | |
"receipt_total": "$25.33" | |
} | |
================================================== | |
Time to retrieve answer: 106.27733000399894 | |
./sparrow.sh assistant --agent "fcall" --query "Exxon" | |
{ | |
"company": "ExxonMobil", | |
"ticker": "XOM" | |
} | |
The stock price of the ExxonMobil is 113.48999786376953. USD | |
================================================== | |
Time to retrieve answer: 16.426633964991197 | |
./sparrow.sh "invoice_number, invoice_date, total_gross_worth" "int, str, str" --agent unstructured-light | |
--file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.pdf | |
{ | |
"invoice_number": 61356291, | |
"invoice_date": "09/06/2012", | |
"total_gross_worth": "$ 212,09" | |
} | |
================================================== | |
Time to retrieve answer: 93.95840702600253 | |
./sparrow.sh "names_of_invoice_items, gross_worth_of_invoice_items, total_gross_worth" "List[str], List[str], str" | |
--agent unstructured-light --file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.pdf | |
--options tables | |
{ | |
"names_of_invoice_items": [ | |
"Wine Glasses Goblets Pair Clear Glass", | |
"With Hooks Stemware Storage Multiple Uses Iron Wine Rack Hanging Glass", | |
"Replacement Corkscrew Parts Spiral Worm Wine Opener Bottle Houdini", | |
"HOME ESSENTIALS GRADIENT STEMLESS WINE GLASSES SET OF 4 20 FL OZ (591 ml) NEW" | |
], | |
"gross_worth_of_invoice_items": [ | |
"$66.00", | |
"$123.55", | |
"$8.25", | |
"$14.29" | |
], | |
"total_gross_worth": "$212.09" | |
} | |
================================================== | |
Time to retrieve answer: 109.55890596199606 | |
./sparrow.sh "invoice_number, invoice_date, client_name, client_address, client_tax_id, seller_name, seller_address, | |
seller_tax_id, iban, names_of_invoice_items, gross_worth_of_invoice_items, total_gross_worth" "int, str, str, str, str, | |
str, str, str, str, List[str], List[str], str" --agent unstructured --file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.pdf | |
{ | |
"invoice_number": 61356291, | |
"invoice_date": "09/06/2012", | |
"client_name": "Rodriguez-Stevens", | |
"client_address": "2280 Angela Plain Hortonshire, MS 93248", | |
"client_tax_id": "939-98-8477", | |
"seller_name": "Chapman, Kim and Green", | |
"seller_address": "64731 James Branch Smithmouth, NC 26872", | |
"seller_tax_id": "949-84-9105", | |
"iban": "GB50ACIE59715038217063", | |
"names_of_invoice_items": [ | |
"Wine Glasses Goblets Pair Clear Glass", | |
"With Hooks Stemware Storage Multiple Uses Iron Wine Rack Hanging Glass", | |
"Replacement Corkscrew Parts Spiral Worm Wine Opener Bottle Houdini", | |
"HOME ESSENTIALS GRADIENT STEMLESS WINE GLASSES SET OF 4 20 FL OZ (591 ml) NEW" | |
], | |
"gross_worth_of_invoice_items": [ | |
"6,00", | |
"123,55", | |
"8,25", | |
"14,29" | |
], | |
"total_gross_worth": "$ 192,81" | |
} | |
================================================== | |
Time to retrieve answer: 85.94320003400207 | |
./sparrow.sh "invoice_number, invoice_date, total_gross_worth" "int, str, str" --agent unstructured --file-path | |
/Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.pdf | |
{ | |
"invoice_number": 61356291, | |
"invoice_date": "09/06/2012", | |
"total_gross_worth": "$ 212,09" | |
} | |
================================================== | |
Time to retrieve answer: 24.074920559010934 | |
./sparrow.sh "store_name, receipt_id, receipt_item_names, receipt_item_prices, receipt_date, receipt_store_id, receipt_sold, | |
receipt_returned, receipt_total" "str, str, List[str], List[str], str, int, int, | |
int, str" --agent unstructured --file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/ross-20211211_010.jpg | |
{ | |
"store_name": "IT OSS DRESS FOR LESS PASADENA, CA 91107 626-351-5334 # 0421-01-1602-1330-", | |
"receipt_id": "0421-01-1602-1330-", | |
"receipt_item_names": [ | |
"A iain an 6513665 x hanes blue 4pk 9.99R 4nbes9e05500", | |
"fruit premium 4pk 12:98" | |
], | |
"receipt_item_prices": [ | |
"$9.99", | |
"$12.98" | |
], | |
"receipt_date": "11/26/21 10:35:05 AM", | |
"receipt_store_id": 421, | |
"receipt_sold": 2, | |
"receipt_returned": 0, | |
"receipt_total": "$25.00" | |
} | |
================================================== | |
Time to retrieve answer: 76.49691557901679 | |
./sparrow.sh "store_name, receipt_id, receipt_item_names, receipt_item_prices, receipt_date, receipt_store_id, receipt_sold, | |
receipt_returned, receipt_total" "str, str, List[str], List[str], str, int, int, int, | |
str" --agent unstructured-light --file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/ross-20211211_010.jpg | |
{ | |
"store_name": "Ross Dress for Less", | |
"receipt_id": "0421-01-1602-1330-0", | |
"receipt_item_names": [ | |
"A iain an 6513665 x hanes blue 4pk", | |
"9.99R 4nbes9e05500 fruit premium 4pk" | |
], | |
"receipt_item_prices": [ | |
"$22.98", | |
"$22.98" | |
], | |
"receipt_date": "11/26/21", | |
"receipt_store_id": 421, | |
"receipt_sold": 2, | |
"receipt_returned": 0, | |
"receipt_total": "$25" | |
} | |
================================================== | |
Time to retrieve answer: 80.8209542609984 | |
./sparrow.sh "names_of_invoice_items, gross_worth_of_invoice_items, total_gross_worth" "List[str], List[str], str" --agent instructor --file-path /Users/andrejb/infra/s | |
hared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.pdf | |
{ | |
"names_of_invoice_items": [ | |
"Wine Glasses Goblets Pair Clear Glass", | |
"With Hooks Stemware Storage Multiple Uses Iron Wine Rack Hanging Glass", | |
"Replacement Corkscrew Parts Spiral Worm Wine Opener Bottle Houdini", | |
"HOME ESSENTIALS GRADIENT STEMLESS WINE GLASSES SET OF 4 20 FL OZ (591 ml) NEW" | |
], | |
"gross_worth_of_invoice_items": [ | |
"66,00", | |
"123,55", | |
"8,25", | |
"14,29" | |
], | |
"total_gross_worth": "212,09" | |
} | |
================================================== | |
Time to retrieve answer: 97.52105149999261 | |
./sparrow.sh "invoice_number, invoice_date, description, quantity, net_price, net_worth, vat, gross_worth, total_gross_worth" "str, str, List[str], List[str], | |
List[str], List[str], List[str], List[str], str" --agent instructor --file-path /Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.pdf | |
--options tables --options unstructured --group-by-rows --update-targets --debug | |
{ | |
"invoice_number": "61356291", | |
"invoice_date": "09/06/2012", | |
"total_gross_worth": "212.09", | |
"items1": [ | |
{ | |
"description": "Wine Glasses Goblets Pair Clear Glass", | |
"quantity": "5,00", | |
"net_price": "12,00", | |
"net_worth": "60,00", | |
"vat": "10%", | |
"gross_worth": "66,00" | |
}, | |
{ | |
"description": "With Hooks Stemware Storage Multiple Uses Iron Wine Rack Hanging Glass", | |
"quantity": "4,00", | |
"net_price": "28,08", | |
"net_worth": "112,32", | |
"vat": "10%", | |
"gross_worth": "123,55" | |
}, | |
{ | |
"description": "Replacement Corkscrew Parts Spiral Worm Wine Opener Bottle Houdini", | |
"quantity": "1,00", | |
"net_price": "7,50", | |
"net_worth": "7,50", | |
"vat": "10%", | |
"gross_worth": "8,25" | |
}, | |
{ | |
"description": "HOME ESSENTIALS GRADIENT STEMLESS WINE GLASSES SET OF 4 20 FL OZ (591 ml) NEW", | |
"quantity": "1,00", | |
"net_price": "12,99", | |
"net_worth": "12,99", | |
"vat": "10%", | |
"gross_worth": "14,29" | |
} | |
] | |
} | |
================================================== | |
Time to retrieve answer: 24.45439903100487 | |
./sparrow.sh "{\"invoice_no\":\"example\", \"invoice_date\":\"example\", \"seller_name\":\"example\", \"seller_address\":\"example\", | |
\"seller_taxid\":\"example\", \"seller_iban\":\"example\", \"client_name\":\"example\", \"client_address\":\"example\", | |
\"client_taxid\":\"example\", \"invoice_items\":[{\"description\":\"example\", \"quantity\":0.00, \"net_price\":0.00, | |
\"net_worth\":0.00, \"vat\":\"example\", \"gross_worth\":0.00}], \"invoice_summary\":[{\"net_worth\":0.00, \"vat\":0.00, \"gross_worth\":0.00}]}" | |
--agent "sparrow-parse" --debug --options huggingface --options katanaml/sparrow-qwen2-vl-7b --file-path "/Users/andrejb/infra/shared/katana-git/sparrow/sparrow-ml/llm/data/invoice_1.jpg" | |
{ | |
"invoice_no": "61356291", | |
"invoice_date": "09/06/2012", | |
"seller_name": "Chapman, Kim and Green", | |
"seller_address": "64731 James Branch, Smithmouth, NC 26872", | |
"seller_taxid": "949-84-9105", | |
"seller_iban": "GB50ACIE59715038217063", | |
"client_name": "Rodriguez-Stevens", | |
"client_address": "2280 Angela Plain, Hortonshire, MS 93248", | |
"client_taxid": "939-98-8477", | |
"invoice_items": [ | |
{ | |
"description": "Wine Glasses Goblets Pair Clear Glass", | |
"quantity": 5.0, | |
"net_price": 12.0, | |
"net_worth": 60.0, | |
"vat": "10%", | |
"gross_worth": 66.0 | |
}, | |
{ | |
"description": "With Hooks Stemware Storage Multiple Uses Iron Wine Rack Hanging Glass", | |
"quantity": 4.0, | |
"net_price": 28.08, | |
"net_worth": 112.32, | |
"vat": "10%", | |
"gross_worth": 123.55 | |
}, | |
{ | |
"description": "Replacement Corkscrew Parts Spiral Worm Wine Opener Bottle Houdini", | |
"quantity": 1.0, | |
"net_price": 7.5, | |
"net_worth": 7.5, | |
"vat": "10%", | |
"gross_worth": 8.25 | |
}, | |
{ | |
"description": "HOME ESSENTIALS GRADIENT STEMLESS WINE GLASSES SET OF 4 20 FL OZ (591 ml) NEW", | |
"quantity": 1.0, | |
"net_price": 12.99, | |
"net_worth": 12.99, | |
"vat": "10%", | |
"gross_worth": 14.29 | |
} | |
], | |
"invoice_summary": [ | |
{ | |
"net_worth": 192.81, | |
"vat": 19.28, | |
"gross_worth": 212.09 | |
} | |
] | |
} | |
Time to retrieve answer: 47.84319644900097 | |
./sparrow.sh "[{\"instrument_name\":\"example\", \"valuation\":0}]" --agent "sparrow-parse" --debug --options huggingface | |
--options katanaml/sparrow-qwen2-vl-7b --file-path "/Users/andrejb/Documents/work/epik/bankstatement/bonds_table.png" | |
[ | |
{ | |
"instrument_name": "UNITS BLACKROCK FIX INC DUB FDS PLC ISHS EUR INV GRD CP BD IDX/INST/E", | |
"valuation": 19049 | |
}, | |
{ | |
"instrument_name": "UNITS ISHARES III PLC CORE EUR GOVT BOND UCITS ETF/EUR", | |
"valuation": 83488 | |
}, | |
{ | |
"instrument_name": "UNITS ISHARES III PLC EUR CORP BOND 1-5YR UCITS ETF/EUR", | |
"valuation": 213030 | |
}, | |
{ | |
"instrument_name": "UNIT ISHARES VI PLC/JP MORGAN USD E BOND EUR HED UCITS ETF DIST/HDGD/", | |
"valuation": 32774 | |
}, | |
{ | |
"instrument_name": "UNITS XTRACKERS II SICAV/EUR HY CORP BOND UCITS ETF/-1D-/DISTR.", | |
"valuation": 23643 | |
} | |
] | |
Time to retrieve answer: 22.78700271800335 |