How to Use Google Gemini? With Prompting Tips and Examples

Plus, news from xAI, Stanford, OpenAI, GitHub, Amazon, and a free 7-day email course on prompt hacking.

Hey there!

In today’s newsletter edition, we’ll cover:

Guide: Google Gemini

Google Gemini is unmistakably a product of its creator. Who else but Google, the world’s largest search engine, could merge search expertise with conversational AI to create an accessible tool?

You can upload an image and ask questions about it. In this example, we asked, "What's the breed of this dog?"

Its other strength is its multimodality: It can handle text, audio, images, and code. It can also produce text in different formats, write code in multiple programming languages, and generate images.

All these features are available in Gemini’s free version, which we’ll focus on in today’s guide:

  • How to get started?

  • Key capabilities in practice

  • Tips for better prompts

If you’re interested in a guide to Gemini Advanced or its integration with Google Workspace, let us know. We’d be happy to explore those topics further.

How to Get Started?

  1. Sign in with your Google account: Go to gemini.google.com and log in.

  2. Start a chat: Type your query in the text box at the bottom of the interface. Tap the microphone icon to input voice, and click the image icon to upload images.

The image icon on the left side of the text field allows you to upload images, and the microphone icon on the right allows you to add voice prompts.

  1. Manage your chats: In the left-hand sidebar, rename, pin, or delete your conversations.

Manage your chats in the left-hand sidebar.

Key Capabilities in Practice

Let’s explore Gemini’s core features with some practical examples:

1. Text chat & interacting with responses

Type your prompt, and press Enter. Gemini replies in seconds. You can:

  • Like/Dislike the response

  • Ask it to modify the answer’s tone or length

  • Share or export the conversation

  • Fact-check the response using the Google button

An example answer from Gemini is ways you can interact with it.

Explain gravity in simple terms.

Example prompt

2. Generating Images

Gemini Chat's free version allows you to generate images using a prompt, where you can specify the details of the image, the style, and more.

Example image generated by Google Gemini.

Generate an image of a futuristic space elevator. Make it in cyberpunk style.

Example prompt

 3. Translating written notes & other multimodal capabilities

Take a quick snapshot of your handwritten notes, and let Gemini do the rest by transcribing them for you! You’ll receive a tidy digital version, which means you can save so much time on manual typing. You can also use this feature for image recognition, like having Gemini translate a photo into a relevant text format. Very handy!

Translate these notes into digital text for me.

Example prompt

4. Summarizing Long Text

Don’t want to read a 5,000-word article? Avoid information overload by asking Gemini to summarize lengthy documents. Paste the text into Gemini and ask for a summary. It’ll produce a concise overview.

[Paste your text here]

Give me a 100-word summary of this text in [simple/technical/creative/etc.] terms.

Example prompt

5. Generating Code

Gemini can write, debug, or optimize code in multiple languages. Provide a description or partial snippet, and it’ll suggest improvements or generate new code.

Give me a simple HTML, JS, CSS, and Python code for a word counter app that uses Flask.

Example prompt

Tips for Better Prompts

We’ve taken a close look at Google’s resources on prompting best practices, and here’s what we discovered:

Text Prompts

To prompt Google Gemini effectively, follow these tips:

  1. Give clear and specific instructions:

    • Use actionable verbs (e.g., "Summarize", "List").

    • Specify constraints (e.g., response length, scope).

    • Define the desired format explicitly (e.g., bullet points, JSON).

  2. Add contextual information:

    • Provide all necessary background or references.

    • Specify how the context should be used.

    • Focus on relevant details and avoid ambiguity.

  3. Use prefixes:

    • Label inputs and outputs clearly (e.g., "Text:", "Summary:").

    • Apply prefixes in few-shot examples to show patterns.

    • Combine input and output prefixes for clarity.

  4. Optional: Include few-shot examples (mostly to guide output format and improve reasoning)

We’ve put together a handy prompt template that includes everything you need to get started! You can easily copy, modify, and paste it into Google Gemini.

Optimized Text Prompt Template

Context: [Provide background information relevant to the task.]

Example: "Hummingbirds are small birds known for their vibrant colors, rapid wing movement, and ability to hover. They play a crucial role in pollination."

Task: [Describe the task in detail.]

  • Objective: [What should the model accomplish? Example: "Summarize the provided information."]

  • Define focus: [Additional needs like "Focus on ecological importance."]

  • Format: [Specify the desired output format. Example: "Write the response in a bulleted list."]

Constraints: [Set boundaries.]

  • Length: [Specify word or sentence limits. Example: "Limit the response to 50 words."]

  • Scope: [Clarify focus areas. Example: "Focus only on benefits to biodiversity."]

  • Exclusions: [Mention what should be avoided. Example: "Do not include examples of other birds."]

Few-shot examples: [Add examples of input and output for a similar task] (optional)

Final Output: [Define what the final response should look like.]

  • Tone: [Example: "Formal, suitable for a scientific paper."]

  • Structure: [Example: "Include a header and 3 bullet points."]

Learn more about the key parts of a prompt in our updated prompting guide. And remember, there is no secret sause in prompting, the key to receive better results is iteration and refinement.

Image Recognition Prompts

  1. Be specific: Provide clear and detailed instructions that minimize ambiguity.

  • Don’t: "Describe this image"

  • Do: "Identify the main objects in the image and describe their arrangement."

  1. Break down tasks: Divide complex prompts into smaller, logical steps.

  • Step 1: Describe the objects in the image.

  • Step 2: Explain their spatial arrangement.

  • Step 3: Provide a creative caption.

  1. Specify Output Formats: Request output in structured formats like JSON, Markdown, or HTML for easier downstream use.

  • Example: "Parse the table in this image into Markdown format."

Examples of Optimized Visual Prompts

  1. Informative task:

Extract all text visible in this image of a shop sign and translate it to French.

Example prompt
  1. Creative task:

Create a travel story based on this image of a beach sunset, highlighting its emotional ambiance.

Example prompt
  1. Structured data output:

Parse this image of a timetable into JSON format, showing subject, status, and due dates.

Example prompt

Wrapping Up

Google Gemini offers a wide range of capabilities, all packed into an intuitive, user-friendly interface. If you’d like to learn more, check out our website article for additional information about Google Gemini.

If you’d like a guide on Gemini Advanced or its integration with Google Workspace, let us know.

Weekly Generative AI News

  1. Grok AI iOS app

    xAI's Grok AI chatbot is now available as a standalone iOS app, expanding its accessibility beyond the X platform. The app offers real-time information retrieval, question answering, and image generation, positioning Grok as a competitor to AI chatbots like ChatGPT and Google Gemini.

  2. OpenAI's 'Tasks' Feature

    OpenAI is stepping up its game with the beta release of "Tasks" in ChatGPT, enhancing its utility in task automation. This addition allows users to create to-do lists and schedule future actions, such as setting meeting reminders or generating daily workout plans. By integrating task management capabilities, ChatGPT is now vying for a spot as your go-to digital assistant, challenging the likes of Siri and Alexa.

  3. Stanford's STORM Research Tool

    Stanford University has launched STORM, a research tool similar to Google's Deep Research. STORM is designed to assist researchers in managing and analyzing large datasets, facilitating more efficient and effective research processes across various academic disciplines.

  4. Qwen's Chat UI Introduction

    Qwen has rolled out a new Chat UI, aiming to be the universal remote for AI model interactions. Providing a unified interface simplifies the user experience and allows seamless engagement with various AI systems.

  5. GitHub's Copilot Workspace

    GitHub has opened the waitlist for Copilot Workspace, an agentic Integrated Development Environment (IDE) designed to assist developers. Copilot Workspace integrates AI capabilities directly into the coding environment, offering real-time code suggestions and automating repetitive tasks.

  6. Amazon's Alexa Overhaul

    Amazon is giving Alexa a brain boost to transform it into a more advanced, ChatGPT-like AI assistant. By enhancing its conversational abilities, Amazon seeks to keep Alexa competitive in the fast-paced AI assistant market and ensure it doesn't become the next Clippy.

  7. WEF's AI Job Market Projection

    The World Economic Forum (WEF) projects that artificial intelligence will create 78 million jobs by 2030. However, the WEF also acknowledges that AI may disrupt certain industries, with anticipated job declines of 31% in writing, 21% in software development, and 17% in graphic design. Thus, the WEF calls for workforce adaptation and reskilling to ensure everyone has the right skills for the evolving job market.

  8. Mistral's Coding Model Release

    Mistral has released, Codestral 25.01, a new state-of-the-art coding model that claims to double the generation speed of its predecessors. This advancement could streamline development processes, making "crunch time" a relic of the past and giving developers more time to, well, develop.

Learn Prompt Hacking in 7 days

Do you want to learn how to trick your chatbot or expand your AI security knowledge into language model jailbreaks?

We’ll soon launch a free 7-day email course to teach you prompt hacking.

The course focuses on:

  • Why LLM security matters (today)

  • Understanding prompt hacking and attacker motives

  • 9 common prompt attack strategies

  • Advanced attack insights from HackAPrompt 1.0

  • Strategies for defense and risk mitigation

  • Future challenges and next steps

To receive this course into your inbox, join the waitlist!

P.S. If you’re interested in AI security and AI red teaming, participate in HackAPrompt 2.0.

Thanks for reading! We’d love your feedback to make this newsletter even better. Our goal is to share content that’s valuable and relevant to you. Help us fine-tune future editions by sharing your thoughts on this week’s email, it’ll only take a moment!

How was this week's email?

Please rate your experience using the options below.

Login or Subscribe to participate in polls.

 

Reply

or to participate.