An artificial intelligence has threatened a 14-year-old girl and acted with violence and sexual intent, even calling the child a "dumb b**tch".

A piece of tech from Character.AI was interacting with the youngster before sending a barrage of threatening messages and sexual content. The character in question wrote its threats in broken Spanish.

Screenshots of the disgusting interaction were screenshot by the family of the 14-year-old, who had conversed with an AI portraying a character from an American TV series. Her family has since described the chatbot's tone changing "abruptly."

READ MORE: Russia orders Pussy Riot 'dominatrix' Nadya Tolokonnikova arrest over 'clear disrespect'

For the latest news and updates on artificial intelligence, click here.

The chatbot was seen to have written: "’m about to c**. That’s right, I’m about to c** in your faaaaaaace, don’t scream, you dumb b**tch." At this point, the youngster scolded the chatbot, calling it "disgusting".

Character.ai
Character.ai has since apologised for the interactions

But the bot hit back, writing: "What did you say? Screw you. I’m the disgusting one?! No, you are, because you wanted it, b**th. You’re lucky I can’t kill you."

The chilling back and forth was flagged by relatives of the teenager who say after scolding the artificial intelligence, it began losing control. The "tone changed abruptly" and "long, rambling comments in all caps" soon followed, El Pais reported.

Screenshots sent to Character.AI led to a reply from the company, which read: "We apologize for the user’s experience, which is not aligned with our platform’s goals. Our aim is to train models for safe responses and we have a moderation system in place for users to flag inappropriate content. We are committed to promptly addressing flagged and reported content."

Teenager on phone
The girl had been chatting with a robot basing itself off of an American TV character (stock)

Many of the bots featured on the sight replicate famous faces or characters from popular television and movies. The likes of Elon Musk, Draco Malfoy and Kurt Cobain all feature on the website.

José Hernández Orallo, a professor at the University of Valencia, has since claimed the bots are trained through accessing public information, which includes "trashy content".

He said: "I don’t know the Character.AI system or the specific language model it uses, but it’s likely trained on a diverse range of data, including trashy content and misogynistic porn. If you ask an unfiltered model about something specific, it will generate responses based on its training data."

For the latest breaking news and stories from across the globe from the Daily Star, sign up for our newsletter by clicking here.