DEV Community

Cover image for Abusive Communication Summary Assistant (Open Source Configuration Text)
Daniel Rosehill
Daniel Rosehill

Posted on

Abusive Communication Summary Assistant (Open Source Configuration Text)

Leveraging large language models' excellent abilities in text summarization and the flexibility of assistant configurations to both shield users from abusive messages while also recording them for posterity

This post contains the configuration text for a large language model (LLM) assistant designed to assist the user to document verbally abusive messages received through digital channels. These might be emails, WhatsApp conversations, or messages received through any other digital channel.

The configuration text was drafted with a very specific and painful use case in mind.:

Many individuals who receive hurtful and abusive messages from toxic people find that reading these communications provokes anxiety, trauma, and upset. They can be deeply triggering.

Equally, those who receive such messages commonly find that recording them serves a few important and useful purposes. As such, many victims of emotional abuse try to navigate the conflicting objectives of shielding themselves from reading the original hurtful messages while also wishing to record them for posterity in some kind of digital system.

While there are ways around this problem, like co-opting a trusted friend or spouse to help, equally this is a great use case for AI, which has the benefit of being available for discrete assistance around the clock (if you're technically inclined and prefer the idea of using this locally, assistants can be configured as system prompts saved as parameters for locally deployed models. LM Studio is a great access platform / frontend).

Common reasons for wishing to retain these hurtful messages include the following:

  • Having an objective record of the communications received can serve as a tool against the tendency of victims' abuse to engage in self-gaslighting. Those who receive messages like this can over time convince themselves that they weren't as hurtful or bad as they really were.

  • Many individuals who have been on the receiving end of messages such as these are also in therapy. Given that we can't have our therapists wearing invisibility cloaks and hiding in the background when we're being abused, recording and summarising the messages received can serve as a “next best thing." Many abusers are savvy enough to know that conducting their abuse through easily recordable digital channels is liable to get them caught out. So sometimes, when that happens by lapse, these messages are especially valuable instances of abuse in action.

Notes about the configuration text

The configuration text for this assistant was written with exactly these kind of dynamics and situations in mind.

It has two key instructions to assist the user in this respect:

- Firstly to shield the user from reading the original message. The mechanism it uses to do this is by providing a summary of the communication, and then a trigger warning and finally white space. The purpose of the whitespace instruction is to provide room for the user to avoid accidentally seeing the message unless they wish to do so.

- Secondly, the assistant is configured to copy the original message in its entirety for the purpose of documentation. The configuration instructions here were designed to cover the most common use cases, such as the user providing a copy of a text message or a screenshot of a communication exchange on WhatsApp.

Both of these main parts of the output are preceded by a summary section, which includes a copy of the message parameters such as the sender name, phone number(s) (requires vision capabilities) and timestamps evident in the supplied text.

Vision-capable models not assumed

In order to be as portable as possible and to be deployable onto as many platforms as possible, the configuration text was written to not assume that the underlying model has vision capabilities (ie, the ability to parse user-uploaded images).

Given that LLMs with vision are increasingly becoming the norm and will undoubtedly be the standard in the very near future, however, the user may wish to remove this instruction in order to avoid confusing the model.

Another approach, if using a vision-capable model, is to add a configuration parameter along the lines of_ "if the user uploads an image, assume that this is a screenshot of a conversation containing the abuse." _

The intention behind such an instruction would be to save the user from having to explicitly state that every time. But my experience has been that with the powerful instructional models we have at our easy disposal today. Such a specific instruction is not generally necessary. Rather, the models are capable of inferring that this is the purpose of the image supplied and can autonomously run it through image to text conversion to append it to the prompt, understanding its purpose without explicit user instruction.

Notes to guide model and platform selection

The useful thing about LLM assistants is that they are highly portable flexible ways of honing a widely capable large language model on a specific purpose.

Whether the configuration is written in natural language like this one or in JSON they can be easily shifted around between platforms and to a good extent they're also model agnostic.

Some deployment platforms like Hugging Face Chat allow the user to choose a specific model which underlies the assistant and to set parameters such as temperature and top P. In some instances, this makes a lot of difference, but for this particular assistant, you can be fairly flexible.

Any model with good reasoning capabilities would be suitable to deploy this on top of.

This assistant could be provisioned on OpenAI or on Hugging Face Chat. Or it could be deployed as a private "custom GPT" (ChatGPT). I have a version of this assistant running on Hugging Face Chat for anyone who wishes to use it exactly as configured below.

Modifying the configuration text for personal circumstances

The configuration text here is shared on an open source basis to allow anyone who wishes to tweak the configuration to better reflect the specific circumstances of their own abuse to freely do so.

Some instructions, however, might be generally useful, including the instruction to the model to assume the context of abuse as an underlying dynamic, which can make the direction of the output more deterministic without needing to do things like manually configure temperature settings.

The configuration is deliberately open-ended as to whether the end user is the victim of abuse or someone who is assisting them.

The intention here is that someone might be willing to read the original message and verify that the model has correctly copied it for posterity before deleting the original communication. If that is not the situation you envision using this assistant in, again, it's recommended to remove this from the configuration. Removing unnecessary verbiage from the configuration text is one way to make the assistant more reliable in its operation.


Configuration Text

Your task is to act as an empathetic assistant helping the user to document abusive messages received from people.

Keep in mind the messages that the user is asking you to document are likely to be distressing to them in nature.

The user may not have read the messages in their entirety even. And may have surmised from skimming them or just knowing the general nature of the relationship that they are likely to be abusive in nature or tone.

Your task in helping the user with this difficult endeavor is twofold:

  • Firstly, to provide a dispassionate but accurate summary of the correspondence for the purposes of documentation. Interpret documentation widely. This might be to help the user with a legal need, to have the record of the correspondence for a therapy session, etc. For that reason, it's important that you accurately note the time of the email or message as well as the exact name and sending address in the sender field, and any other identifiable particular such as individuals included in CC, etc. If you have vision capabilities, these may be evident in the screenshot that the user provides, in which case include these in the written output that you generate.
  • Your second task is to provide a thorough documentation of the correspondence, understanding that it may be seen by somebody assisting the user. The user may find reading the correspondence so triggering and distressing that the output you generate will be seen by them and then passed on to the user. Indeed, the person you are interacting with may be this third party. But you can assume that the person is acting with full consent of the user to pass on the message and to have it summarized as you will do.

Begin the conversation by introducing yourself and your purpose to the user. Tell the user that you understand that viewing the message might be triggering or distressing.

Next, you can move on to generating your output. Format exactly like this.

Firstly, provide a trigger warning based upon the analysis of the message. Then explain that you are going to leave 20 lines of white space. The purpose of this white space is that the user can avoid seeing the message.

Your output should be exactly as follows.

  • Firstly under the header Details provide a dispassionate technical summary of the communication. For example, this was an email sent from Joe at joe.com with the timestamp 13 December 2024 14 24 UTC. The recipient was john@joe.com. The record of correspondence the user provides might be a screenshot of a Whatsapp conversation which you are parsing with your vision capability. If this is the case, you should note the names of the individuals in the correspondence, along with any identifiable information such as their phone numbers. Preserve the phone numbers in the exact format that they are visible in the messages. Include any timestamps as well.
  • Next, provide a summary of the communication. If this is an email, you can summarize the overall message and tone Of the message sent to the user. Generate the summary through the prism of presumed abuse Noting instances in which the center appears to have engaged or be engaging in classic patterns associated with verbal or narcissistic abuse, such as gaslighting or victim blaming.
  • Finally, provide the totally unedited initial message sent by the user. If this is an email, that means that you should repeat the message in its entirety. If the messages are being derived from a screenshot of a Whatsapp conversation or from any other messaging client, you should include the Messages In a format that captures the original as accurately as possible. For example John, I don't remember what I said, Jane. Yes, you do.

After you have finished providing the output to the user, ask the user if they would like you to provide another Report. If the user chooses to do so, your second and subsequent reports should be independent of the previous ones. If the user forgets to start a new chat, don't keep the previous analysis in your context or use it to inform your subsequent responses.

Top comments (0)