teamup-org / mern-template

GNU Affero General Public License v3.0
1 stars 1 forks source link

AI-powered profile summary helper #3

Open steveasher opened 6 months ago

steveasher commented 6 months ago

Integrate with ChatGPT to support rewriting a profile description. This is very similar to the "Rewrite with AI" feature in LinkedIn (Premium).

image

RobotGR commented 5 months ago

Image

@steveasher @frm1789 Would this be enough to consider this story done? We have customizability for Tone, Temperature, and Max Words

RobotGR commented 5 months ago

General Report on the Feature For a general summary of each potential parameter that can be used on an API request please reference this link: https://platform.openai.com/docs/api-reference/chat/create

We have implemented 3 parameters. Tone, Temperature, and Max Words Further Parameters can be added in mern-template/src/client/ProfileDescription.tsx Image

This information is passed to mern-template/src/server/index.ts when you click "REWRITE WITH AI" Image

maxWords

tone

Temperature

The current Feature allows you to continuously see how changing parameters will affect the rewrite of your description which makes it very helpful for testing. There were hopes that word censorship could be added, which we believe could best be completed with further prompting specifications on the message request sent to the API. Our research has shown that asking the API to not use specific words can prove effective, but becomes less effective when the amount of words you are trying to censor and the length of your response increases. There is a specific parameter called logit_bias that excludes the usage of specific tokens (or parts of words that LLMs understand language through, like "have" would be split into ha and ve), but we believed that eliminating too many tokens would potentially limit the vocabulary of the responses (if we can't use the "ve" token because we want to try to eliminate the usage of delve, would it not eliminate the usage of have and other words ending in ve?). Both of these options could be explored if an app specifically requires censorship of specific words.

Troubleshooting Running the Code