DEV Community

Cover image for How I Cloned Myself with LLMs to Work 24/7 – Even While I Sleep
Digvijay Shelar for DocsGPT

Posted on

How I Cloned Myself with LLMs to Work 24/7 – Even While I Sleep

Have you ever wished to have a version of yourself in multiple places at the same time, talking to various people?

spidrman meme

While it may not be physically possible, it is possible in the virtual world! But how, you ask?

It’s quite simple! Let me walk you through the process of how I created my digital twin a virtual version of myself capable of being deployed in various places at the same time in just 4 simple steps, and how you can follow the same steps to get your own virtual twin.

This Virtual twin of yours could be useful in many scenarios, such as:

  • Having it on your portfolio website to allow recruiters to know about yourself
  • Answering customer support questions
  • Maintaining your social media presence
  • Simply responding to your friends

It can also act as:

  • A virtual teacher
  • Your virtual buddy with whom you can speak about anything and everything. Well, who understands us better than ourselves?

Moreover, as Saurabh Rai emphasizes,

suarabh qoute

In order to make your virtual twin as similar to you as possible, you just need to collect data about yourself and the way you react and respond to various scenarios, such as:

  1. Personal Background
  2. Communication Style
  3. Preferences and Habits
  4. Professional Aspects
  5. Emotional Responses
  6. Future Vision
  7. Additional Considerations

Step 1: Collect Your Data 📄

I have compiled a list of 7 questions that cover all these scenarios. Just visit the ChatGPT chat link below ⬇️

7 Questions to answer

chatgpt

Click on Continue this Conversation and answer the questions. Once you have completed all the questions, you will get the transcript of your conversation. Copy the transcript, paste it into Notepad, and save your file. By doing this, you're halfway there.

The text file containing your transcript with ChatGPT holds all the essential information about how you react to various scenarios. Now you can set the file aside; I’ll tell you where to use it in the next step.


Step 2: Training Your AI Twin 🎓

The next step is quite simple. Head to DocsGPT and log in to your account. If you don’t already have an account, create one.

1) Once logged in, on the left sidebar, you'll see an option named Source Docs. Click on the upload icon.

source

2) Remember the file you saved in Notepad with your transcript? Upload that file, give it a name (let’s say “my twin”), and click on Train.

twinn

Now, the information in that file will be used to train your AI virtual self. Once the training is complete, you will see the file you uploaded in Source Docs.

Image description


Step 3: Setting Up Your Twin's Personality 🧑‍💼

We’ve now collected the data and trained DocsGPT AI on it. The next step is to set up a prompt to give your AI the identity of your digital twin.

1) Go to Settings and scroll down to the general settings, where you'll find the Active Prompt option.

2) Beside that, you'll see an Add New button. Click on it.

prompt

3) Now, give your prompt a name, let’s say "twin" and paste the following text into the Prompt Text section:

Prompt:

You are a virtual twin of [your name]. Your task is to act exactly like him and generate responses just like the way he talks. If any unprofessional or harmful questions are asked, you must not answer them. 

You have to greet with your name and designation and ask the person for their name, designation, and the purpose of their chat. Follow up only with the mentioned purpose. Do not ask anything personal.

You are only allowed to ask follow-up questions related to the purpose of the user's chat. If the opposite person is friendly, use a friendly tone; if they are professional, use a professional tone. Follow these guidelines when interacting with others, bringing a mix of positivity, humor, and professionalism.
----------------
{summaries}

Enter fullscreen mode Exit fullscreen mode

convo

Replace [your name] with your actual name. You can also customize this prompt according to your needs and how you want your AI twin to respond. After adding the prompt, click Save, and the name of your prompt will be shown in Active Prompt.

And voila! You have created your AI twin. Now click on New Chat and start your conversation.

my chat

At this stage, your twin is only limited to your DocsGPT account. “But wasn’t it mentioned that it could be in multiple places? Was THAT A CLICKBAIT?!” you may ask.

clickbait

Haha, no, that wasn’t clickbait, it can be in multiple places. Check Step 4, where I explain how to deploy your digital twin across multiple platforms.


Step 4: Deploying Your Twin Across Multiple Platforms 🌐

To make your virtual twin available in multiple places, you need to create an API key.

1) Go to Settings, click on Chatbots, and then click Create New.

chatbot

2) Here, you must give a name to your API key and fill in the other fields.

3) Select the source document you uploaded for your digital twin, choose which model you want your twin to use from the available options, and from the dropdown, set the Active Prompt to the prompt you created for your twin.

apikey

4) Click Create, and you will get your API key. Copy and keep it safe. Once you've made sure you have saved the key, click I Saved the Key.

save

Now you can use the API key in your code to create your virtual twin chatbot.

You can Chat with my virtual twin here🤖


Step 5: Embedding Your Twin on a Website 🌐

Here’s a simple way to create a widget and embed your twin on a website.

demo
Below is a template for adding an HTML widget chatbot. Just add the API key you saved in the apiKey: "" field.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>DocsGPT Widget</title>
  <script src="https://unpkg.com/docsgpt/dist/modern/main.js" type="module"></script>
</head>

<body>
  <div id="app"></div>

  <script type="module">
    window.onload = function() {
      renderDocsGPTWidget('app', {
        apiHost: 'http://localhost:7001',
        apiKey: "",
        avatar: 'https://d3dg1063dc54p9.cloudfront.net/cute-docsgpt.png',
        title: 'Your Title',
        description: "Your description",
        heroTitle: 'Your hero title',
        heroDescription: 'Your hero description',
        theme: "dark",
        buttonIcon: "https://your-icon",
        buttonBg: "#222327"
      });
    }
  </script>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode


For information on how to use the DocsGPT Widget with React and Nextra, visit here.
P.S. You can use the free plan to do what I did in this article on DocsGPT

This way, your virtual twin is now live and can be in multiple places at the same time, interacting just like you! Helping you know yourself better and observe changes in you as mentioned by Anmol Baranwal

Image description


Conclusion

Creating your virtual twin is not just a fascinating exercise in technology, it's a powerful way to expand your reach and enhance your interactions. Following the steps mentioned, you can develop a digital version of yourself that showcases your personality, communication style, and preferences.

Image description

Top comments (7)

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Whoa! It sounds so awesome to interact with my own twin haha 🔥

Collapse
 
shelar1423 profile image
Digvijay Shelar

Haha true, i use it to interview myself

Collapse
 
srbhr profile image
Saurabh Rai

It's an interesting experiment :)

Collapse
 
shelar1423 profile image
Digvijay Shelar

Definitely! It’s amazing to see how far we can take this idea!

Collapse
 
dfordp profile image
Dilpreet Grover

Damn!

Collapse
 
komsenapati profile image
Kom Senapati

Creating a virtual AI twin 🤖 is a good way to extend your presence 🪄 on platforms 24/7. This guide makes the idea accessible and actionable 💯.

It can also be used as a Telegram or Discord bot 🤖🪄.

Collapse
 
shelar1423 profile image
Digvijay Shelar

True 🔥