5 ms·
I used it to transform cryptic credit card statement items into company names, which then allowed me to query my Gmail archives for receipts and invoices from t
by ttul 4y ago
I used it to transform cryptic credit card statement items into company names, which then allowed me to query my Gmail archives for receipts and invoices from these vendors, automating a manual process of accounting backup discovery that is the bane of my very existence. I even got GPT-4 to assess whether an email likely relates to an invoice or payment so that I could limit the amount of noise extracted from my email archives.
I highly recommend considering GPT-4 every time you encounter a painful manual process. In nearly every case where I have applied GPT-4, it has been successful in one-shot or few-shot solving the problem.
- Rastonbury 4y agoThat's pretty cool and interesting, I wonder how it would know credit card statement lines items or if that's in training data. Do you have an example of a cryptic item, like how is it totally unrelated to the purchase
- ttul 4y agoIt’s so simple it’s embarrassing to admit. I think the prompt is “Here is a credit card statement item. Identify the company: <STATEMENT>” GPT-4 is just that good at one shot classification tasks.
- alphadog 4y agoDid you use the API for this, or did you copy and paste into the GUI?
- ttul 4y agoAPI for sure.
- ChikkaChiChi 4y agoAre you triggering on email received? I'd love to see how you went about this so I can solve some of my own headaches!
- ttul 4y agoNo, the script just runs a Gmail search and iterates over the results. The workflow is as follows: 1. Send statement items to GPT to generate search queries for Gmail. (basically company names like “Adobe”) 2. Search Gmail using these queries and some search modifiers that are likely to winnow down the messages to those likely to contain invoices. 3. Send a snippet of the message to GPT and ask it whether the message seems like it might contain an invoice. 4. If so, parse the message and save any attachments or render the HTML body as a PDF and save that. Also grok the message for currency amounts so I can put the likely invoice total in the file name (this helps the accountants). That’s the flow. GPT helped me write it all, of course.
- q7xvh97o2pDhNrh 4y agoI keep seeing anecdotes like this, and I wonder: How do you feel about the privacy aspect of this? To do this, you had to feed your email into GPT-4, right?
- simonw 4y agoI think there's a widely held misconception that anything you paste into GPT-4 will be used as raw training data by the model. Some people even seem to believe that it's learning continuously, so something you paste in could show up in an answer for another user a few minutes later. My mental model of how this works is somewhat different: - It takes months to train a model on raw data, and OpenAI train new ones (that get released to the public) quite infrequently. - OpenAI DO NOT WANT your private data in their training data. They put a great deal of work into stripping out PII from the training data that they do use already (this is described in their papers). They're not going to just paste in anything that anyone typed into that box. Here's the problem though: they DO use ChatGPT interactions to "improve" their services. I don't think that means piping the data directly into training, but they clearly log everything and use those interactions as part of subsequent rounds for things like fine-tuning and RLHF. Also they had that embarrassing bug a few weeks ago where some users could see the titles of conversations had by other users. So it's not irrational to worry about pasting data into GPT-4 - it gets logged, and it could leak by accident. But I'm confident that data passed to ChatGPT isn't being piped in as raw training data for subsequent versions of their live models. (I hope I'm right about this though - I thought about blogging it, but OpenAI's transparency isn't good enough that I'd feel comfortable staking my reputation on this)
- awinter-py 4y agoYes re treating interactions as RLHF. Could imagine them developing a flow to automatically catalog interactions as successful and unsuccessful, then cluster those by domain + interaction flow. If someone has a successful interaction in a cluster that is normally unsuccessful, treat that as a 'wild-type' prompt engineering innovation that needs to be domesticated into the model. I think you're right that blindly training on chats would bring back the olden days of google bombing ('santorum') And also that any company with 'improve' in their TOS isn't committing to perfect privacy
- garysahota93 4y agoWould you be open to making this logic open source? I'd LOVE to do this as well. (I use LunchMoney.app for all spend tracking, but don't have my receipts logged)
- ttul 4y agoSure why not. It’s absolutely horrific Python code. Maybe someone else can clean it up 10,000x. I’ll make a note to move it to GitHub.
- jnsie 4y agoYou should turn this into a product (or open source it). I'd imagine this is a pain point for many, myself included.
- haliskerbas 4y agoHow are you interfacing with gmail? I also wanted to clean up my inbox with some help and wasn’t sure the best touch point
- ttul 4y agoUsing the Gmail API. It uses OAuth to authenticate. Google Cloud lets you create a custom OAuth login box for your “app”. You download a JSON file and the Python client code reads that and sends the user to a web browser to go through the OAuth flow. Then some kind of bearer token is stored in a dot file and your code has access to your Gmail… Releasing a public app that has Gmail access requires a very expensive security audit by Google. But for a private internal app, of course you don’t need the audit.
- slake 4y agoWould you mind sharing the prompt design you have for such tasks. For example, I've been wondering if we can use it for reconciling two statements by auto matching invoices. Wanted to understand how that can be structured in the prompt.