DEV Community

Arman Tarkhanian
Arman Tarkhanian

Posted on

2023-08-11: Prompt Engineering

So... I kind of forgot to write a post on Friday and didn't get a chance to on Saturday or Sunday. Oh well, it's fine.

Prompt Tuning and Example Generation

Anyway, I think I can note that most of this week was dedicated to further tuning that prompt.

One of the major tasks was to work on using the OpenAI API to actually produce examples for every single one of the 11 subfields that we're interested in at the moment. I managed to make a pretty good Python script that will use a for loop to generate through a list of subfields, and I managed to create 11 such JSONs. Here are a couple of funny ones:

{
    "Formality Level": "very low",
    "Ambiguity Level": "medium",
    "Education Level": "middle school",
    "Description of User": "A 19-year-old Jamaican male part-time worker, nervous and scared.",
    "Legal Subfield": "criminal defense law",
    "User's Inquiry": "listen, they got me red-handed man. busted for the weed they found, but it's not mine, honest! i was just hanging out when the cops showed up, now they blaming me. can't afford to get a record man, need somebody to help me dodge these charges somehow."
}

{
    "Formality Level": "very high",
    "Ambiguity Level": "low",
    "Education Level": "PhD",
    "Description of User": "Australian, male, lecturer, calm, repetitive strain injury",
    "Legal Subfield": "Workers Compensation Law",
    "User's Inquiry": "Esteemed Sir/Madam, I am presently grappling with the sufferings brought on by a rather bothersome repetitive strain injury which, I believe, is a direct consequence of my interaction with outdated technologies in my workplace. Notwithstanding the clear linkage, it appears that I am deemed ineligible for the provision of workers' compensation; a conclusion I am having difficulty accepting. Consequently, I am reaching out with an earnest hope of garnering potential legal options."
}

Regardless, I think adding a layer of refinement was good. Maybe, if needed, we could make it two, but we'll see if we can't work with the current dataset as it is.

Security and Collaboration Guidelines

We also went over some general security guidelines with regard to setting up GitHub .gitignores and .env files to make sure nothing weird is getting uploaded. My boss wants to make sure that any pull requests going forward are granular and atomic so that he can more easily assess each change. I guess that's where the phrase "commit early, commit often" comes from.

Unreal Project Update

In other news, I finally got the PC to open the Unreal project. Apparently, every time I was setting the pagefile size, it never actually saved the setting because I had to click a "set" button and then click "OK," and I somehow missed that. Regardless, now I can finally try to import the assets this week, hopefully. The textures are kind of weird though, and I'm not sure why.

Anyway, that's all I can think of for now. Until next Friday (hopefully on time), cheers!

Top comments (0)