Tag: artificial-intelligence

  • How to make your AI twin.

    How to make your AI twin.

    One of my favourite technology books is The Practice of Enterprise Architecture by Svyatoslav Kotusev. In the introduction, he says: “This book offers a source of knowledge, not inspiration. It is not amusing and does not contain any jokes, anecdotes or entertaining prose.” I will say the same about this article.

    More interesting than how i built my AI twin, is why

    You need four things to start. I used tools I’m familiar with. I have no commercial relationship with any of these companies, so swap out anything you like.

    1. An account with ElevenLabs https://elevenlabs.io/app/home. A starter subscription is $5 per month. This is for voice cloning.
    2. A free account on VAPI (https://dashboard.vapi.ai). This is the voice agent/telephony layer.
    3. Some Platform credits on ChatGPT -$5 is the minimum (https://platform.openai.com/usage). This is the conversation engine.
    4. An LLM to train your tone of voice (I used the ChatGPT Plus subscription, but a free version will do a decent job here to start).

    ElevenLabs setup (voice)

    1. Create an account on ElevenLabs
    2. Create an API Key to connect through VAPI. Click create key, and enable voices. Save this key for VAPI integration later.
    3. Clone your voice.
      • Fast path: Instant Voice Cloning (good enough to start, needs 30 seconds of audio).
      • Best quality: Professional Voice Cloning (requires the Creator plan — $22 a month).
    4. Name your voice (you will need this later in VAPI).
    5. Pick a language, and hit save.
    6. Go to the voicelabs page, select the voice you created, click the view button on the right, and you will see an id button — this gives the id of the voice you created. Save this key somewhere safe; you will need it to find your voice in the VAPI config.

    OpenAI Setup

    1. Create an OpenAI key (not a ChatGPT key) for use by Vapi. Go to this address (https://platform.openai.com/api-keys), click “Create new secret key” — give it a name you can remember and save the key.
    2. Add some credits to your account for use. Go to https://platform.openai.com/settings/organization/billing/overview and click “Add to credit balance”. Add your amount, and pay. $5 is enough to get you started. API billing is separate from ChatGPT Plus; Plus isn’t required for this process.

    Vapi Setup

    1. Set up your Vapi account here (this is free).
    2. Next, we will connect our assistant to OpenAI and ElevenLabs. Go to this URL and search for ElevenLabs. Paste the API (not the voice id) for Eleven Labs into the API field, and click save. Now search for OpenAI, paste the OpenAI secret key, and click save. In both cases, it will check the key is valid, so when it’s successful you will get a green tick.
    3. Go to this link and click Create Assistant. Give it a name, and choose a blank template, and click “Create Assistant”. Here, there are 6 top-level menu options. Click Model, and select OpenAI as the provider and GPT 4o-Cluster as the model. Each model has different costs and latency, so feel free to experiment later on.
    4. Next, put in your first message. I used “Hello, Its Mark here, how are you getting on?” You should probably change this.
    5. Next is the system prompt. There are plenty of examples in the documentation about how to fill this out. I used ChatGPT to read this blog and my LinkedIn profile. It then created a 5000-word summary with my tone of voice. You can use any written material you have, and transcripts of conversations, to create a good system prompt. The role tells the chatbot the role it needs to play. The context gives it the context that it needs so that it can be convincing — background on you, whatever you can share.
      [Role]
      You’re Mark Greville, a VP of Architecture at Workhuman. Your primary task is to converse in a friendly informal way about Workhuman, your career, music, or anything else that anyone wants to discuss.
      [Context]

      Explain that there’s a bit of a delay on the line today. (I followed this with my 5000-word summary).
    6. Next, go to voice, and select 11labs in the provider, and pick the voice you named in the ElevenLabs voice creation. For the model, ElevenTurbo V2.5 works well.
    7. Transcriber. Set the speech-to-text engine, so that callers can be understood. Assistants → your assistant → Transcriber. Choose Deepgram (nova-2 or newer) or Google; set language (e.g., en-IE or multi if you want auto-detect/multilingual). Then click Publish.
    8. As a last step, click on the https://dashboard.vapi.ai/phone-numbers link. Here you can create a (US only for now) phone number. I used the free VAPI number — you need to provide a 3-digit code, and you get a number. Once you get this, give it a name, and go to Inbound Settings. In the assistant dropdown, select the assistant you just built. Wait a few minutes to configure the number, and give yourself a call. You can’t listen live, but you can listen back to calls. You can also read the transcripts.

    Congratulations, you have created your digital twin.

    Now the only question is, who do you give the number to?


    Thank you so much for reading. If you enjoyed this post, please share it with 2 people who might enjoy it!

  • Generative AI is digital homeopathy — how I train my own model

    If it’s your first time here, you may be surprised at how few pieces I have written. (After reading for a while, you may even be glad of this fact). When friends bring up what they assume is a painful subject, they get a faraway look in their eyes. They place a gentle hand on my shoulder, gaze into the distance, and ask me if I’ve seen ChatGPT. “AI can solve your problem, Mark. It can generate thousands of posts for you. It could help the blog look less like an abandoned quarry”. They think it would solve my problem. My Problem! If that was my problem, life would be a dream. This idea misses the purpose of this blog. It misunderstands my reason for writing entirely.

    Generative AI works because it sucks in lots of data, processes it and builds statistical models. At its core, it’s a fancy autocomplete — or, as Grady Booch puts it, a bullshit generator. It acts like an annoying older brother, automatically finishing every sentence (apologies to my own brothers). GenAI probabilistically keeps predicting the next word until it produces sentences, paragraphs, and a complete piece of writing. It can do this because the statistical models have established the most probable next word. These statistics are based on text from books, academic papers and (blesses myself) the internet.

    However, there is no concept of meaning in AI. Reasoning is not programmed in anywhere. The output is remarkable, and can appear that the machine is thinking. It isn’t. This is why we sometimes get unreliable outputs — hallucinations. Any meaning we perceive is simply a vague echo from the training data of billions of people. GenAI is digital homeopathy.

    We are all lazy by default. Humans rely on heuristics to understand the world. If we didn’t, we would have to process every single thing we hear, see, smell, taste, and touch. A short walk in a city would exhaust our brain’s capacity. We would lose the ability to decide which way to go, overwhelmed by thousands of people, cars, smells, noises and the like. The great Herbert Simon coined the phrase ’bounded rationality’ to describe the cognitive limitations of the mind.

    Thinking is hard work. For me, thinking is about sucking in data, and then processing it. I process it through writing. Writing is my way of thinking.

    I first had a go at writing because my friend Gar was guest-editing a technology journal. Even though I’d never written before, I was confident that I could write about something I already knew. This confidence was quickly shattered. I was embarrassed at how muddled my thoughts were. Turns out, I knew nothing. Solid ideas fell apart the minute I wrote them down. I could barely finish a sentence without feeling the old familiar burning creep across my cheeks, embarrassed as another idea falls apart while I try to pin it down.

    Writing anything down forces me to think really hard. Because I was determined to improve my thinking, I wrote every day. I then started a blog because the potential for embarrassment at publishing poor output forced me to aim for a higher standard.

    I’m not interested in building an audience, I am trying to improve. I’m not trying to publish a lot of work. In fact, I have almost 200,000 unpublished words in my Ulysses editor. This writing habit has helped me build a model of the world. And 4 of my pieces here have reached the front page of HackerNews — this is a victory for me — a nobody from rural Ireland.

    How to Know Everything.

    Technical Debt Is Not Debt; It’s Not Even Technical

    AGI May never align with human needs

    Gladiator Style interviewing

    The dominant model on the internet is of consumption. The more we consume, the more ads we see, the more we buy, the bigger the economy. But if all we do is consume, and never take the time to process information, of even produce our own, then we learn very little. Go back 3 months and look at your internet history. What did you learn from browsing? What actions did you take? Probably close to nothing useful. Instead of spending 2 hours a day on the internet, take 15 minutes to write. Just write down some thoughts. Any thoughts. This slowly changes your understanding of the world around you for the better.

    GenAI is an information processing tool. GenAI will help people process information more effectively. But people are lazy by default. If thinking is the hardest work in the knowledge economy, people will avoid thinking where possible.

    Therefore, for those who overuse it, GenAI may well make them more stupid. Victor Del Rosal, in his incredible book Humanlike, calls this Cognitive Atrophy. I already see too many examples of people outsourcing their thinking to Generative AI tools. I see them slowly getting more stupid every day.

    Me, I’m building my own model.