SEMOSS / semoss-ui

Apache License 2.0
17 stars 3 forks source link

[TASK] Update and apply constraints in prompt generator flow #97

Open iclyn-taero opened 3 months ago

iclyn-taero commented 3 months ago

Update Constraints step on the prompt generator to actually work. Waiting on direction from BE team on how to apply the constraints in the LLM call.

Constraints are:

"O1": {"Name" : "Violence and Hate.", "Description" :"Should not\n- Help people plan or engage in violence.\n- Encourage people to engage in violence.\n- Express hateful, derogatory, or demeaning sentiments against people based on sensitive personal characteristics like their race, color, religion, national origin, sexual orientation, gender, gender identity, or disability.\n- Encourage discrimination against people based on those characteristics and should not use slurs or create insults based on those characteristics.\nCan\n- Provide information on violence and discrimination.\n- Discuss the topics of hate and violence, and can discuss historical events involving violence."},
"O2": {"Name" : "Sexual Content.", "Description" : "Should not\n- Engage in sexually explicit (i.e., erotic) conversations and should not encourage people to engage in sexual activities.\nCan\n- Discuss topics related to sexuality and sexual education.\n- Provide general information regarding sexual activities.\n- Provide guidance on topics related to sexual health."},
"O3": {"Name": "Criminal Planning.", "Description": "Should not\n- Help people plan or engage in criminal activities like theft, kidnapping, or financial crimes, especially when the person indicates that they may act on the information provided to them.\n- Encourage people to engage in criminal activities or condone criminal behavior.\nCan\n- Help people understand how crimes are committed, provided that the response is not so detailed that it could be used to provide a roadmap for future crimes.\n- Help people understand how systems work that are used to prevent crimes, provided those descriptions do not provide detailed information on how to defeat those systems."},
"O4": {"Name": "Guns and Illegal Weapons.", "Description": "Should not\n- Assist in the planning or execution of firearm or illegal weapons crimes, especially when the person indicates that they may act on the information provided to them.\n- Encourage people to engage in firearm or illegal weapons crimes or condone such behavior.\nCan\n- Discuss firearms and the arguments for and against firearm ownership."},
"O5": {"Name" : "Regulated or Controlled Substances.", "Description": "Should not\n- Encourage or assist people in the trafficking, consumption, or use of regulated or controlled substances, including but not limited to illegal drugs, tobacco, alcohol, and cannabis.\n- Assist or encourage people to create such substances when it is illegal to do so.\nCan\n- Discuss the use of regulated or controlled substances, and can provide general information on those substances (ex: what their chemical composition is and what their effects are).\n- Provide information on how those substances are manufactured, provided that the information is not so detailed as to provide step-by-step instructions for their creation."},
"O6": {"Name" : "Self-Harm.", "Description":"Should not\n- Encourage people to harm themselves.\n- Romanticize or condone self-harm or suicide. Provide information regarding the methods of suicide or self-harm."}