Mastering Google Gemini: The Art of Multi-Turn Conversations

Leon Nicholls
6 min readFeb 22, 2024

Get ready to ditch those one-and-done interactions with AI. Google Gemini thrives on longer conversational threads, remembering your discussions and evolving its responses — it’s like having a supercharged brainstorming buddy who learns as you go!

Note that this article uses Google Gemini Advanced, a paid service, but the techniques also apply to the free version of Google Gemini.

How Gemini Handles Multi-Turn Conversations

While it’s not an unlimited memory bank, Gemini hangs onto a decent chunk of your recent back-and-forth, called the context window. Think of a context window like your brain’s focus when having a conversation. It’s the amount of stuff you can keep in mind at once when responding to someone. For Gemini, it’s the same idea — the bigger the context window, the more of the recent conversation the model can “remember” and use to make its next response sound natural and on-topic.

The sweet spot is keeping chats focused on one main topic so the important information gets noticed as the conversation progresses.

There doesn’t appear to be any hard limit on the number of turns in a Gemini chat conversation so each chat conversation could go well beyond the context window size.

LLMs like Gemini tend to keep increasing the context window size. However, this comes at a computational cost that can get expensive and slow things down. Even with a huge window, LLMs can start “forgetting” details from the beginning of a long conversation. There’s a point where increasing the window doesn’t improve the LLM’s focus much more. The model needs prompt engineering techniques to really stay on track.

It’s important to remember that Gemini is still developing, and its conversational context window constantly evolves. The free and paid versions of Gemini have different context windows.

Best Practices for Crafting Multi-Turn Prompts

So, you want to have the smoothest, most productive chats with Gemini? Here are some tips to set you up for success:

  • Continuing Conversations: The Gemini UI allows you to return to previous chats and continue the conversations. For any shared chats, you can continue somebody else’s chat conversation.
  • Recap Magic: A quick refresh is gold, especially for longer chats. “So, we’ve decided on a beach vacation; now, let’s brainstorm some kid-friendly activities.”
  • Bite-Sized Prompts: Instead of dropping a massive, complex question all at once, see if you can break it into smaller steps. This makes it easier for Gemini to digest and keeps the conversation on track.
  • Stay the Course: Guide the conversation with clear cues. “Let’s circle back to hotel options…” or “Can we focus on budget-friendly dining ideas now?” keeps Gemini on track.

Remember, practice makes perfect! The more you experiment with multi-turn prompts, the better you’ll become at crafting them in a way that works smoothly with Gemini.

Advanced Technique: Table of Contents for Context Management

Ready for a game-changer? The Table of Contents (TOC) technique is your way to give Gemini a roadmap for those intricate, multi-step conversations. Two variations, what I’ll call explicit TOC and implicit TOC, will help Gemini keep on track.

Here’s how the explicit TOC works:

  • Start with a Prompt: Begin your conversation by asking Gemini, “Let’s brainstorm ideas for my upcoming trip. Can you create a simple TOC to track our discussion?
  • Gemini’s List: It might come up with categories like Destination Options, Activities, Budget, Packing List, etc.
  • Referencing the List: Use the TOC to bring Gemini back on track as your discussion progresses. For instance, “Let’s go back to ‘Activities’ — can you give me some suggestions based on our destination choice?”

This visible “map” keeps you and Gemini on the same page, especially in longer conversations. This allows easy topic switching by referencing the TOC for a smooth transition. It also trains Gemini to anticipate the structure of your conversation and be more mindful of past points.

Here’s how the implicit TOC works:

  • The Mini-Recap: Every so often during your conversation, provide a simple list of the main points you’ve covered. Think of it like a quick progress report for Gemini.
  • User-Provided Example: “Okay, quick recap! So far, we’ve decided: 1) The trip location will be Iceland, 2) we’re focusing on nature adventures, and 3) the budget is around $2000…”
  • Gemini-Provided Example: “Give me a summary list of our discussion so far.”

It helps keep Gemini (and you!) focused on the big picture, especially when conversations get twisty. If you need to change gears within a chat, the TOC makes it easy for Gemini to follow along.

Pro Tip: Use precise phrasing to introduce your summaries: “Here’s a quick overview of what we’ve discussed so far…” or “Let’s do a recap…” This tells Gemini to pay extra attention!

Example: Writing a Short Story With Gemini

Ready to get creative? Let’s see how Gemini can be your writing partner! I’ll show you how to navigate some of the challenges that might pop up.

Step 1: The Setup

Let’s start with something simple. I’ll give Gemini a prompt like, “The old clock in the abandoned house struck midnight, and a faint whisper echoed through the dusty halls…” Gemini will continue the story, and then it’s your turn!

Step 2: Co-Creation

Take turns adding to the story. The trick is to build on what Gemini gives you and steer the direction you want the story to go.

Troubleshooting

  • Better Responses: If Gemini doesn’t respond as expected, look at the other drafts or click the “Edit text” button of your last prompt, rephrase, and submit it to Gemini for another try. This way, all the previous context will still be kept in mind. The “Modify response” button has additional options for rewriting the responses.
  • Gemini Loses the Plot: Don’t panic! Use quick summaries (“Okay, so our hero has discovered a hidden map…”) or use the “Table of Contents” technique to get things back on track.
  • Response Word Limits: Gemini’s responses might get cut off. So, cue Gemini with: “Write chapter 2. (If the complete chapter content cannot be displayed in a single response, display the word [Continued] at the end of each response)”. Then respond with “continue” for the next chunk!

It’s all about having fun, being spontaneous, and seeing where the story takes you. Gemini Advanced is particularly good at generating creative content. Gemini might surprise you with unexpected twists and turns!

Practical Applications

Okay, enough about writing silly stories (though it is fun). Let’s discuss how multi-turn conversations with Gemini can seriously improve your day-to-day life and projects:

  • Recipe Remix: “Okay, Gemini, I want to make lasagna, but I don’t have ricotta. Can you suggest substitutions and adjust the ingredient amounts?” A multi-turn-capable AI could make cooking less stressful and more flexible to what you have on hand.
  • Level-Up Learning: Ditch those boring FAQs! Multi-turn dialogs let you build adaptive learning experiences. Gemini could guide students through complex subjects step-by-step, adjusting the explanations based on their input.
  • Smarter Sweat Sessions: Forget generic workout plans! Imagine an AI coach that remembers your fitness level, past injuries, and feedback during workouts. It could then craft routines that evolve with your progress and needs.
  • The Ultimate Brainstorming Buddy: Gemini can be your sounding board for any project. Start with a problem statement, then prompt it to generate solutions, refine ideas, and even help flesh out action steps.

These examples are just the tip of the iceberg! As Gemini’s capabilities grow, we’ll see even more ways these multi-turn conversations can make AI interactions smoother, more helpful, and more engaging.

Conclusion

The power of multi-turn dialog makes AI feel more collaborative. It opens up many possibilities — whether you’re building something cool, learning something new, or just looking for a better way to interact with AI.

Are you curious about what else you can do with Google Gemini? Stay tuned for the next blog post in this series! I’ll dive into even more techniques to unlock Gemini’s potential.

Check out my reading list of other Google Gemini articles.

This post was created in collaboration with AI writing tools. The final draft has been carefully reviewed and edited by the author.

--

--