Comment

Comment by rwhyan

Looks great!

I've been playing around GPT information extraction, and I think your prompt can be simplified to save on token costs:

Instead of:

`The company name (field name: "companyName", field type: string)`

I use a prompt that looks like:

`... The JSON should consist of the following information, using the format <field name: field type>: The company name <companyName: string>`

I've also played around using JSON structure in the prompt, such as:

`Return a JSON object with following model, with the format <field type: instructions to extract> { "companyName": <string: The company name>, ... }`

In my experience, often the attribute name is enough and GPT can infer how to extract the information (i.e. { "companyName": string ... }

parent rwhyan 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton