r/ChatGPTCoding • • Nov 25 '24

Question How do I create an agent to process hundreds of files?

Hi all,

I have hundreds of documents detailing profesional-client interaction logs, between 1-3 pages long and I want to process them into content I can use for fine tuning an open source model. I know the fine tuning format is typically user-LLM question answer pairs, or multi-turn convos. By uploading one document and asking Claude or gpt 4o to generate training data in the required format, I am able to get the result I want. But I don't want all the files to part of the same context window.

How can I create an agent or set of agents that go through a dir and perform this conversion, ideally with a local model on LMstudio or if needed with an API? Has anyone done this? Any recommendations?

Thanks for the advance. I've learned so much from this community!

11 Upvotes

8 comments sorted by

6

u/ksdio Nov 25 '24

just get chatGPT to create a simple python program to loop through all the files in a directory.

3

u/Calazon2 Nov 25 '24

I have not worked with it at this level. That said, ultimately you're just looping through files, making an API call (or similar local LLM request) for each file, and outputting the response? You could write a program to do that programmatically.

1

u/codematt Nov 25 '24

Take a look at Dify or some others like it if you don’t mind a small amount of work. Can customize the workflow to your hearts content is the nice part.

That one costs but it’s made so easy to do what you want. There are open source alternatives too I am less sure about that do the same thing.

1

u/[deleted] Nov 25 '24

[removed] — view removed comment

1

u/AutoModerator Nov 25 '24

Sorry, your submission has been removed due to inadequate account karma.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] Nov 26 '24

[removed] — view removed comment

1

u/AutoModerator Nov 26 '24

Sorry, your submission has been removed due to inadequate account karma.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.