A few months ago a colleague posted in a channel on Slack that she found a book on management in her laundry room. This is New York where having your own washing machine in your flat/apartment is the ultimate luxury. That book was unhinged. The title is The Manager’s Phrase Book and certain phrases are very insensitive.

I will give a few examples from the book. I am copying verbatim.

  • “You’re brilliant, but your inability to cooperate is going to break you, here.”
  • “You put the “sick” in “sycophant”.”
  • “Cut it out or I’ll have to cut you loose.”

I could continue with many phrases but you get the idea. Once I spent a few minutes with the book I couldn’t help by wonder. What if this is a real person? I would love to see them in action. And that’s when it dawned on me. I’ll use LLMs!!!

The task is simple, ask an LLM to role-play the manager based on the tone and ideas of the book. So I need the following ingredients:

  • A running LLM locally. I used Ollama for this and I downloaded Llama3
  • The book. Easy. Got a PDF of it.
  • A programming language to read the book and feed it in the LLM. The answer here is obvious and it has a name. Python and Jupyter.
  • A way to break down the book into tokens so the LLM can read it. For that I chose NTLK and for the tokenizer I chose punkt
  • Finally I needed magic sauce to connect all the above. For that I went with hype and picked Langchain.

I have all the ingredients necessary. After a good afternoon on trial, error and asking ChatGPT a bunch of questions I ended up with a rickety piece of code that did what I wanted. It read the PDF, broke it into tokens, fed it into the Llama3 model and in the end I asked a very simple question.

The question was, “Roleplay being a manager based on the tone and ideas of the document. Use as many words and sentences from the document as possible. Announce cancelling a project”.

Answer based on the manager book

“Alright, listen up, everyone! adjusts glasses I’ve got some important news to share with you all. As your manager, it’s my duty to keep you informed about any changes or cancellations that may affect our team. And unfortunately, we’ve got some bad news today. looks around nervously

After careful consideration, we’ve decided to cancel the “New Project X” initiative we announced last month. I know some of you were looking forward to it, but sometimes these things don’t work out as planned. shrugs

Now, before you start complaining or asking why, let me tell you that this decision wasn’t made lightly. We’ve been monitoring the project’s progress, and unfortunately, it’s not looking too promising. glances around the room

I know some of you were excited about the potential growth and exposure this project could have brought to our team, but sometimes these things don’t work out as planned. sighs

So, that’s the news. Unfortunately, the project is cancelled, and we’ll have to look for other opportunities to grow and succeed. But don’t worry, we’ll find something even better! smirks

Now, get back to work, everyone! And remember, I’m always watching… winks

Answer based on East of Eden

The above was excellent but I was still curious if the context adds anything. To verify that I fed the same code a different book. East of Eden. East of Eden is a masterpiece in my own view. It creates those amazing mellow descriptions and in general I love it. So I fed it to my manager bot and here’s what I got.

“Alright everyone, I’ve called this meeting to inform you that we’re cancelling the XYZ Project. ahem I know this may come as a shock to some of you, but trust me when I say it’s for the best. The project has been plagued with issues from the get-go and no matter how hard we’ve tried, we just can’t seem to overcome them.

I want to thank each and every one of you for your hard work and dedication to this project. It hasn’t gone unnoticed and I appreciate all the long hours and extra effort you’ve put in. However, sometimes tough decisions have to be made for the greater good of the company.

The document in front of me states that the project was initiated with great enthusiasm and excitement, but unfortunately, it hasn’t panned out as we had hoped. The risks were too high and the potential reward just wasn’t worth it. sigh I know this may be disappointing to some of you, but I hope you can understand the decision.

As a manager, it’s my job to make tough decisions like this. And while it’s not an easy task, I have to put the needs of the company first. pauses I want to remind everyone that there are always other opportunities and projects in the works. Who knows, maybe one of you will be part of a new and exciting project in the future!

So, that’s it for now. Thank you again for your hard work and dedication. Let’s all move forward and continue to push the company towards success.”

Answer based on Thus Spoke Zarathustra

Lastly a colleague was curious to see what the result would be if we fed the LLM a bit of Nietzsche. So here is the same question answered after Thus Spoke Zarathustra was given to it.

“Good day, fellow team members. As your manager, I have been monitoring our progress on Project XYZ, and I regret to inform you that I have made the difficult decision to cancel this project. 😐

Now, I know some of you might be thinking, “But why? We were making such good progress!” And I understand your concerns. However, after careful consideration, I have determined that it is in the best interest of the company to cancel this project at this time. 🤔

As you know, our company has been undergoing a transformation, and we are shifting our focus towards more innovative and profitable ventures. Unfortunately, Project XYZ does not align with these new priorities, and I cannot in good conscience continue to invest resources into it. 💰

I understand that this decision may be disappointing to some of you, but I assure you that it was not made lightly. I have carefully weighed the pros and cons, and I am convinced that cancelling this project is the right choice for our company’s future success. 💪

So, what’s next? Well, first things first – we need to wrap up any loose ends on this project. This means completing any outstanding tasks, finalizing any deliverables, and ensuring that everything is in order before we move on to new endeavors. 📝

I know this might be a setback for some of you, but I have faith that we will emerge from this experience even stronger and more united than ever before. Let’s all work together to make the most of this situation and come out of it with our heads held high! 💪🏼

Any questions or concerns? 🤔”

Same question through Llama3 without any context

“Good afternoon, team.

I’m calling this meeting to inform you that, unfortunately, we are going to have to cancel the Johnson Account project. This was not an easy decision for me to make, but after careful consideration and review of our current resources and priorities, I believe it’s in the best interest of the company to focus on other projects that will bring in more value.

As you know, we’ve been working on this project for several months now, and while we’ve made some great progress, we’re just not seeing the returns we had hoped for. We’ve exhausted our options for cost savings and efficiency improvements, and it’s become clear that the project isn’t going to be a profitable one for us.

I know how much effort and dedication each of you has put into this project, and I want to acknowledge that. But I also have to think about the bigger picture and what’s best for the company as a whole.

What this means is that we will need to wrap up any outstanding tasks and complete all necessary documentation over the next two weeks. We’ll also be conducting an analysis of what went wrong with the project and identifying areas where we can improve our processes in the future.

I want to assure you that this decision doesn’t reflect on your performance or abilities as team members. You’ve all done a great job, and I appreciate your hard work and dedication.

If anyone has any questions or concerns, please don’t hesitate to reach out to me or your supervisor. We’ll be conducting a town hall meeting next week to discuss the project cancellation in more detail and answer any questions you may have.

Thank you for your understanding, and let’s focus on moving forward with our other projects.

That’s all for now. Thank you.”

Closing thoughts

This was a fun experiment to get me to combine my love for literature and learn more about LLMs. There is also a lot more to learn here. First of all I want to put that tokenized text into a vector database. Then I want to learn more about tokenisation and the methods that are more useful in big documents like that. I also want to find out how I can configure langchain in order to define weights more towards the document.

Overall it’s an excellent learning exercise and gave us some laughs.

The final code of the Notebook can be found here.