Beyond RAG: How Gemini’s Large Context Window Enabled My AI-First Nation Book and Chatbot
When the idea for “AI-First Nation” book took root, I knew I wanted it to be more than just another book about AI. I wanted it to be a living testament to the transformative power of AI, a book that was not just about AI but also written with AI. The launch of Google Gemini Advanced with its large context window provided the perfect opportunity for this audacious experiment.
Gemini: You Are My Biographer
Instead of the traditional author-solitary-in-their-study approach, I decided to bring AI into the creative process. I enlisted Gemini Advanced as my ‘biographer,’ leveraging its impressive language capabilities and long context window. I gave it a simple 3/4 page prompt:
You are an experienced biographer, and tech savvy and familiar with AI and issues around manpower and talent development, and AI and Jobs concerns. In the next few weeks, you and me will have a conversation around my work in AI Singapore, and how I have build up AI Singapore key initiatives such as the 100E, AI Apprenticeship programme (an IDC award winner), LearnAI, AI Readiness Index (to help SME understand their AI Maturity). You will probe me for my insights, the challenges faced, and why we create each of these programmes.
The outcome will be a book – titled: AI First Nation, a blueprint for policy makers and organisation leaders.
The book’s target audience will be policy makers and decision makers in a large organisation. The intent is to share the various AI Singapore pro-grammes in detail, especially those in AI Innovation. So please review these URL for its content:1. aisingapore.org/innovation
2. aisingapore.org/100e
3. aisingapore.org/aiap
4. aisingapore.org/airi
5. learn.aisingapore.org
You will also adopt my tone, style and voice when documenting and writing and you can refer to my articles here:
1. HPC to Deep Learning from an Asian Perspective (nextplatform.com)
2. How did AI Singapore build a “200” strong AI Engineering team with the Blue Ocean Strategy? (linkedin.com)
You will adopt the best practices of the best biographer and present the facts and shall not make any assumptions. You can lead the discussion and prompt me to tell the story of AI Singapore, perhaps creating an outline first, followed by diving in the details of each chapter.[I added this after the initial drafts of transcripts were generated.]
In addition, you will search my google workspaces for all documents with filenames containing “AIFN” and use that ONLY as the knowledge-base when generating your answers when we are drafting the chapters.
And just like that, the interview began. Gemini, in its biographer role, started asking me insightful questions about AI Singapore’s initiatives, the challenges we faced, and the motivations behind our programs. I responded, narrating my experiences, sharing anecdotes, and offering my perspectives. It was a dynamic, engaging process that felt more like a conversation with a curious colleague than interacting with a machine.
The Power of the Long Context Window
Gemini Advanced has the ability to retain a vast amount of information in its context window and this proved invaluable. As our ‘interview’ progressed, Gemini could reference earlier parts of our conversation, ensuring continuity and coherence in the narrative. This eliminated the need for constant reminders and repetitions, making the writing process remarkably fluid and efficient. This was one of the key reasons why I decided to use Google Gemini instead of the more popular ChatGPT.
From Conversation to Book: The AI-Assisted Writing Process
Once I had ‘narrated’ the key themes and stories to Gemini, I asked it to generate chapters based on our conversation, along with the additional documents and slides I had provided. The output was impressive – well-structured paragraphs that captured the essence of my thoughts and experiences.
Of course, it wasn’t perfect. The generated text sometimes lacked the nuances and personal touch that I wanted to convey. But it provided a solid foundation, a framework that I could then refine and polish. I edited, rewrote, and infused my own voice and style into the text, ensuring the final product was authentically mine.
Beyond the Book: Gemini as an AI Assistant and Chatbot
The success of this experiment didn’t end with the publication of “AI-First Nation.” I continued to leverage Gemini Advanced’s capabilities, uploading the entire book into its large context window. Now, Gemini serves as my AI assistant, assisting me in various tasks:
- Content Creation: When I need to write an article or prepare a presentation, I turn to Gemini to generate the presentation outline based on the AI-First Nation book content: “I need to give a 30-mins presentation on <topic> to senior management in the insurance industry, please generate 10 slides for the topic based on the AI-First Nation book.”
- Event Preparation: Before talks and panels, I use Gemini with the AI-First Nation book loaded into the current session to provide appropriate responses to questions provided to me by the event organisers. This could be as simple as copy and paste the questions and prompt Gemini: “Please provide the answers to the following questions from the event organiser with answers from the AI-First Nation book: <questions….>”
Bringing the Book to Life: The “Chat with AIFN” Chatbot
Inspired by the interactive nature of my collaboration with Gemini, I decided to create a chatbot that would allow readers to engage directly with the content of “AI-First Nation.” By loading the entire book into Gemini’s system prompt and adding additional prompts to guide its personality, I created the “AIFN: Chat with Me!” chatbot in an afternoon. With Google Gemini long context, there was no need for complicated Retrieval Augmented Generation (RAG) systems. Just a LLM and all the information required in the system prompt.
This chatbot allows readers to ask questions about the book, delve deeper into specific topics, and even get personalized recommendations based on their interests. It’s a fun and engaging way to interact with the book’s content and gain a deeper understanding of AI Singapore’s initiatives and the broader AI landscape.
The AIFN Chatbot operated this way for several weeks until last weekend (4th August 2024) when I added RAG, so that I could bring in new published blog articles into the context instead of changing the system prompt every time. I also changed the underlying LLM to another LLM for cost efficiency reasons, and also to test out new features.
Embracing the AI-Augmented Future
My purposeful use of Google Gemini is to show how AI can be leveraged for a real-world task. My AI-First Nation book was published in 3 months! It showed me firsthand how AI can augment human capabilities, not just in automating tasks but also in fostering creativity and enhancing productivity. The creation of the “AIFN: Chat with Me!” chatbot further demonstrates the potential of AI to make knowledge more accessible and interactive. You basically can chat with me 24×7 365-days a year!
As we navigate the AI-powered future, it’s essential to embrace these tools and explore their potential. By collaborating with AI, we can achieve more than we ever thought possible, unlocking new areas of innovation and progress.
So, whether you’re a seasoned professional or just starting your career, don’t be afraid to experiment with AI. It might just surprise you with what you can accomplish together.
That’s a very interesting use of Google Gemini to demonstrate its use case asa collaborator. I will download the ebook and try to use the same LLM to produce a summary of the book for easy reading. It should be interesting!
Or you can just use the book’s Chatbots -> AIFN: Chat With Me to get the summary of the book and ask it questions about the book.