How to prompt Gemini Code Assist
Key Takeaways
This video demonstrates how to use prompt engineering with Gemini Code Assist, a tool that leverages generative AI to help developers write and understand code more effectively, using techniques such as providing context, being specific, and using personas and style to craft effective prompts.
Full Transcript
[Music] by this point you're likely curious about how generative AI can help you be a more effective developer and you likely heard that prompt engineering can help when you're using tools such as Gemini Cod assist but what is prompting exactly and is it actually useful a prompt is a natural language request submitted to a language model to receive or response back prompts can contain questions instructions contextual information examples and partial input for the model to complete or expand on after the model receives a prompt depending on the type of model being used it can generate code text music images videos and more I remember thinking oh that's easy I know how to create a prompt and yet the responses I received weren't that great I thought it was the model after all I'd been an expert at finding information online it can't be me it's the AI That's wrong turns out my prompt had some issues let's see how prompt design and Gemini can help me be more productive using Google Cloud products and services when you ask Gemini code assist for help you should include as much context and specific detail as possible because AI generated responses are based on a vast range of possibilities it's important for you to be precise that sounds like a lot but to make your life easier Gemini Cod assist passes the content of your current file the programming language and Snippets of relevant files in your code Editor to the model there is no need to copy and paste code however crafting effective prompts will help Gemini code assist help you be more productive here are some ways to craft effective prompts write your prompt like you're talking with a person provide adequate context be specific use personas and style divide complex tasks remember prompts are natural language requests so write them like you're talking with a person you wouldn't go to your colleague and tell them Cloud functions HTTP trigger you might instead ask them a complete question there are often multiple correct ways to accomplish a technical goal so provide adequate context tell Gemini why you're trying to accomplish a particular task after all your colleague might respond to your question by saying yes but what are you trying to do therefore it's important to to proactively answer that question by providing details about what you're trying to accomplish Gemini will be much more helpful if you update Cloud functions HTTP trigger to I want to understand if Cloud functions supports HTTP triggers because I want to respond to events originating from third-party systems be specific include details about products and Technologies if if you're looking for answers about a specific product technology or technical capability include that in your prompt if you're unsure about what technologies or products to consider ask Gemini to compare different options for you importantly if you're asking Gemini for assistance creating commands or API calls tell Gemini to include all the parameters in a command let's say we started to build an application using Cloud functions if we want a Gemini to help us write a curl post for the cloud function endpoint we need to supply it with all the relevant information including the project ID the region endpoint and of course tell Gemini what we want the endpoint to do it's especially helpful to match your prompt request with your persona and your style this may take the form of sharing your level of expertise when you ask for a suggestion asking Gemini to explain a concept or code as if you're an expert programmer or a novice programmer can give you different and more appropriate results by this point we've learned quite a few different strategies and you might be thinking if I do all of this my prompts will be incredibly complex but don't fret you can chain these tips together if you break complex problems into multiple requests this can help Gemini refine and focus the answers that it gives helping you move progressively toward a solution as you can see writing well structured prompts is an essential part of ensuring accurate highquality responses from a language model those accurate highquality responses are the reason Gemini can make us more efficient effective and productive and you can help us improve the underlying services that we use to provide you with those accurate highquality responses by providing us with feedback about your conversational experience with Gemini with feedback and your explicit permission we can improve Gemini to make better suggestions with fewer mistakes and ensure that good responses are reinforced to try out Gemini Cod assist visit go o O.G Gemini dcod assist D inro or click the link in the description [Music]
Original Description
A tour of Gemini Code Assist→ https://goo.gle/Gemini-Code-Assist-Intro
How can developers leverage prompt engineering to be more productive and effective when writing and understanding code? Watch along as Luis Urena, Developer Advocate at Google Cloud, demonstrates how Gemini Code Assist can help any developer be more effective. Check out the power of generative AI for developers by clicking on the link above.
Chapters:
0:00 - Intro
0:17 - What is a prompt?
2:02 - How to craft effective prompts
4:44 - How to address complex tasks
5:15 - Conclusion
Watch more Gemini for Google Cloud → https://goo.gle/Gemini4Cloud
Subscribe to Google Cloud Tech → https://goo.gle/GoogleCloudTech
#Gemini #GoogleCloud
Speaker: Luis Urena
Products Mentioned: Cloud - AI and Machine Learning - Cloud Natural Language
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Google Cloud Tech · Google Cloud Tech · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
I’m going for it #GoogleCloudCertified
Google Cloud Tech
I had to get #GoogleCloudCertified
Google Cloud Tech
Be better overall at what you do #GoogleCloudCertified
Google Cloud Tech
Cloud Monitoring on our radar #Analysis #Uptime
Google Cloud Tech
Introduction to Generative AI Studio
Google Cloud Tech
How to use Github Actions with Google's Workload Identity Federation
Google Cloud Tech
Introduction to Responsible AI
Google Cloud Tech
Networking updates and CDMC-certified architecture
Google Cloud Tech
Create and use a Cloud Storage bucket
Google Cloud Tech
How to digitize text from documents
Google Cloud Tech
Faster analytical queries with AlloyDB
Google Cloud Tech
Next ‘23 sessions and FaaS Wave
Google Cloud Tech
Introduction to Assured Open Source Software
Google Cloud Tech
BigQuery Cost Optimization: Storage
Google Cloud Tech
BigQuery Cost Optimization: Compute
Google Cloud Tech
BigQuery Cost Optimization: Select Queries
Google Cloud Tech
Remote Field Equipment Management with Manufacturing Data Engine
Google Cloud Tech
Supercharging your applications with Cloud SQL Enterprise Plus
Google Cloud Tech
Vector Support on our radar #GenAI
Google Cloud Tech
Architecting a blockchain startup with Google Cloud
Google Cloud Tech
Kubernetes and multitasking updates!
Google Cloud Tech
GKE: Using Kubernetes Events
Google Cloud Tech
How to configure firewall rules for Cloud Composer
Google Cloud Tech
Vertex AI Embeddings API + Matching Engine: Grounding LLMs made easy
Google Cloud Tech
Geospatial analytics on our radar #EarthEngine #BigQuery
Google Cloud Tech
Ensuring requests are set in Kubernetes
Google Cloud Tech
Cloud Next 2023, Google research program, and more!
Google Cloud Tech
How to migrate projects between organizations with Resource Manager
Google Cloud Tech
How to run #MySQL in Google Cloud
Google Cloud Tech
#GenerativeAI for enterprises and #Next2023
Google Cloud Tech
How Google Photos scales to store 4 trillion photos and videos
Google Cloud Tech
Google Cross-Cloud Interconnect (Demo 2)
Google Cloud Tech
GKE Cost Optimization Golden Signals: Introduction
Google Cloud Tech
GKE Cost Optimization Golden Signals: Workload Rightsizing
Google Cloud Tech
GKE Load Balancing: Overview
Google Cloud Tech
GKE Load Balancing: Best Practices
Google Cloud Tech
Disaster Recovery in GKE
Google Cloud Tech
How to configure IP masquerade agent in GKE Standard clusters
Google Cloud Tech
Enable and use GKE Control plane logs
Google Cloud Tech
Compliance in Australia with Assured Workloads
Google Cloud Tech
Creating budgets and budget alerts in Google Cloud #FinOps
Google Cloud Tech
Cloud SQL Enterprise Plus on our radar #mySQL
Google Cloud Tech
What's Next for Google Cloud?
Google Cloud Tech
How Loveholidays scaled with Contact Center AI
Google Cloud Tech
What is fleet team management in GKE?
Google Cloud Tech
Troubleshoot VPC Network Peering
Google Cloud Tech
Introduction to DocAI and Contact Center AI
Google Cloud Tech
Cloud Run Direct VPC egress explained
Google Cloud Tech
Database deployment options in GKE
Google Cloud Tech
Analyze cloud billing data with #BigQuery
Google Cloud Tech
Tips to becoming a world-class Prompt Engineer
Google Cloud Tech
Serverless is simple. Do I need CI/CD?
Google Cloud Tech
Accelerating model deployment with MLOps
Google Cloud Tech
How Hawaii's Department of Human Services scaled with CCAI
Google Cloud Tech
Pricing API on our #Radar
Google Cloud Tech
How Recommendations AI for Media can boost customer retention
Google Cloud Tech
Troubleshooting: Node Not Ready Status
Google Cloud Tech
One weekend until Cloud Next 2023!
Google Cloud Tech
#GoogleCloudNext starts tomorrow!
Google Cloud Tech
#GoogleCloudNext will be demand!
Google Cloud Tech
More on: Prompt Craft
View skill →Related Reads
📰
📰
📰
📰
Building Multimodal SuperAgents: Integrating Speech, OCR, and Translation with iFly-Skills
Dev.to AI
Every Word I Say Gets Tokenized. This Library Does It 1000x Faster.
Dev.to · hermes-tom-agent
I built a Google Sheets MCP server so Claude reads my sheets
Dev.to · Jay from PasteSheet
OpenAI scored an own goal with HuggingFace attack, showing how open Chinese models are winning
The Register
Chapters (5)
Intro
0:17
What is a prompt?
2:02
How to craft effective prompts
4:44
How to address complex tasks
5:15
Conclusion
🎓
Tutor Explanation
DeepCamp AI